Home
last modified time | relevance | path

Searched refs:CommonTree (Results 1 – 25 of 172) sorted by relevance

1234567

/external/antlr/antlr-3.4/tool/src/test/java/org/antlr/test/
DTestTrees.java32 import org.antlr.runtime.tree.CommonTree;
42 static class V extends CommonTree {
51 CommonTree t = new CommonTree(new CommonToken(101)); in testSingleNode()
57 CommonTree root_0 = (CommonTree)adaptor.nil(); in testTwoChildrenOfNilRoot()
58 CommonTree t = new V(101, 2); in testTwoChildrenOfNilRoot()
59 CommonTree u = new V(new CommonToken(102,"102")); in testTwoChildrenOfNilRoot()
70 CommonTree r0 = new CommonTree(new CommonToken(101)); in test4Nodes()
71 r0.addChild(new CommonTree(new CommonToken(102))); in test4Nodes()
72 r0.getChild(0).addChild(new CommonTree(new CommonToken(103))); in test4Nodes()
73 r0.addChild(new CommonTree(new CommonToken(104))); in test4Nodes()
[all …]
DTestTreeWizard.java30 import org.antlr.runtime.tree.CommonTree;
49 CommonTree t = (CommonTree)wiz.create("ID"); in testSingleNode()
57 CommonTree t = (CommonTree)wiz.create("ID[foo]"); in testSingleNodeWithArg()
65 CommonTree t = (CommonTree)wiz.create("(A)"); in testSingleNodeTree()
73 CommonTree t = (CommonTree)wiz.create("(A B C D)"); in testSingleLevelTree()
81 CommonTree t = (CommonTree)wiz.create("(nil A B C)"); in testListTree()
89 CommonTree t = (CommonTree)wiz.create("A B C"); in testInvalidListTree()
95 CommonTree t = (CommonTree)wiz.create("(A (B C) (B D) E)"); in testDoubleLevelTree()
103 CommonTree t = (CommonTree)wiz.create("ID"); in testSingleNodeIndex()
112 CommonTree t = (CommonTree)wiz.create("(A B C D)"); in testNoRepeatsIndex()
[all …]
DTestTreeNodeStream.java48 Tree t = new CommonTree(new CommonToken(101)); in testSingleNode()
62 Tree t = new CommonTree(new CommonToken(101)); in test4Nodes()
63 t.addChild(new CommonTree(new CommonToken(102))); in test4Nodes()
64 t.getChild(0).addChild(new CommonTree(new CommonToken(103))); in test4Nodes()
65 t.addChild(new CommonTree(new CommonToken(104))); in test4Nodes()
78 Tree root = new CommonTree((Token)null); in testList()
80 Tree t = new CommonTree(new CommonToken(101)); in testList()
81 t.addChild(new CommonTree(new CommonToken(102))); in testList()
82 t.getChild(0).addChild(new CommonTree(new CommonToken(103))); in testList()
83 t.addChild(new CommonTree(new CommonToken(104))); in testList()
[all …]
DTestTreeIterator.java43 CommonTree t = (CommonTree)wiz.create("A"); in testNode()
54 CommonTree t = (CommonTree)wiz.create("(nil A B)"); in testFlatAB()
65 CommonTree t = (CommonTree)wiz.create("(A B)"); in testAB()
76 CommonTree t = (CommonTree)wiz.create("(A B C)"); in testABC()
87 CommonTree t = (CommonTree)wiz.create("(A (B C))"); in testVerticalList()
98 CommonTree t = (CommonTree)wiz.create("(A (B (C D E) F) G)"); in testComplex()
109 CommonTree t = (CommonTree)wiz.create("(A (B (C D E) F) G)"); in testReset()
126 CommonTree n = (CommonTree)it.next(); in toString()
DTestBufferedTreeNodeStream.java32 import org.antlr.runtime.tree.CommonTree;
52 Tree r0 = new CommonTree(new CommonToken(101)); in testSeek()
53 Tree r1 = new CommonTree(new CommonToken(102)); in testSeek()
55 r1.addChild(new CommonTree(new CommonToken(103))); in testSeek()
56 Tree r2 = new CommonTree(new CommonToken(106)); in testSeek()
57 r2.addChild(new CommonTree(new CommonToken(107))); in testSeek()
59 r0.addChild(new CommonTree(new CommonToken(104))); in testSeek()
60 r0.addChild(new CommonTree(new CommonToken(105))); in testSeek()
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime.Tests/
DITreeFixture.cs44 using CommonTree = Antlr.Runtime.Tree.CommonTree; typedef
52 #region CommonTree Tests
57 CommonTree t = new CommonTree(new CommonToken(101)); in testSingleNode()
66 CommonTree r0 = new CommonTree(new CommonToken(101)); in test4Nodes()
67 r0.AddChild(new CommonTree(new CommonToken(102))); in test4Nodes()
68 r0.GetChild(0).AddChild(new CommonTree(new CommonToken(103))); in test4Nodes()
69 r0.AddChild(new CommonTree(new CommonToken(104))); in test4Nodes()
79 CommonTree r0 = new CommonTree((IToken)null); in testList()
80 CommonTree c0, c1, c2; in testList()
81 r0.AddChild(c0 = new CommonTree(new CommonToken(101))); in testList()
[all …]
DITreeNodeStreamFixture.cs45 using CommonTree = Antlr.Runtime.Tree.CommonTree; typedef
59 ITree t = new CommonTree(new CommonToken(101)); in testSingleNode()
77 ITree t = new CommonTree(new CommonToken(101)); in test4Nodes()
78 t.AddChild(new CommonTree(new CommonToken(102))); in test4Nodes()
79 t.GetChild(0).AddChild(new CommonTree(new CommonToken(103))); in test4Nodes()
80 t.AddChild(new CommonTree(new CommonToken(104))); in test4Nodes()
95 ITree root = new CommonTree((IToken)null); in testList()
97 ITree t = new CommonTree(new CommonToken(101)); in testList()
98 t.AddChild(new CommonTree(new CommonToken(102))); in testList()
99 t.GetChild(0).AddChild(new CommonTree(new CommonToken(103))); in testList()
[all …]
DRewriteRuleXxxxStreamFixture.cs202 CommonTree tree = (CommonTree) tokenTest.NextNode(); in CheckRRTokenStreamBehaviourWithElements()
277 CommonTree returnedTree = (CommonTree) subtreeTest.NextTree(); in CheckRRSubtreeStreamBehaviourWithElements()
293 returnedTree = (CommonTree) subtreeTest.NextTree(); in CheckRRSubtreeStreamBehaviourWithElements()
298 returnedTree = (CommonTree) subtreeTest.NextTree(); in CheckRRSubtreeStreamBehaviourWithElements()
322 CommonTree returnedTree = (CommonTree) nodeTest.NextNode(); in CheckRRNodeStreamBehaviourWithElements()
332 returnedTree = (CommonTree) nodeTest.NextTree(); in CheckRRNodeStreamBehaviourWithElements()
348 returnedTree = (CommonTree) nodeTest.NextTree(); in CheckRRNodeStreamBehaviourWithElements()
353 returnedTree = (CommonTree) nodeTest.NextTree(); in CheckRRNodeStreamBehaviourWithElements()
374 return new CommonTree(token); in CreateTree()
/external/antlr/antlr-3.4/runtime/Python/unittests/
Dtesttree.py7 from antlr3.tree import (CommonTreeNodeStream, CommonTree, CommonTreeAdaptor,
25 t = CommonTree(CommonToken(101))
38 class V(CommonTree):
71 t = CommonTree(CommonToken(101))
72 t.addChild(CommonTree(CommonToken(102)))
73 t.getChild(0).addChild(CommonTree(CommonToken(103)))
74 t.addChild(CommonTree(CommonToken(104)))
87 root = CommonTree(None)
89 t = CommonTree(CommonToken(101))
90 t.addChild(CommonTree(CommonToken(102)))
[all …]
/external/smali/smali/src/main/java/org/jf/smali/
DsmaliParser.java384 private CommonTree buildTree(int type, String text, List<CommonTree> children) { in buildTree()
385 CommonTree root = new CommonTree(new CommonToken(type, text)); in buildTree()
386 for (CommonTree child: children) { in buildTree()
442 private CommonTree parseParamList(CommonToken paramListToken) { in parseParamList()
444 CommonTree root = new CommonTree(); in parseParamList()
451 root.addChild(new CommonTree(token)); in parseParamList()
473 List<CommonTree> classAnnotations;
478 CommonTree tree;
480 public CommonTree getTree() { return tree; } in getTree()
491 CommonTree root_0 = null; in smali_file()
[all …]
DsmaliTreeWalker.java11 import org.antlr.runtime.tree.CommonTree;
556 CommonTree CLASS_DESCRIPTOR9=null; in class_spec()
563 …CLASS_DESCRIPTOR9=(CommonTree)match(input,CLASS_DESCRIPTOR,FOLLOW_CLASS_DESCRIPTOR_in_class_spec11… in class_spec()
594 CommonTree CLASS_DESCRIPTOR11=null; in super_spec()
602 …CLASS_DESCRIPTOR11=(CommonTree)match(input,CLASS_DESCRIPTOR,FOLLOW_CLASS_DESCRIPTOR_in_super_spec1… in super_spec()
630 CommonTree CLASS_DESCRIPTOR12=null; in implements_spec()
638 …CLASS_DESCRIPTOR12=(CommonTree)match(input,CLASS_DESCRIPTOR,FOLLOW_CLASS_DESCRIPTOR_in_implements_… in implements_spec()
791 CommonTree ACCESS_SPEC15=null; in access_list()
816 ACCESS_SPEC15=(CommonTree)match(input,ACCESS_SPEC,FOLLOW_ACCESS_SPEC_in_access_list266); in access_list()
979 CommonTree SIMPLE_NAME20=null; in field()
[all …]
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/
DStrip.java34 import org.antlr.runtime.tree.CommonTree;
67 CommonTree t = (CommonTree)r.getTree(); in parseAndRewrite()
72 public void rewrite(TreeAdaptor adaptor, CommonTree t, String[] tokenNames) throws Exception { in rewrite()
78 public void visit(Object t) { ACTION(tokens, (CommonTree)t); } in rewrite()
84 CommonTree a = (CommonTree)t; in rewrite()
85 CommonTree action = null; in rewrite()
86 if ( a.getChildCount()==2 ) action = (CommonTree)a.getChild(1); in rewrite()
87 else if ( a.getChildCount()==3 ) action = (CommonTree)a.getChild(2); in rewrite()
98 CommonTree a = (CommonTree)t; in rewrite()
99 a = (CommonTree)a.getChild(0); in rewrite()
[all …]
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime.Test/BuildOptions/
DProfileGrammarParser.cs129 internal CommonTree tree;
140 CommonTree root_0 = null; in prog()
162 root_0 = (CommonTree)adaptor.Nil(); in prog()
228 retval.tree = (CommonTree)adaptor.RulePostProcessing(root_0); in prog()
236 retval.tree = (CommonTree)adaptor.ErrorNode(input, retval.start, input.LT(-1), re); in prog()
261 internal CommonTree tree;
272 CommonTree root_0 = null; in stat()
284 CommonTree NEWLINE3_tree=null; in stat()
285 CommonTree ID4_tree=null; in stat()
286 CommonTree char_literal5_tree=null; in stat()
[all …]
DDebugGrammarParser.cs125 internal CommonTree tree;
136 CommonTree root_0 = null; in prog()
158 root_0 = (CommonTree)adaptor.Nil(); in prog()
224 retval.tree = (CommonTree)adaptor.RulePostProcessing(root_0); in prog()
232 retval.tree = (CommonTree)adaptor.ErrorNode(input, retval.start, input.LT(-1), re); in prog()
257 internal CommonTree tree;
268 CommonTree root_0 = null; in stat()
280 CommonTree NEWLINE3_tree=null; in stat()
281 CommonTree ID4_tree=null; in stat()
282 CommonTree char_literal5_tree=null; in stat()
[all …]
DDebugTreeGrammarHelper.cs42 private List<CommonTree> functionDefinitions;
52 public DebugTreeGrammar( CommonTreeNodeStream nodes, List<CommonTree> functionDefinitions ) in DebugTreeGrammar()
63 private DebugTreeGrammar( CommonTree function, in DebugTreeGrammar()
64 List<CommonTree> functionDefinitions, in DebugTreeGrammar()
78 private CommonTree findFunction( string name, BigInteger paramValue ) in findFunction()
80 foreach ( CommonTree f in functionDefinitions ) in findFunction()
86 CommonTree formalPar = (CommonTree)f.GetChild( 1 ); in findFunction()
DProfileTreeGrammarHelper.cs42 private List<CommonTree> functionDefinitions;
52 public ProfileTreeGrammar( CommonTreeNodeStream nodes, List<CommonTree> functionDefinitions ) in ProfileTreeGrammar()
63 private ProfileTreeGrammar( CommonTree function, in ProfileTreeGrammar()
64 List<CommonTree> functionDefinitions, in ProfileTreeGrammar()
78 private CommonTree findFunction( string name, BigInteger paramValue ) in findFunction()
80 foreach ( CommonTree f in functionDefinitions ) in findFunction()
86 CommonTree formalPar = (CommonTree)f.GetChild( 1 ); in findFunction()
DDebugTreeGrammar.cs209 CommonTree ID2=null; in stat()
301 ID2=(CommonTree)Match(input,ID,Follow._ID_in_stat100); in stat()
430 CommonTree ID4=null; in expr()
431 CommonTree INT5=null; in expr()
664 ID4=(CommonTree)Match(input,ID,Follow._ID_in_expr311); in expr()
676 INT5=(CommonTree)Match(input,INT,Follow._INT_in_expr347); in expr()
733 CommonTree ID8=null; in call()
759 ID8=(CommonTree)Match(input,ID,Follow._ID_in_call432); in call()
770CommonTree funcRoot = findFunction((ID8!=null?ID8.Text:null), p); in call()
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/
DCommonTree.cs46 public class CommonTree : BaseTree { class
60 CommonTree parent;
65 public CommonTree() { in CommonTree() method in Antlr.Runtime.Tree.CommonTree
68 public CommonTree(CommonTree node) in CommonTree() method in Antlr.Runtime.Tree.CommonTree
78 public CommonTree(IToken t) { in CommonTree() method in Antlr.Runtime.Tree.CommonTree
129 parent = (CommonTree)value;
185 return new CommonTree(this); in DupNode()
202 ((CommonTree)Children[i]).SetUnknownTokenBoundaries(); in SetUnknownTokenBoundaries()
207 CommonTree firstChild = (CommonTree)Children[0]; in SetUnknownTokenBoundaries()
208 CommonTree lastChild = (CommonTree)Children[Children.Count - 1]; in SetUnknownTokenBoundaries()
/external/antlr/antlr-3.4/runtime/Java/src/main/java/org/antlr/runtime/tree/
DCommonTree.java38 public class CommonTree extends BaseTree { class
48 public CommonTree parent;
53 public CommonTree() { } in CommonTree() method in CommonTree
55 public CommonTree(CommonTree node) { in CommonTree() method in CommonTree
62 public CommonTree(Token t) { in CommonTree() method in CommonTree
71 return new CommonTree(this); in dupNode()
146 ((CommonTree)children.get(i)).setUnknownTokenBoundaries(); in setUnknownTokenBoundaries()
150 CommonTree firstChild = (CommonTree)children.get(0); in setUnknownTokenBoundaries()
151 CommonTree lastChild = (CommonTree)children.get(children.size()-1); in setUnknownTokenBoundaries()
166 this.parent = (CommonTree)t; in setParent()
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime/Tree/
DCommonTree.cs46 public class CommonTree : BaseTree class
60 CommonTree parent;
65 public CommonTree() in CommonTree() method in Antlr.Runtime.Tree.CommonTree
69 public CommonTree( CommonTree node ) in CommonTree() method in Antlr.Runtime.Tree.CommonTree
80 public CommonTree( IToken t ) in CommonTree() method in Antlr.Runtime.Tree.CommonTree
158 parent = (CommonTree)value;
242 return new CommonTree( this ); in DupNode()
263 CommonTree commonTree = childTree as CommonTree; in SetUnknownTokenBoundaries()
DCommonTreeAdaptor.cs54 return new CommonTree( payload ); in Create()
105 if ( t is CommonTree ) in GetToken()
107 return ( (CommonTree)t ).Token; in GetToken()
/external/antlr/antlr-3.4/runtime/Ruby/test/unit/
Dtest-trees.rb21 t = CommonTree.new(CommonToken.new { |t| t.type = 101 })
36 v = Class.new(CommonTree) do
60 t = CommonTree.new CommonToken[101]
61 t.add_child( CommonTree.new CommonToken[102] )
62 t.child(0).add_child(CommonTree.new CommonToken[103])
63 t.add_child(CommonTree.new CommonToken[104])
77 root = CommonTree.new(nil)
78 t = CommonTree.new CommonToken[101]
79 t.add_child CommonTree.new(CommonToken[102])
80 t.child(0).add_child(CommonTree.new(CommonToken[103]))
[all …]
/external/antlr/antlr-3.4/runtime/JavaScript/src/org/antlr/runtime/tree/
DCommonTree.js7 org.antlr.runtime.tree.CommonTree = function(node) { class in org.antlr.runtime.tree
23 if (node instanceof org.antlr.runtime.tree.CommonTree) {
24 org.antlr.runtime.tree.CommonTree.superclass.constructor.call(this, node);
34 org.antlr.lang.extend(org.antlr.runtime.tree.CommonTree, org.antlr.runtime.tree.BaseTree, {
40 return new org.antlr.runtime.tree.CommonTree(this);
135 new org.antlr.runtime.tree.CommonTree(org.antlr.runtime.Token.INVALID_TOKEN);
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime.Test/Composition/
DProgram.cs40 IAstRuleReturnScope<CommonTree> r = g.prog(); in _Main()
41 CommonTree t = r.Tree; in _Main()
45 t = (CommonTree)simplify.Downup(t); in _Main()
48 t = (CommonTree)reduce.Downup(t); in _Main()
/external/antlr/antlr-3.4/runtime/ActionScript/project/src/org/antlr/runtime/tree/
DCommonTree.as38 public class CommonTree extends BaseTree { class in org.antlr.runtime.tree
48 protected var _parent:CommonTree;
53 public function CommonTree(node:CommonTree = null) { method in org.antlr.runtime.tree.CommonTree
62 public static function createFromToken(t:Token):CommonTree {
63 var ct:CommonTree = new CommonTree();
73 return new CommonTree(this);
145 this._parent = CommonTree(t);

1234567