public class LexicalStates
extends java.lang.Object
Modifier and Type | Field and 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 and Description |
---|
LexicalStates()
constructs a new lexical state symbol table
|
Modifier and Type | Method and 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)
insert 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
|
java.util.Map<java.lang.String,java.lang.Integer> states
java.util.List<java.lang.Integer> inclusive
int numStates
public void insert(java.lang.String name, boolean is_inclusive)
public java.lang.Integer getNumber(java.lang.String name)
null
if no such state has been declared.public int number()
public java.util.Set<java.lang.String> names()
public java.util.List<java.lang.Integer> getInclusiveStates()