

Public Member Functions | |
| def | nextNode |
| def | toTree |
| Ensure stream emits trees; tokens must be converted to AST nodes. | |
| def | dup |
| When constructing trees, sometimes we need to dup a token or AST subtree. | |
This is the analog of RewriteRuleTokenStream for normal parsers.
Definition at line 2787 of file tree.py.
| def antlr3.tree.RewriteRuleNodeStream.toTree | ( | self, | ||
| el | ||||
| ) |
Ensure stream emits trees; tokens must be converted to AST nodes.
AST nodes can be passed through unmolested.
Reimplemented from antlr3.tree.RewriteRuleElementStream.
| def antlr3.tree.RewriteRuleNodeStream.dup | ( | self, | ||
| el | ||||
| ) |
When constructing trees, sometimes we need to dup a token or AST subtree.
Dup'ing a token means just creating another AST node around it. For trees, you must call the adaptor.dupTree() unless the element is for a tree root; then it must be a node dup.
Reimplemented from antlr3.tree.RewriteRuleElementStream.
1.5.5