net.sf.parcinj
Class TerminalSymbolType

java.lang.Object
  extended by net.sf.parcinj.TerminalSymbolType
All Implemented Interfaces:
TokenType

public class TerminalSymbolType
extends java.lang.Object
implements TokenType

Class representing a token type which is a terminal symbol.


Method Summary
 java.lang.String asString()
          Returns the text representation of the terminal symbol.
static TerminalSymbolType delimiter(java.lang.String delimiter)
          Creates a terminal symbol type which is a delimiter.
 boolean isKeyWord()
          Returns true if this is a key word.
static TerminalSymbolType keyWord(java.lang.String keyWord)
          Creates a terminal symbol type which is a key word.
 java.lang.String toString()
          Returns asString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

keyWord

public static final TerminalSymbolType keyWord(java.lang.String keyWord)
Creates a terminal symbol type which is a key word. That is, the create instance returns keyWord and true for asString() and isKeyWord(), respectively.


delimiter

public static final TerminalSymbolType delimiter(java.lang.String delimiter)
Creates a terminal symbol type which is a delimiter. That is, the create instance returns delimiter and false for asString() and isKeyWord(), respectively.


asString

public java.lang.String asString()
Returns the text representation of the terminal symbol. It might be used by the Lexer classes for parsing.


isKeyWord

public boolean isKeyWord()
Returns true if this is a key word.


toString

public java.lang.String toString()
Returns asString().

Overrides:
toString in class java.lang.Object