|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarf.nlp.Parsing.GrammarCompiler.GrammarElement
marf.nlp.Parsing.GrammarCompiler.Terminal
public class Terminal
Represents terminal symbol grammar element. $Id: Terminal.java,v 1.11 2005/12/17 19:01:09 mokhov Exp $
| Field Summary | |
|---|---|
protected GrammarTokenType |
oType
Grammar token type. |
| Fields inherited from class marf.nlp.Parsing.GrammarCompiler.GrammarElement |
|---|
iID, oFirstSet, oToken, strName |
| Constructor Summary | |
|---|---|
Terminal(java.lang.String pstrLexeme,
int piID)
Constructor with the token lexeme and its ID. |
|
Terminal(Token poToken,
int piID)
Constructor with the token and its ID. |
|
| Method Summary | |
|---|---|
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
GrammarTokenType |
getType()
Allows getting the enclosed grammar token type. |
boolean |
isNonTerminal()
Allows querying this grammar element for non-terminality. |
boolean |
isTerminal()
Allows querying this grammar element for terminality. |
boolean |
isToken(Token poToken)
Checks is the parameter token is also token by having the same name. |
| Methods inherited from class marf.nlp.Parsing.GrammarCompiler.GrammarElement |
|---|
addToFirstSet, addToFirstSet, addToFirstSet, getFirstSet, getID, getName, getToken, isEqualByName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected GrammarTokenType oType
| Constructor Detail |
|---|
public Terminal(java.lang.String pstrLexeme,
int piID)
pstrLexeme - the spelling of the tokenpiID - corresponding integer ID
public Terminal(Token poToken,
int piID)
poToken - token element thatpiID - corresponding integer ID| Method Detail |
|---|
public boolean isToken(Token poToken)
poToken - parameter to compare token name against
true if the parameter's lexeme is
equal to this token's name; false otherwisepublic GrammarTokenType getType()
public boolean isTerminal()
GrammarElement
isTerminal in class GrammarElementtrueGrammarElement.isTerminal()public boolean isNonTerminal()
GrammarElement
isNonTerminal in class GrammarElementfalseGrammarElement.isNonTerminal()public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||