inf.compilers
Class LexicalAnalyzer.TokenType
java.lang.Object
inf.compilers.LexicalAnalyzer.TokenType
- Enclosing class:
- LexicalAnalyzer
public static class LexicalAnalyzer.TokenType
- extends java.lang.Object
This class represents a single token type. A token type can be given an
arbitrary name (which is not really relevant). It is usually represented
by a regular expression that it has to match. Internally, the regular
expression is represented by a tree of RegexNodes. To create a TokenType
use createTokenType(...).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
public java.lang.String name
regexRoot
protected LexicalAnalyzer.RegexNode regexRoot
isWhiteSpace
boolean isWhiteSpace
LexicalAnalyzer.TokenType
protected LexicalAnalyzer.TokenType(java.lang.String name,
LexicalAnalyzer.RegexNode rNode)
setWhiteSpace
public void setWhiteSpace(boolean ws)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object