Package jflex.core
Class EOFActions
- java.lang.Object
-
- jflex.core.EOFActions
-
public class EOFActions extends java.lang.ObjectA simple table to store EOF actions for each lexical state.- Version:
- JFlex 1.9.1
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.Integer,Action>actionsmaps lexical states to actionsprivate ActiondefaultActionprivate intnumLexStates
-
Constructor Summary
Constructors Constructor Description EOFActions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.Integer state, Action action)Add.voidadd(java.util.List<java.lang.Integer> stateList, Action action)Add.ActiongetAction(int state)getAction.ActiongetDefault()Returns the default action.booleanisEOFAction(java.lang.Object a)intnumActions()Returns thenumber ofActions.voidsetNumLexStates(int num)Sets the number of lexical states.
-
-
-
Method Detail
-
setNumLexStates
public void setNumLexStates(int num)
Sets the number of lexical states.- Parameters:
num- number of states.
-
add
public void add(java.util.List<java.lang.Integer> stateList, Action action)Add.- Parameters:
stateList- aListobject.action- aActionobject.
-
add
public void add(java.lang.Integer state, Action action)Add.- Parameters:
state- aIntegerobject.action- aActionobject.
-
isEOFAction
public boolean isEOFAction(java.lang.Object a)
-
getAction
public Action getAction(int state)
getAction.- Parameters:
state- a int.- Returns:
- a
Actionobject.
-
numActions
public int numActions()
Returns thenumber ofActions.- Returns:
- number of actions.
-
-