inf.compilers
Class LexicalAnalyzer.TokenType

java.lang.Object
  extended by 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(...).


Field Summary
(package private)  boolean isWhiteSpace
           
 java.lang.String name
           
protected  LexicalAnalyzer.RegexNode regexRoot
           
 
Constructor Summary
protected LexicalAnalyzer.TokenType(java.lang.String name, LexicalAnalyzer.RegexNode rNode)
           
 
Method Summary
 void setWhiteSpace(boolean ws)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name

regexRoot

protected LexicalAnalyzer.RegexNode regexRoot

isWhiteSpace

boolean isWhiteSpace
Constructor Detail

LexicalAnalyzer.TokenType

protected LexicalAnalyzer.TokenType(java.lang.String name,
                                    LexicalAnalyzer.RegexNode rNode)
Method Detail

setWhiteSpace

public void setWhiteSpace(boolean ws)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object