Grammatica
|
An abstract parse tree node. More...
Public Member Functions | |
virtual int | GetId () |
Returns the node type id. More... | |
virtual string | GetName () |
Returns the node name. More... | |
virtual int | GetStartLine () |
The line number of the first character in this node. More... | |
virtual int | GetStartColumn () |
The column number of the first character in this node. More... | |
virtual int | GetEndLine () |
The line number of the last character in this node. More... | |
virtual int | GetEndColumn () |
The column number of the last character in this node. More... | |
Node | GetParent () |
Returns the parent node. More... | |
virtual int | GetChildCount () |
Returns the number of child nodes. More... | |
int | GetDescendantCount () |
Returns the number of descendant nodes. More... | |
virtual Node | GetChildAt (int index) |
Returns the child node with the specified index. More... | |
int | GetValueCount () |
Returns the number of computed values associated with this node. More... | |
object | GetValue (int pos) |
Returns a computed value of this node, if previously set. More... | |
ArrayList | GetAllValues () |
Returns the list with all the computed values for this node. More... | |
void | AddValue (object value) |
Adds a computed value to this node. More... | |
void | AddValues (ArrayList values) |
Adds a set of computed values to this node. More... | |
void | RemoveAllValues () |
Removes all computed values stored in this node. More... | |
void | PrintTo (TextWriter output) |
Prints this node and all subnodes to the specified output stream. More... | |
Properties | |
abstract int | Id [get] |
The node type id property (read-only). More... | |
abstract string | Name [get] |
The node name property (read-only). More... | |
virtual int | StartLine [get] |
The line number property of the first character in this node (read-only). More... | |
virtual int | StartColumn [get] |
The column number property of the first character in this node (read-only). More... | |
virtual int | EndLine [get] |
The line number property of the last character in this node (read-only). More... | |
virtual int | EndColumn [get] |
The column number property of the last character in this node (read-only). More... | |
Node | Parent [get] |
The parent node property (read-only). More... | |
virtual int | Count [get] |
The child node count property (read-only). More... | |
virtual Node | this[int index] [get] |
The child node index (read-only). More... | |
ArrayList | Values [get, set] |
The node values property. More... | |
An abstract parse tree node.
This class is inherited by all nodes in the parse tree, i.e. by the token and production classes.
|
inline |
Adds a computed value to this node.
The computed value may be used for storing intermediate results in the parse tree during analysis.
value | the node value |
|
inline |
Adds a set of computed values to this node.
values | the vector with node values |
|
inline |
Returns the list with all the computed values for this node.
Note that the list is not a copy, so changes will affect the values in this node (as it is the same object).
|
inlinevirtual |
Returns the child node with the specified index.
index | the child index, 0 <= index < count |
|
inlinevirtual |
Returns the number of child nodes.
|
inline |
Returns the number of descendant nodes.
|
inlinevirtual |
The column number of the last character in this node.
If the node has child elements, this value will be fetched from the last child.
|
inlinevirtual |
The line number of the last character in this node.
If the node has child elements, this value will be fetched from the last child.
|
inlinevirtual |
Returns the node type id.
This value is set as a unique identifier for each type of node, in order to simplify later identification.
|
inlinevirtual |
|
inline |
Returns the parent node.
|
inlinevirtual |
The column number of the first character in this node.
If the node has child elements, this value will be fetched from the first child.
|
inlinevirtual |
The line number of the first character in this node.
If the node has child elements, this value will be fetched from the first child.
|
inline |
Returns a computed value of this node, if previously set.
A value may be used for storing intermediate results in the parse tree during analysis.
pos | the value position, 0 <= pos < count |
|
inline |
Returns the number of computed values associated with this node.
Any number of values can be associated with a node through calls to AddValue().
|
inline |
Prints this node and all subnodes to the specified output stream.
output | the output stream to use |
|
inline |
Removes all computed values stored in this node.
|
get |
The child node count property (read-only).
|
get |
The column number property of the last character in this node (read-only).
If the node has child elements, this value will be fetched from the last child.
|
get |
The line number property of the last character in this node (read-only).
If the node has child elements, this value will be fetched from the last child.
|
get |
The node type id property (read-only).
This value is set as a unique identifier for each type of node, in order to simplify later identification.
|
get |
The node name property (read-only).
|
get |
The parent node property (read-only).
|
get |
The column number property of the first character in this node (read-only).
If the node has child elements, this value will be fetched from the first child.
|
get |
The line number property of the first character in this node (read-only).
If the node has child elements, this value will be fetched from the first child.
|
get |
The child node index (read-only).
index | the child index, 0 <= index < Count |
|
getset |
The node values property.
This property provides direct access to the list of computed values associated with this node during analysis. Note that setting this property to null will remove all node values. Any operation on the value array list is allowed and is immediately reflected through the various value reading and manipulation methods.