fr.umlv.tatoo.runtime.regex
Class CharRegexTable

java.lang.Object
  extended by 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)
           
 
Method Summary
 boolean accept(int i)
           
 boolean[] getAccepts()
           
 int getStart()
           
 int getStateNumber()
           
 int getTransition(int state, char next)
           
 int[][] getTransitions()
           
 boolean noOut(int currentState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharRegexTable

public CharRegexTable(int firstState,
                      int[][] transitions,
                      boolean[] accepts)
Method Detail

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 state
next - 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