/external/antlr/tool/src/test/java/org/antlr/test/ |
D | TestTrees.java | 32 import org.antlr.runtime.tree.CommonTree; 44 static class V extends CommonTree { 54 CommonTree t = new CommonTree(new CommonToken(101)); in testSingleNode() 60 CommonTree root_0 = (CommonTree)adaptor.nil(); in testTwoChildrenOfNilRoot() 61 CommonTree t = new V(101, 2); in testTwoChildrenOfNilRoot() 62 CommonTree u = new V(new CommonToken(102,"102")); in testTwoChildrenOfNilRoot() 73 CommonTree r0 = new CommonTree(new CommonToken(101)); in test4Nodes() 74 r0.addChild(new CommonTree(new CommonToken(102))); in test4Nodes() 75 r0.getChild(0).addChild(new CommonTree(new CommonToken(103))); in test4Nodes() 76 r0.addChild(new CommonTree(new CommonToken(104))); in test4Nodes() [all …]
|
D | TestTreeWizard.java | 30 import org.antlr.runtime.tree.CommonTree; 50 CommonTree t = (CommonTree)wiz.create("ID"); in testSingleNode() 58 CommonTree t = (CommonTree)wiz.create("ID[foo]"); in testSingleNodeWithArg() 66 CommonTree t = (CommonTree)wiz.create("(A)"); in testSingleNodeTree() 74 CommonTree t = (CommonTree)wiz.create("(A B C D)"); in testSingleLevelTree() 82 CommonTree t = (CommonTree)wiz.create("(nil A B C)"); in testListTree() 90 CommonTree t = (CommonTree)wiz.create("A B C"); in testInvalidListTree() 96 CommonTree t = (CommonTree)wiz.create("(A (B C) (B D) E)"); in testDoubleLevelTree() 104 CommonTree t = (CommonTree)wiz.create("ID"); in testSingleNodeIndex() 113 CommonTree t = (CommonTree)wiz.create("(A B C D)"); in testNoRepeatsIndex() [all …]
|
D | TestTreeNodeStream.java | 50 Tree t = new CommonTree(new CommonToken(101)); in testSingleNode() 64 Tree t = new CommonTree(new CommonToken(101)); in test4Nodes() 65 t.addChild(new CommonTree(new CommonToken(102))); in test4Nodes() 66 t.getChild(0).addChild(new CommonTree(new CommonToken(103))); in test4Nodes() 67 t.addChild(new CommonTree(new CommonToken(104))); in test4Nodes() 80 Tree root = new CommonTree((Token)null); in testList() 82 Tree t = new CommonTree(new CommonToken(101)); in testList() 83 t.addChild(new CommonTree(new CommonToken(102))); in testList() 84 t.getChild(0).addChild(new CommonTree(new CommonToken(103))); in testList() 85 t.addChild(new CommonTree(new CommonToken(104))); in testList() [all …]
|
D | TestTreeIterator.java | 43 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()
|
/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime.Tests/ |
D | ITreeFixture.cs | 44 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 …]
|
D | ITreeNodeStreamFixture.cs | 45 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 …]
|
/external/antlr/runtime/ObjC/Framework/examples/simplecTreeParser/ |
D | SimpleCParser.h | 68 CommonTree *tree; /* ObjC start of memVars() */ 73 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; 80 - (CommonTree *)getTree; 82 - (void) setTree:(CommonTree *)aTree; 91 CommonTree *tree; /* ObjC start of memVars() */ 96 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; 103 - (CommonTree *)getTree; 105 - (void) setTree:(CommonTree *)aTree; 114 CommonTree *tree; /* ObjC start of memVars() */ 119 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; [all …]
|
/external/antlr/runtime/Python/unittests/ |
D | testtree.py | 7 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/antlr/runtime/Python3/unittests/ |
D | testtree.py | 6 from antlr3.tree import (CommonTreeNodeStream, CommonTree, CommonTreeAdaptor, 24 t = CommonTree(CommonToken(101)) 37 class V(CommonTree): 68 t = CommonTree(CommonToken(101)) 69 t.addChild(CommonTree(CommonToken(102))) 70 t.getChild(0).addChild(CommonTree(CommonToken(103))) 71 t.addChild(CommonTree(CommonToken(104))) 84 root = CommonTree(None) 86 t = CommonTree(CommonToken(101)) 87 t.addChild(CommonTree(CommonToken(102))) [all …]
|
/external/antlr/runtime/ObjC/Framework/ |
D | CommonTreeAdaptor.h | 37 + (CommonTree *) newEmptyTree; 40 - (CommonTree *)dupNode:(CommonTree *)t; 42 - (CommonTree *) create:(id<Token>) payload; 47 - (void) setTokenBoundaries:(CommonTree *)t From:(id<Token>)startToken To:(id<Token>)stopToken; 48 - (NSInteger)getTokenStartIndex:(CommonTree *)t; 49 - (NSInteger)getTokenStopIndex:(CommonTree *)t; 50 - (NSString *)getText:(CommonTree *)t; 51 - (void)setText:(CommonTree *)t Text:(NSString *)text; 52 - (NSInteger)getType:(CommonTree *)t; 53 - (void) setType:(CommonTree *)t Type:(NSInteger)tokenType; [all …]
|
D | TreeWizard.h | 43 - (void) visit:(CommonTree *)t Parent:(CommonTree *)parent ChildIndex:(NSInteger)childIndex Map:(Ma… 56 - (void) visit:(CommonTree *)t; 57 - (void) visit:(CommonTree *)t Parent:(CommonTree *)parent ChildIndex:(NSInteger)childIndex Map:(Ma… 68 @interface TreePattern : CommonTree { 75 + (CommonTree *)newTreePattern:(id<Token>)payload; 93 - (CommonTree *)createTreePattern:(id<Token>)payload; 113 - (Map *)index:(CommonTree *)t; 114 - (void) _index:(CommonTree *)t Map:(Map *)m; 115 - (AMutableArray *)find:(CommonTree *) t Pattern:(NSString *)pattern; 116 - (TreeWizard *)findFirst:(CommonTree *) t Type:(NSInteger)ttype; [all …]
|
D | CommonTree.m | 27 #import "CommonTree.h" 30 @implementation CommonTree implementation 32 + (CommonTree *)INVALID_NODE 34 return [[CommonTree alloc] initWithToken:[CommonToken invalidToken]]; 37 + (CommonTree *)invalidNode 39 // Had to cast to CommonTree * here, because GCC is dumb. 40 return [[CommonTree alloc] initWithToken:CommonToken.INVALID_TOKEN]; 43 + (CommonTree *)newTree 45 return [[CommonTree alloc] init]; 48 + (CommonTree *)newTreeWithTree:(CommonTree *)aTree [all …]
|
D | CommonTree.h | 31 @interface CommonTree : BaseTree <Tree> { 35 __strong CommonTree *parent; 39 + (CommonTree *) invalidNode; 40 + (CommonTree *) newTree; 41 + (CommonTree *) newTreeWithTree:(CommonTree *)aTree; 42 + (CommonTree *) newTreeWithToken:(CommonToken *)aToken; 43 + (CommonTree *) newTreeWithTokenType:(NSInteger)tokenType; 44 + (CommonTree *) newTreeWithTokenType:(NSInteger)aTType Text:(NSString *)theText; 47 - (id) initWithTreeNode:(CommonTree *)aNode; 65 - (CommonTree *) getParent; [all …]
|
/external/smali/smali/src/main/java/org/jf/smali/ |
D | smaliParser.java | 386 private CommonTree buildTree(int type, String text, List<CommonTree> children) { in buildTree() 387 CommonTree root = new CommonTree(new CommonToken(type, text)); in buildTree() 388 for (CommonTree child: children) { in buildTree() 440 private CommonTree parseParamList(CommonToken paramListToken) { in parseParamList() 442 CommonTree root = new CommonTree(); in parseParamList() 449 root.addChild(new CommonTree(token)); in parseParamList() 471 List<CommonTree> classAnnotations; 476 CommonTree tree; 478 public CommonTree getTree() { return tree; } in getTree() 489 CommonTree root_0 = null; in smali_file() [all …]
|
/external/antlr/runtime/ObjC/Framework/test/runtime/tree/ |
D | CommonTreeTest.m | 12 #import <ANTLR/CommonTree.h> 21 CommonTree *tree = [CommonTree newTree]; 29 CommonTree *tree = [CommonTree newTree]; 43 CommonTree *tree = [CommonTree newTreeWithToken:token]; 60 CommonTree *tree = [CommonTree newTreeWithToken:[CommonToken invalidToken]]; 71 CommonTree *tree = [CommonTree newTreeWithToken:token]; 74 CommonTree *newTree = [CommonTree newTreeWithTree:tree]; 91 CommonTree *tree = [CommonTree newTreeWithToken:token]; 93 CommonTree *newTree = (CommonTree *)[tree copyWithZone:nil]; 94 STAssertTrue([newTree isKindOfClass:[CommonTree class]], @"Copied tree was not an CommonTree"); [all …]
|
/external/antlr/tool/src/main/java/org/antlr/tool/ |
D | Strip.java | 34 import org.antlr.runtime.tree.CommonTree; 67 CommonTree t = r.getTree(); in parseAndRewrite() 72 public void rewrite(TreeAdaptor adaptor, CommonTree t, String[] tokenNames) throws Exception { in rewrite() 79 public void visit(Object t) { ACTION(tokens, (CommonTree)t); } in rewrite() 86 CommonTree a = (CommonTree)t; in rewrite() 87 CommonTree action = null; in rewrite() 88 if ( a.getChildCount()==2 ) action = (CommonTree)a.getChild(1); in rewrite() 89 else if ( a.getChildCount()==3 ) action = (CommonTree)a.getChild(2); in rewrite() 101 CommonTree a = (CommonTree)t; in rewrite() 102 a = (CommonTree)a.getChild(0); in rewrite() [all …]
|
/external/antlr/runtime/ObjC/Framework/examples/polydiff/ |
D | PolyDifferentiator.m | 84 - (CommonTree *)getTree 89 - (void) setTree:(CommonTree *)aTree 206 CommonTree *root_0 = nil; 208 CommonTree *_first_0 = nil; 209 CommonTree *_last = nil; 214 CommonTree *c = nil; 215 CommonTree *e = nil; 216 CommonTree *char_literal1 = nil; 217 CommonTree *MULT4 = nil; 218 CommonTree *INT5 = nil; [all …]
|
D | Simplifier.h | 42 CommonTree *tree; /* ObjC start of memVars() */ 47 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; 54 - (CommonTree *)getTree; 55 - (void) setTree:(CommonTree *)aTree; 64 CommonTree *tree; /* ObjC start of memVars() */ 69 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; 76 - (CommonTree *)getTree; 77 - (void) setTree:(CommonTree *)aTree; 86 CommonTree *tree; /* ObjC start of memVars() */ 91 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; [all …]
|
D | Simplifier.m | 132 - (CommonTree *)getTree 137 - (void) setTree:(CommonTree *)aTree 170 - (CommonTree *)getTree 175 - (void) setTree:(CommonTree *)aTree 208 - (CommonTree *)getTree 213 - (void) setTree:(CommonTree *)aTree 246 - (CommonTree *)getTree 251 - (void) setTree:(CommonTree *)aTree 284 - (CommonTree *)getTree 289 - (void) setTree:(CommonTree *)aTree [all …]
|
/external/antlr/runtime/CSharp3/Sources/Antlr3.Runtime.Test/BuildOptions/ |
D | DebugGrammarParser.cs | 125 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 …]
|
D | ProfileGrammarParser.cs | 129 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 …]
|
/external/antlr/runtime/Cpp/include/ |
D | antlr3commontree.inl | 4 CommonTree<ImplTraits>::CommonTree() 15 CommonTree<ImplTraits>::CommonTree( const CommonTree& ctree ) function in CommonTree 27 CommonTree<ImplTraits>::CommonTree( CommonTokenType* token ) function in CommonTree 38 CommonTree<ImplTraits>::CommonTree( CommonTree* tree ) function in CommonTree 49 typename CommonTree<ImplTraits>::TokenType* CommonTree<ImplTraits>::get_token() const 55 typename CommonTree<ImplTraits>::ChildrenType& CommonTree<ImplTraits>::get_children() 61 const typename CommonTree<ImplTraits>::ChildrenType& CommonTree<ImplTraits>::get_children() const 67 typename CommonTree<ImplTraits>::ChildrenType* CommonTree<ImplTraits>::get_children_p() 73 void CommonTree<ImplTraits>::addChild(TreeType* child) 146 void CommonTree<ImplTraits>::addChildren(const ChildListType& kids) [all …]
|
/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/ |
D | CommonTree.cs | 46 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/runtime/Java/src/main/java/org/antlr/runtime/tree/ |
D | CommonTree.java | 38 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 72 return new CommonTree(this); in dupNode() 156 ((CommonTree)children.get(i)).setUnknownTokenBoundaries(); in setUnknownTokenBoundaries() 160 CommonTree firstChild = (CommonTree)children.get(0); in setUnknownTokenBoundaries() 161 CommonTree lastChild = (CommonTree)children.get(children.size()-1); in setUnknownTokenBoundaries() 179 this.parent = (CommonTree)t; in setParent()
|
/external/antlr/runtime/ObjC/Framework/examples/treeparser/ |
D | LangParser.h | 43 CommonTree *tree; /* ObjC start of memVars() */ 48 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; 55 - (CommonTree *)getTree; 57 - (void) setTree:(CommonTree *)aTree; 66 CommonTree *tree; /* ObjC start of memVars() */ 71 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; 78 - (CommonTree *)getTree; 80 - (void) setTree:(CommonTree *)aTree; 89 CommonTree *tree; /* ObjC start of memVars() */ 94 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; [all …]
|