fr.umlv.tatoo.runtime.regex
Class CharRegexTable
java.lang.Object
fr.umlv.tatoo.runtime.regex.CharRegexTable
- All Implemented Interfaces:
- RegexTable
public class CharRegexTable
- extends Object
- implements RegexTable
|
Constructor Summary |
CharRegexTable(int firstState,
int[][] transitions,
boolean[] accepts)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CharRegexTable
public CharRegexTable(int firstState,
int[][] transitions,
boolean[] accepts)
accept
public boolean accept(int i)
- Specified by:
accept in interface RegexTable
getAccepts
public boolean[] getAccepts()
getStart
public int getStart()
- Specified by:
getStart in interface RegexTable
getStateNumber
public int getStateNumber()
- Specified by:
getStateNumber in interface RegexTable
getTransition
public int getTransition(int state,
char next)
- Specified by:
getTransition in interface RegexTable
- Parameters:
state - previous statenext - letter to read
- Returns:
- next state or -1 if undefined
getTransitions
public int[][] getTransitions()
noOut
public boolean noOut(int currentState)
- Specified by:
noOut in interface RegexTable
- Returns:
- true if currentState is a sink state