fr.umlv.tatoo.runtime.lexer.rules
Interface RegexTable

All Known Implementing Classes:
CharRegexTable

public interface RegexTable

High level interface of a lexer automaton.

Author:
Julien

Method Summary
 boolean accept(int state)
          Tests if the state is or not an accept state.
 int getStart()
          Returns the index of the start state.
 int getStateNumber()
          Returns the number of state of the whole automaton.
 int getTransition(int state, int next)
          Returns the index of the following state from the state state with the letter next.
 boolean noOut(int state)
          Returns if the state pass as srgument is a sink state.
 

Method Detail

getStart

int getStart()
Returns the index of the start state.

Returns:
the index of the start state.

getTransition

int getTransition(int state,
                  int next)
Returns the index of the following state from the state state with the letter next.

Parameters:
state - previous state
next - letter to read
Returns:
next state or -1 if undefined

accept

boolean accept(int state)
Tests if the state is or not an accept state.

Parameters:
state - the state
Returns:
true if the state is an accept state

getStateNumber

int getStateNumber()
Returns the number of state of the whole automaton.

Returns:
the number of state of the whole automaton.

noOut

boolean noOut(int state)
Returns if the state pass as srgument is a sink state.

Parameters:
state - the state
Returns:
true if state is a sink state