

Public Member Functions | |
| BaseTree () | |
| BaseTree (ITree node) | |
| Create a new node from an existing node does nothing for BaseTree as there are no fields other than the children list, which cannot be copied as the children are not considered part of this node. | |
| virtual ITree | GetChild (int i) |
| virtual void | AddChild (ITree t) |
| Add t as child of this node. | |
| void | AddChildren (IList kids) |
| Add all elements of kids list as children of this node. | |
| virtual void | SetChild (int i, ITree t) |
| Set ith child (0..n-1) to t; t must be non-null and non-nil node. | |
| virtual object | DeleteChild (int i) |
| virtual void | ReplaceChildren (int startChildIndex, int stopChildIndex, object t) |
| Delete children from start to stop and replace with t even if t is a list (nil-root tree). | |
| virtual void | FreshenParentAndChildIndexes () |
| Set the parent and child index values for all child of t. | |
| virtual void | FreshenParentAndChildIndexes (int offset) |
| virtual void | SanityCheckParentAndChildIndexes () |
| virtual void | SanityCheckParentAndChildIndexes (ITree parent, int i) |
| virtual string | ToStringTree () |
| Print out a whole tree not just a node. | |
| abstract override string | ToString () |
| Force base classes override and say how a node (not a tree) should look as text. | |
| abstract ITree | DupNode () |
Protected Member Functions | |
| virtual internal IList | CreateChildrenList () |
| Override in a subclass to change the impl of children list. | |
Protected Attributes | |
| IList | children |
Properties | |
| virtual int | ChildCount [get] |
| virtual bool | IsNil [get] |
| Indicates the node is a nil node but may still have children, meaning the tree is a flat list. | |
| virtual int | Line [get] |
| In case we don't have a token payload, what is the line for errors? | |
| virtual int | CharPositionInLine [get] |
| IList | Children [get] |
| Get the children internal list of children. Manipulating the list directly is not a supported operation (i.e. you do so at your own risk). | |
| virtual int | ChildIndex [get, set] |
| BaseTree doesn't track child indexes. | |
| virtual ITree | Parent [get, set] |
| BaseTree doesn't track parent pointers. | |
| abstract int | Type [get] |
| Return a token type; needed for tree parsing. | |
| abstract int | TokenStartIndex [get, set] |
| What is the smallest token index (indexing from 0) for this node and its children? | |
| abstract int | TokenStopIndex [get, set] |
| What is the largest token index (indexing from 0) for this node and its children? | |
| abstract string | Text [get] |
Definition at line 49 of file BaseTree.cs.
| Antlr.Runtime.Tree.BaseTree.BaseTree | ( | ) |
Definition at line 51 of file BaseTree.cs.
| Antlr.Runtime.Tree.BaseTree.BaseTree | ( | ITree | node | ) |
Create a new node from an existing node does nothing for BaseTree as there are no fields other than the children list, which cannot be copied as the children are not considered part of this node.
Definition at line 59 of file BaseTree.cs.
| virtual ITree Antlr.Runtime.Tree.BaseTree.GetChild | ( | int | i | ) | [virtual] |
| virtual void Antlr.Runtime.Tree.BaseTree.AddChild | ( | ITree | t | ) | [virtual] |
Add t as child of this node.
Warning: if t has no children, but child does and child isNil then this routine moves children to t via t.children = child.children; i.e., without copying the array.
| t |
Implements Antlr.Runtime.Tree.ITree.
Definition at line 119 of file BaseTree.cs.
| void Antlr.Runtime.Tree.BaseTree.AddChildren | ( | IList | kids | ) |
Add all elements of kids list as children of this node.
| kids |
Definition at line 174 of file BaseTree.cs.
| virtual void Antlr.Runtime.Tree.BaseTree.SetChild | ( | int | i, | |
| ITree | t | |||
| ) | [virtual] |
Set ith child (0..n-1) to t; t must be non-null and non-nil node.
Implements Antlr.Runtime.Tree.ITree.
Definition at line 183 of file BaseTree.cs.
| virtual object Antlr.Runtime.Tree.BaseTree.DeleteChild | ( | int | i | ) | [virtual] |
| virtual void Antlr.Runtime.Tree.BaseTree.ReplaceChildren | ( | int | startChildIndex, | |
| int | stopChildIndex, | |||
| object | t | |||
| ) | [virtual] |
Delete children from start to stop and replace with t even if t is a list (nil-root tree).
Number of children can increase or decrease. For huge child lists, inserting children can force walking rest of children to set their childindex; could be slow.
Implements Antlr.Runtime.Tree.ITree.
Definition at line 224 of file BaseTree.cs.
| virtual internal IList Antlr.Runtime.Tree.BaseTree.CreateChildrenList | ( | ) | [protected, virtual] |
Override in a subclass to change the impl of children list.
Definition at line 300 of file BaseTree.cs.
| virtual void Antlr.Runtime.Tree.BaseTree.FreshenParentAndChildIndexes | ( | ) | [virtual] |
Set the parent and child index values for all child of t.
Implements Antlr.Runtime.Tree.ITree.
Definition at line 306 of file BaseTree.cs.
| virtual void Antlr.Runtime.Tree.BaseTree.FreshenParentAndChildIndexes | ( | int | offset | ) | [virtual] |
Definition at line 311 of file BaseTree.cs.
| virtual void Antlr.Runtime.Tree.BaseTree.SanityCheckParentAndChildIndexes | ( | ) | [virtual] |
Definition at line 322 of file BaseTree.cs.
| virtual void Antlr.Runtime.Tree.BaseTree.SanityCheckParentAndChildIndexes | ( | ITree | parent, | |
| int | i | |||
| ) | [virtual] |
Definition at line 327 of file BaseTree.cs.
| virtual string Antlr.Runtime.Tree.BaseTree.ToStringTree | ( | ) | [virtual] |
Print out a whole tree not just a node.
Implements Antlr.Runtime.Tree.ITree.
Definition at line 362 of file BaseTree.cs.
| abstract override string Antlr.Runtime.Tree.BaseTree.ToString | ( | ) | [pure virtual] |
Force base classes override and say how a node (not a tree) should look as text.
Implements Antlr.Runtime.Tree.ITree.
Implemented in Antlr.Runtime.Debug.RemoteDebugEventSocketListener.ProxyTree, Antlr.Runtime.CommonErrorNode, Antlr.Runtime.Tree.CommonTree, Antlr.Runtime.Tree.ParseTree, and Antlr.Runtime.Tree.TreeWizard.TreePattern.
| abstract ITree Antlr.Runtime.Tree.BaseTree.DupNode | ( | ) | [pure virtual] |
Implements Antlr.Runtime.Tree.ITree.
Implemented in Antlr.Runtime.Debug.RemoteDebugEventSocketListener.ProxyTree, Antlr.Runtime.Tree.CommonTree, and Antlr.Runtime.Tree.ParseTree.
IList Antlr.Runtime.Tree.BaseTree.children [protected] |
Definition at line 90 of file BaseTree.cs.
virtual int Antlr.Runtime.Tree.BaseTree.ChildCount [get] |
virtual bool Antlr.Runtime.Tree.BaseTree.IsNil [get] |
Indicates the node is a nil node but may still have children, meaning the tree is a flat list.
Implements Antlr.Runtime.Tree.ITree.
Reimplemented in Antlr.Runtime.CommonErrorNode, and Antlr.Runtime.Tree.CommonTree.
Definition at line 76 of file BaseTree.cs.
virtual int Antlr.Runtime.Tree.BaseTree.Line [get] |
In case we don't have a token payload, what is the line for errors?
Implements Antlr.Runtime.Tree.ITree.
Reimplemented in Antlr.Runtime.Tree.CommonTree.
Definition at line 81 of file BaseTree.cs.
virtual int Antlr.Runtime.Tree.BaseTree.CharPositionInLine [get] |
Implements Antlr.Runtime.Tree.ITree.
Reimplemented in Antlr.Runtime.Tree.CommonTree.
Definition at line 86 of file BaseTree.cs.
IList Antlr.Runtime.Tree.BaseTree.Children [get] |
Get the children internal list of children. Manipulating the list directly is not a supported operation (i.e. you do so at your own risk).
Definition at line 106 of file BaseTree.cs.
virtual int Antlr.Runtime.Tree.BaseTree.ChildIndex [get, set] |
BaseTree doesn't track child indexes.
Implements Antlr.Runtime.Tree.ITree.
Reimplemented in Antlr.Runtime.Tree.CommonTree.
Definition at line 347 of file BaseTree.cs.
virtual ITree Antlr.Runtime.Tree.BaseTree.Parent [get, set] |
BaseTree doesn't track parent pointers.
Implements Antlr.Runtime.Tree.ITree.
Reimplemented in Antlr.Runtime.Tree.CommonTree.
Definition at line 354 of file BaseTree.cs.
abstract int Antlr.Runtime.Tree.BaseTree.Type [get] |
Return a token type; needed for tree parsing.
Implements Antlr.Runtime.Tree.ITree.
Reimplemented in Antlr.Runtime.Debug.RemoteDebugEventSocketListener.ProxyTree, Antlr.Runtime.CommonErrorNode, Antlr.Runtime.Tree.CommonTree, and Antlr.Runtime.Tree.ParseTree.
Definition at line 400 of file BaseTree.cs.
abstract int Antlr.Runtime.Tree.BaseTree.TokenStartIndex [get, set] |
What is the smallest token index (indexing from 0) for this node and its children?
Implements Antlr.Runtime.Tree.ITree.
Reimplemented in Antlr.Runtime.Debug.RemoteDebugEventSocketListener.ProxyTree, Antlr.Runtime.Tree.CommonTree, and Antlr.Runtime.Tree.ParseTree.
Definition at line 405 of file BaseTree.cs.
abstract int Antlr.Runtime.Tree.BaseTree.TokenStopIndex [get, set] |
What is the largest token index (indexing from 0) for this node and its children?
Implements Antlr.Runtime.Tree.ITree.
Reimplemented in Antlr.Runtime.Debug.RemoteDebugEventSocketListener.ProxyTree, Antlr.Runtime.Tree.CommonTree, and Antlr.Runtime.Tree.ParseTree.
Definition at line 411 of file BaseTree.cs.
abstract string Antlr.Runtime.Tree.BaseTree.Text [get] |
Implements Antlr.Runtime.Tree.ITree.
Reimplemented in Antlr.Runtime.Debug.RemoteDebugEventSocketListener.ProxyTree, Antlr.Runtime.CommonErrorNode, Antlr.Runtime.Tree.CommonTree, and Antlr.Runtime.Tree.ParseTree.
Definition at line 417 of file BaseTree.cs.
1.5.5