|
Grammatica 1.5 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
System.Object
|
+--Node
in Node.csAn abstract parse tree node. This class is inherited by all nodes in the parse tree, i.e. by the token and production classes.
| Field Summary | |
virtual int |
Count
The child node count property (read-only). |
virtual int |
EndColumn
The column number property of the last character in this node (read-only). |
virtual int |
EndLine
The line number property of the last character in this node (read-only). |
abstract int |
Id
The node type id property (read-only). |
abstract string |
Name
The node name property (read-only). |
Node |
Parent
The parent node property (read-only). |
virtual int |
StartColumn
The column number property of the first character in this node (read-only). |
virtual int |
StartLine
The line number property of the first character in this node (read-only). |
virtual Node[ int index ] |
this
The child node index (read-only). |
ArrayList |
Values
The node values property. |
| Method Summary | |
void |
AddValue( object value )
Deprecated. Use the Values property and the Values.Add method instead. |
void |
AddValues( ArrayList values )
Deprecated. Use the Values property and the Values.AddRange method instead. |
ArrayList |
GetAllValues()
Deprecated. Use the Values property instead. Note that the Values property will never be null, but possibly empty. |
virtual Node |
GetChildAt( int index )
Deprecated. Use the class indexer instead. |
virtual int |
GetChildCount()
Deprecated. Use the Count property instead. |
int |
GetDescendantCount()
Returns the number of descendant nodes. |
virtual int |
GetEndColumn()
Deprecated. Use the EndColumn property instead. |
virtual int |
GetEndLine()
Deprecated. Use the EndLine property instead. |
virtual int |
GetId()
Deprecated. Use the Id property instead. |
virtual string |
GetName()
Deprecated. Use the Name property instead. |
Node |
GetParent()
Deprecated. Use the Parent property instead. |
virtual int |
GetStartColumn()
Deprecated. Use the StartColumn property instead. |
virtual int |
GetStartLine()
Deprecated. Use the StartLine property instead. |
object |
GetValue( int pos )
Deprecated. Use the Values property and it's array indexer instead. |
int |
GetValueCount()
Deprecated. Use the Values and Values.Count properties instead. |
internal virtual bool |
IsHidden()
Checks if this node is hidden, i. |
void |
PrintTo( TextWriter output )
Prints this node and all subnodes to the specified output stream. |
void |
RemoveAllValues()
Deprecated. Use the Values property and the Values.Clear method instead. Alternatively the Values property can be set to null. |
internal void |
SetParent( Node parent )
Sets the parent node. |
| Field Detail |
public virtual int Count;
public virtual int EndColumn;
public virtual int EndLine;
public abstract int Id;
public abstract string Name;
public Node Parent;
public virtual int StartColumn;
public virtual int StartLine;
public virtual Node this[ int index ];
index - the child index, 0 <= index < Countpublic ArrayList Values;
| Method Detail |
public void AddValue( object value );
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 valueValuespublic void AddValues( ArrayList values );
Adds a set of computed values to this node.
values - the vector with node valuesValuespublic ArrayList GetAllValues();
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).
Valuespublic virtual Node GetChildAt( int index );
Returns the child node with the specified index.
index - the child index, 0 <= index < countpublic virtual int GetChildCount();
Returns the number of child nodes.
public int GetDescendantCount();
public virtual int GetEndColumn();
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.
EndColumnpublic virtual int GetEndLine();
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.
EndLinepublic virtual int GetId();
Returns the node type id. This value is set as a unique identifier for each type of node, in order to simplify later identification.
Idpublic virtual string GetName();
Returns the node name.
Namepublic Node GetParent();
Returns the parent node.
Parentpublic virtual int GetStartColumn();
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.
StartColumnpublic virtual int GetStartLine();
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.
StartLinepublic object GetValue( int pos );
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 < countValuespublic int GetValueCount();
Returns the number of computed values associated with this node. Any number of values can be associated with a node through calls to AddValue().
Valuesinternal virtual bool IsHidden();
public void PrintTo( TextWriter output );
output - the output stream to usepublic void RemoveAllValues();
Removes all computed values stored in this node.
Valuesinternal void SetParent( Node parent );
parent - the new parent node
|
Grammatica 1.5 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||