JFlex
Class LexicalStates

java.lang.Object
  extended by JFlex.LexicalStates

public class LexicalStates
extends java.lang.Object

Simple symbol table, mapping lexical state names to integers.

Version:
JFlex 1.4.1, $Revision: 2.2 $, $Date: 2004/11/06 23:03:32 $
Author:
Gerwin Klein

Field Summary
(package private)  java.util.Vector inclusive
          codes of inclusive states (subset of states)
(package private)  int numStates
          number of declared states
(package private)  java.util.Hashtable states
          maps state name to state number
 
Constructor Summary
LexicalStates()
          constructs a new lexical state symbol table
 
Method Summary
 java.util.Enumeration 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.Enumeration 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.Hashtable states
maps state name to state number


inclusive

java.util.Vector 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)
insert a new state declaration


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.


number

public int number()
returns the number of declared states


names

public java.util.Enumeration names()
returns the names of all states


getInclusiveStates

public java.util.Enumeration getInclusiveStates()
returns the code of all inclusive states