Package jflex.scanner

Class LexicalStates


  • public class LexicalStates
    extends java.lang.Object
    Simple symbol table, mapping lexical state names to integers.
    Version:
    JFlex 1.9.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.List<java.lang.Integer> inclusive
      codes of inclusive states (subset of states)
      (package private) int numStates
      number of declared states
      (package private) java.util.Map<java.lang.String,​java.lang.Integer> states
      maps state name to state number
    • Constructor Summary

      Constructors 
      Constructor Description
      LexicalStates()
      Constructs a new lexical state symbol table.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.Integer> getInclusiveStates()
      Returns the code of all inclusive states.
      java.lang.Integer getNumber​(java.lang.String name)
      Returns the number (code) of a declared state, null if no such state has been declared.
      void insert​(java.lang.String name, boolean is_inclusive)
      Inserts a new state declaration.
      java.util.Set<java.lang.String> names()
      Returns the names of all states.
      int number()
      Returns the number of declared states.
      • Methods inherited from class java.lang.Object

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

      • states

        java.util.Map<java.lang.String,​java.lang.Integer> states
        maps state name to state number
      • inclusive

        java.util.List<java.lang.Integer> inclusive
        codes of inclusive states (subset of states)
      • numStates

        int numStates
        number of declared states
    • Constructor Detail

      • LexicalStates

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

      • insert

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

        public java.lang.Integer getNumber​(java.lang.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 java.util.Set<java.lang.String> names()
        Returns the names of all states.
        Returns:
        the names of all states.
      • getInclusiveStates

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