CommonTreeAdaptor Class |
Namespace: Stimulsoft.Data.Expressions.Antlr.Runtime.Tree
The CommonTreeAdaptor type exposes the following members.
Name | Description | |
---|---|---|
![]() | CommonTreeAdaptor | Initializes a new instance of the CommonTreeAdaptor class |
Name | Description | |
---|---|---|
![]() | AddChild |
Add a child to the tree t. If child is a flat tree (a list), make all
in list children of t. Warning: if t has no children, but child does
and child isNil then you can decide it is ok to move children to t via
t.children = child.children; i.e., without copying the array. Just
make sure that this is consistent with have the user will build
ASTs.
(Inherited from BaseTreeAdaptor.) |
![]() | BecomeRoot(Object, Object) |
If oldRoot is a nil root, just copy or move the children to newRoot.
If not a nil root, make oldRoot a child of newRoot.
(Inherited from BaseTreeAdaptor.) |
![]() | BecomeRoot(IToken, Object) | (Inherited from BaseTreeAdaptor.) |
![]() | Create(IToken) | (Overrides BaseTreeAdaptorCreate(IToken).) |
![]() | Create(Int32, IToken) | (Inherited from BaseTreeAdaptor.) |
![]() | Create(Int32, String) | (Inherited from BaseTreeAdaptor.) |
![]() | Create(IToken, String) | (Inherited from BaseTreeAdaptor.) |
![]() | Create(Int32, IToken, String) | (Inherited from BaseTreeAdaptor.) |
![]() | CreateToken(IToken) |
Tell me how to create a token for use with imaginary token nodes.
For example, there is probably no input symbol associated with imaginary
token DECL, but you need to create it as a payload or whatever for
the DECL node as in ^(DECL type ID).
(Overrides BaseTreeAdaptorCreateToken(IToken).) |
![]() | CreateToken(Int32, String) |
Tell me how to create a token for use with imaginary token nodes.
For example, there is probably no input symbol associated with imaginary
token DECL, but you need to create it as a payload or whatever for
the DECL node as in ^(DECL type ID).
(Overrides BaseTreeAdaptorCreateToken(Int32, String).) |
![]() | DeleteChild | (Inherited from BaseTreeAdaptor.) |
![]() | DupNode(Object) |
Duplicate a node. This is part of the factory;
override if you want another kind of node to be built.
(Inherited from BaseTreeAdaptor.) |
![]() | DupNode(Int32, Object) | (Inherited from BaseTreeAdaptor.) |
![]() | DupNode(Object, String) | (Inherited from BaseTreeAdaptor.) |
![]() | DupNode(Int32, Object, String) | (Inherited from BaseTreeAdaptor.) |
![]() | DupTree(Object) | (Inherited from BaseTreeAdaptor.) |
![]() | DupTree(Object, Object) |
This is generic in the sense that it will work with any kind of
tree (not just ITree interface). It invokes the adaptor routines
not the tree node routines to do the construction.
(Inherited from BaseTreeAdaptor.) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | ErrorNode |
Create tree node that holds the start and stop tokens associated
with an error.
(Inherited from BaseTreeAdaptor.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetChild | (Inherited from BaseTreeAdaptor.) |
![]() | GetChildCount | (Inherited from BaseTreeAdaptor.) |
![]() | GetChildIndex | (Inherited from BaseTreeAdaptor.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetParent | (Inherited from BaseTreeAdaptor.) |
![]() | GetText | (Inherited from BaseTreeAdaptor.) |
![]() | GetToken |
What is the Token associated with this node? If
you are not using CommonTree, then you must
override this in your own adaptor.
(Overrides BaseTreeAdaptorGetToken(Object).) |
![]() | GetTokenStartIndex | (Inherited from BaseTreeAdaptor.) |
![]() | GetTokenStopIndex | (Inherited from BaseTreeAdaptor.) |
![]() | GetTree | (Inherited from BaseTreeAdaptor.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetType(Object) | (Inherited from BaseTreeAdaptor.) |
![]() | GetUniqueID | (Inherited from BaseTreeAdaptor.) |
![]() | IsNil | (Inherited from BaseTreeAdaptor.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | Nil | (Inherited from BaseTreeAdaptor.) |
![]() | ReplaceChildren | (Inherited from BaseTreeAdaptor.) |
![]() | RulePostProcessing | Transform ^(nil x) to x and nil to null (Inherited from BaseTreeAdaptor.) |
![]() | SetChild | (Inherited from BaseTreeAdaptor.) |
![]() | SetChildIndex | (Inherited from BaseTreeAdaptor.) |
![]() | SetParent | (Inherited from BaseTreeAdaptor.) |
![]() | SetText | (Inherited from BaseTreeAdaptor.) |
![]() | SetTokenBoundaries |
Track start/stop token for subtree root created for a rule.
Only works with Tree nodes. For rules that match nothing,
seems like this will yield start=i and stop=i-1 in a nil node.
Might be useful info so I'll not force to be i..i.
(Inherited from BaseTreeAdaptor.) |
![]() | SetType | (Inherited from BaseTreeAdaptor.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() | treeToUniqueIDMap |
System.identityHashCode() is not always unique; we have to
track ourselves. That's ok, it's only for debugging, though it's
expensive: we have to create a hashtable with all tree nodes in it.
(Inherited from BaseTreeAdaptor.) |
![]() | uniqueNodeID | (Inherited from BaseTreeAdaptor.) |