|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--goldengine.java.Reduction
-------------------------------------------------------------------------------------------
Source File: Reduction.java
Author: Devin Cook, Matthew Hawkins
Description: A representation of a Reduction. An instance of this class will hold
the resulting parse tree once created, and if the source file has been
accepted.
-------------------------------------------------------------------------------------------
Revision List
Author Version Description
------ ------- -----------
MPH 1.0 First Issue
| Constructor Summary | |
Reduction()
|
|
| Method Summary | |
Rule |
getParentRule()
getParentRule This method returns the rule associated with this Reduction. |
int |
getTag()
getTag Will return the tag associated with this Reduction. |
Token |
getToken(int index)
getToken Will retrieve a Token at the specified index. |
int |
getTokenCount()
getTokenCount This method returns the number of tokens. |
void |
setParentRule(Rule newRule)
setParentRule Will set the Rule of this Reduction to the one passed in. |
void |
setTag(int value)
setTag Will set the tag of this Reduction to that passed in. |
void |
setToken(int index,
Token value)
setToken Will place a Token at the specified index. |
void |
setTokenCount(int value)
setTokenCount This method implicitly sets the number of tokens in this Reduction. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Reduction()
| Method Detail |
public void setTokenCount(int value)
value - The number of tokens in this reduction.public int getTokenCount()
public Rule getParentRule()
public int getTag()
public void setParentRule(Rule newRule)
newRule - The parent Rule of this Reduction.public void setTag(int value)
value - The value of the tag.public Token getToken(int index)
index - The index of the token in this Reduction.
public void setToken(int index,
Token value)
index - The index to place the token at.value - The token to set at the index.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||