Class Reduction
Extends: System.Object
This class is used by the engine to hold a reduced rule. Rather than contain
a list of Symbols, a reduction contains a list of Tokens corresponding to the
the rule it represents. This class is important since it is used to store the
actual source program parsed by the Engine.
Public Properties | Returns the Rule that this Reduction represents.
|
| This is a general purpose field that can be used at the developer's leisure.
|
| Returns an ArrayList containing the Tokens in this reduction.
|
Public Methods | Makes the IGoldVisitor visit this Reduction.
|
| Makes the IGoldVisitor visit the children of this
Reduction.
|
| Returns the token with the specified index.
|
| Returns a string-representation of this Reduction.
|
Property Detail
ParentRule
public GoldParser.Rule ParentRule
{ get; set; }
Returns the Rule that this Reduction represents.
Tag
public object Tag
{ get; set; }
This is a general purpose field that can be used at the developer's leisure.
Tokens
public System.Collections.ArrayList Tokens
{ get; }
Returns an ArrayList containing the Tokens in this reduction.
Method Detail
Accept
public void Accept(GoldParser.IGoldVisitor p_visitor)Makes the IGoldVisitor visit this Reduction.
ExampleSee the GoldTest sample project.
ChildrenAccept
public void ChildrenAccept(GoldParser.IGoldVisitor p_visitor)Makes the IGoldVisitor visit the children of this
Reduction.
ExampleSee the GoldTest sample project.
GetToken
public GoldParser.Token GetToken(int p_index)Returns the token with the specified index.
ToString
public string ToString()Returns a string-representation of this Reduction.