|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectGrammarRule
A GrammarRule consists of a left-hand side (a single Constituent, the ``product'' or ``mother'' of the rule), and a right-hand side (a list of Constituents, the ``preconditions'' or ``daughters'' of the rule). GrammarRules also have an id for use in tracing, etc.
Field Summary | |
(package private) Symbol |
id
The id of this GrammarRule. |
(package private) Constituent |
lhs
The left-hand side of this GrammarRule. |
(package private) java.util.List |
rhs
The right-hand side of this GrammarRule. |
Constructor Summary | |
GrammarRule(Symbol id,
Constituent lhs,
java.util.List rhs)
Create a new GrammarRule with given parameters. |
Method Summary | |
Symbol |
getId()
Return the id of this GrammarRule. |
Constituent |
getLhs()
Return the left-hand side of this GrammarRule (a Constituent). |
java.util.List |
getRhs()
Return the right-hand side of this GrammarRule (a List of Constituents). |
java.lang.String |
toString()
Returns the printable representation of this GrammarRule. |
java.lang.String |
toString(int next)
Returns the printable representation of this GrammarRule with the ``index'' marker at position NEXT of the rhs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
Symbol id
Constituent lhs
java.util.List rhs
Constructor Detail |
public GrammarRule(Symbol id, Constituent lhs, java.util.List rhs)
Method Detail |
public Symbol getId()
public Constituent getLhs()
public java.util.List getRhs()
public java.lang.String toString()
public java.lang.String toString(int next)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |