Package jflex.scanner

Class LexicalStates

java.lang.Object
jflex.scanner.LexicalStates

public class LexicalStates extends Object
Simple symbol table, mapping lexical state names to integers.
Version:
JFlex 1.8.2
  • Field Details

    • states

      Map<String,Integer> states
      maps state name to state number
    • inclusive

      List<Integer> inclusive
      codes of inclusive states (subset of states)
    • numStates

      int numStates
      number of declared states
  • Constructor Details

    • LexicalStates

      public LexicalStates()
      Constructs a new lexical state symbol table.
  • Method Details

    • insert

      public void insert(String name, boolean is_inclusive)
      Inserts a new state declaration.
      Parameters:
      name - a String object.
      is_inclusive - a boolean.
    • getNumber

      public Integer getNumber(String name)
      Returns the number (code) of a declared state, null if no such state has been declared.
      Parameters:
      name - a String object.
      Returns:
      a Integer object.
    • number

      public int number()
      Returns the number of declared states.
      Returns:
      the number of declared states.
    • names

      public Set<String> names()
      Returns the names of all states.
      Returns:
      the names of all states.
    • getInclusiveStates

      public List<Integer> getInclusiveStates()
      Returns the code of all inclusive states.
      Returns:
      the code of all inclusive states.