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
- Author:
- Gerwin Klein
-
-
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 List<Integer>getInclusiveStates()Returns the code of all inclusive states.IntegergetNumber(String name)Returns the number (code) of a declared state,nullif no such state has been declared.voidinsert(String name, boolean is_inclusive)Inserts a new state declaration.Set<String>names()Returns the names of all states.intnumber()Returns the number of declared states.
-
-
-
Method Detail
-
insert
public void insert(String name, boolean is_inclusive)
Inserts a new state declaration.- Parameters:
name- aStringobject.is_inclusive- a boolean.
-
getNumber
public Integer getNumber(String name)
Returns the number (code) of a declared state,nullif no such state has been declared.
-
number
public int number()
Returns the number of declared states.- Returns:
- the number of declared states.
-
-