com.inxar.syntacs.grammar.context_free
Class CFTerminal

java.lang.Object
  |
  +--com.inxar.syntacs.grammar.context_free.CFTerminal
All Implemented Interfaces:
GrammarSymbol, Terminal
Direct Known Subclasses:
CFEpsilon

public class CFTerminal
extends Object
implements Terminal

Standard Terminal implementation.


Method Summary
 boolean equals(Object other)
           
 IntSet getFirstSet()
          Computes the IntSet Of terminals that is the first set for this GrammarSymbol.
 int getID()
          The globally assigned integer identifier for this GrammarSymbol.
 String getName()
          The common name of the GrammarSymbol.
 Token getToken()
          Returns the Token object upon which this Terminal takes its identity.
 boolean isNullable()
          Returns true if this item either is Epsilon (case of Terminal) or derives it (case of NonTerminal).
 boolean isTerminal()
          Returns true if this GrammarSymbol is an instanceof Terminal and may safely be cast to a Terminal (or vice versa).
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getID

public int getID()
Description copied from interface: GrammarSymbol
The globally assigned integer identifier for this GrammarSymbol.
Specified by:
getID in interface GrammarSymbol

getName

public String getName()
Description copied from interface: GrammarSymbol
The common name of the GrammarSymbol.
Specified by:
getName in interface GrammarSymbol

getToken

public Token getToken()
Description copied from interface: Terminal
Returns the Token object upon which this Terminal takes its identity.
Specified by:
getToken in interface Terminal

isTerminal

public boolean isTerminal()
Description copied from interface: GrammarSymbol
Returns true if this GrammarSymbol is an instanceof Terminal and may safely be cast to a Terminal (or vice versa).
Specified by:
isTerminal in interface GrammarSymbol

isNullable

public boolean isNullable()
Description copied from interface: GrammarSymbol
Returns true if this item either is Epsilon (case of Terminal) or derives it (case of NonTerminal).
Specified by:
isNullable in interface GrammarSymbol

getFirstSet

public IntSet getFirstSet()
Description copied from interface: GrammarSymbol
Computes the IntSet Of terminals that is the first set for this GrammarSymbol.
Specified by:
getFirstSet in interface GrammarSymbol

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object