Package jflex.core

Class EOFActions


  • public class EOFActions
    extends java.lang.Object
    A simple table to store EOF actions for each lexical state.
    Version:
    JFlex 1.8.2
    • Constructor Summary

      Constructors 
      Constructor Description
      EOFActions()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.Integer state, Action action)
      Add.
      void add​(java.util.List<java.lang.Integer> stateList, Action action)
      Add.
      Action getAction​(int state)
      getAction.
      Action getDefault()
      Returns the default action.
      boolean isEOFAction​(java.lang.Object a)  
      int numActions()
      Returns thenumber of Actions.
      void setNumLexStates​(int num)
      Sets the number of lexical states.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • actions

        private final java.util.Map<java.lang.Integer,​Action> actions
        maps lexical states to actions
      • defaultAction

        private Action defaultAction
      • numLexStates

        private int numLexStates
    • Constructor Detail

      • EOFActions

        public EOFActions()
    • 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 - a List object.
        action - a Action object.
      • add

        public void add​(java.lang.Integer state,
                        Action action)
        Add.
        Parameters:
        state - a Integer object.
        action - a Action object.
      • isEOFAction

        public boolean isEOFAction​(java.lang.Object a)
      • getAction

        public Action getAction​(int state)
        getAction.
        Parameters:
        state - a int.
        Returns:
        a Action object.
      • getDefault

        public Action getDefault()
        Returns the default action.
        Returns:
        a default Action.
      • numActions

        public int numActions()
        Returns thenumber of Actions.
        Returns:
        number of actions.