/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/Ruby/ |
ASTDbg.stg | 6 attr_reader :adaptor 7 def adaptor=( adaptor ) 8 @adaptor = 9 adaptor.is_a?( ANTLR3::Debug::TreeAdaptor ) ? adaptor : 10 ANTLR3::Debug::TreeAdaptor.wrap( adaptor, @debug_listener ) 11 <grammar.directDelegates:{g|<g:delegateName()>.adaptor = @adaptor}; separator="\n"> 14 alias tree_adaptor adaptor [all...] |
ASTParser.stg | 12 return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re )<\n> 19 @adaptor.add_child( root_0, tree_for_<label> ) 29 root_0 = @adaptor.become_root( tree_for_<label>, root_0 ) 49 <super.matchSet(postmatchCode={<gatedAction({@adaptor.add_child( root_0, <createNodeFromToken(...)> )})>}, ...)> 63 <super.matchSet(postmatchCode={<gatedAction({root_0 = @adaptor.become_root( <createNodeFromToken(...)>, root_0 )})>}, ...)> 74 <gatedAction({@adaptor.add_child( root_0, <label; format="label">.tree )})> 85 <gatedAction({root_0 = @adaptor.become_root( <label; format="label">.tree, root_0 )})> 112 tree_for_<label> = @adaptor.create_with_payload( <label; format="label"> ) 113 @adaptor.add_child( root_0, tree_for_<label> ) 122 tree_for_<label> = @adaptor.create_with_payload( <label; format="label"> [all...] |
/external/antlr/antlr-3.4/runtime/C/src/ |
antlr3basetreeadaptor.c | 44 static pANTLR3_BASE_TREE nilNode (pANTLR3_BASE_TREE_ADAPTOR adaptor); 45 static pANTLR3_BASE_TREE dbgNil (pANTLR3_BASE_TREE_ADAPTOR adaptor); 46 static pANTLR3_BASE_TREE dupTree (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t); 47 static pANTLR3_BASE_TREE dbgDupTree (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t); 48 static pANTLR3_BASE_TREE dupTreeTT (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE parent); 49 static void addChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child); 50 static void dbgAddChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child); 51 static pANTLR3_BASE_TREE becomeRoot (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot); 52 static pANTLR3_BASE_TREE dbgBecomeRoot (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot); 53 static pANTLR3_BASE_TREE rulePostProcessing (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE root) [all...] |
antlr3commontreeadaptor.c | 2 * This is the standard tree adaptor used by the C runtime unless the grammar 5 * good for, plus a number of methods that any other adaptor type 46 static pANTLR3_BASE_TREE dupNode (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE treeNode); 48 static pANTLR3_BASE_TREE dbgCreate (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_COMMON_TOKEN payload); 49 static pANTLR3_COMMON_TOKEN createToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text); 50 static pANTLR3_COMMON_TOKEN createTokenFromToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_COMMON_TOKEN fromToken); 51 static pANTLR3_COMMON_TOKEN getToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t); 52 static pANTLR3_STRING getText (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t); 53 static ANTLR3_UINT32 getType (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t); 54 static pANTLR3_BASE_TREE getChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 i) [all...] |
/external/antlr/antlr-3.4/runtime/Ruby/lib/antlr3/modes/ |
ast-builder.rb | 17 @adaptor = options[ :adaptor ] ||= begin 18 ( input.adaptor rescue nil ) or 24 shared_attribute( :adaptor ) 29 AST::RewriteRuleSubtreeStream.new( @adaptor, desc, element ) 33 AST::RewriteRuleTokenStream.new( @adaptor, desc, element ) 37 AST::RewriteRuleNodeStream.new( @adaptor, desc, element )
|
/external/antlr/antlr-3.4/runtime/C/include/ |
antlr3basetreeadaptor.h | 2 * Definition of the ANTLR3 base tree adaptor. 73 void * (*nilNode) (struct ANTLR3_BASE_TREE_ADAPTOR_struct * adaptor); 76 void * (*dupTree) (struct ANTLR3_BASE_TREE_ADAPTOR_struct * adaptor, void * tree); 77 void * (*dupTreeTT) (struct ANTLR3_BASE_TREE_ADAPTOR_struct * adaptor, void * t, void * tree); 79 void (*addChild) (struct ANTLR3_BASE_TREE_ADAPTOR_struct * adaptor, void * t, void * child); 80 void (*addChildToken) (struct ANTLR3_BASE_TREE_ADAPTOR_struct * adaptor, void * t, pANTLR3_COMMON_TOKEN child); 81 void (*setParent) (struct ANTLR3_BASE_TREE_ADAPTOR_struct * adaptor, void * child, void * parent); 82 void * (*getParent) (struct ANTLR3_BASE_TREE_ADAPTOR_struct * adaptor, void * child); 84 void * (*errorNode) (struct ANTLR3_BASE_TREE_ADAPTOR_struct * adaptor, pANTLR3_TOKEN_STREAM tnstream, pANTLR3_COMMON_TOKEN startToken, pANTLR3_COMMON_TOKEN stopToken, pANTLR3_EXCEPTION e); 85 ANTLR3_BOOLEAN (*isNilNode) (struct ANTLR3_BASE_TREE_ADAPTOR_struct * adaptor, void * t) [all...] |
/external/antlr/antlr-3.4/runtime/Ruby/lib/antlr3/debug/ |
trace-event-listener.rb | 17 def initialize( adaptor = nil, device = $stderr ) 20 @adaptor = adaptor ||= ANTLR3::AST::CommonTreeAdaptor.new 53 record '(%s) unique_id=%s text=%p type=%s[%s]', __method__, @adaptor.unique_id( tree ), 54 @adaptor.text_of( tree ), @adaptor.type_name( tree ), @adaptor.type_of( tree ) 58 record '(%s): k=%s unique_id=%s text=%p type=%s[%s]', __method__, i, @adaptor.unique_id( tree ), 59 @adaptor.text_of( tree ), @adaptor.type_name( tree ), @adaptor.type_of( tree [all...] |
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime.Debug/ |
DebugTreeAdaptor.cs | 40 * AST events are triggered by this adaptor; no code gen changes are needed 42 * tree adaptor routines. 47 * cannot be tracked as they might not use the adaptor to create foo, bar. 56 protected ITreeAdaptor adaptor; field in class:Antlr.Runtime.Debug.DebugTreeAdaptor 58 public DebugTreeAdaptor( IDebugEventListener dbg, ITreeAdaptor adaptor ) 61 this.adaptor = adaptor; 71 object node = adaptor.Create( payload ); 79 object node = adaptor.ErrorNode( input, start, stop, e ); 89 object t = adaptor.DupTree( tree ) [all...] |
TraceDebugEventListener.cs | 43 ITreeAdaptor adaptor; field in class:Antlr.Runtime.Debug.TraceDebugEventListener 45 public TraceDebugEventListener( ITreeAdaptor adaptor ) 47 this.adaptor = adaptor; 75 int ID = adaptor.GetUniqueID( t ); 76 string text = adaptor.GetText( t ); 77 int type = adaptor.GetType( t ); 83 int ID = adaptor.GetUniqueID( t ); 84 string text = adaptor.GetText( t ); 85 int type = adaptor.GetType( t ) [all...] |
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/ |
TraceDebugEventListener.cs | 41 ITreeAdaptor adaptor; field in class:Antlr.Runtime.Debug.TraceDebugEventListener 43 public TraceDebugEventListener(ITreeAdaptor adaptor) { 44 this.adaptor = adaptor; 66 int ID = adaptor.GetUniqueID(t); 67 string text = adaptor.GetText(t); 68 int type = adaptor.GetType(t); 73 int ID = adaptor.GetUniqueID(t); 74 string text = adaptor.GetText(t); 75 int type = adaptor.GetType(t) [all...] |
DebugTreeAdaptor.cs | 39 * AST events are triggered by this adaptor; no code gen changes are needed 41 * tree adaptor routines. 46 * cannot be tracked as they might not use the adaptor to create foo, bar. 54 protected ITreeAdaptor adaptor; field in class:Antlr.Runtime.Debug.DebugTreeAdaptor 56 public DebugTreeAdaptor(IDebugEventListener dbg, ITreeAdaptor adaptor) { 58 this.adaptor = adaptor; 66 object node = adaptor.Create(payload); 73 object node = adaptor.ErrorNode(input, start, stop, e); 81 object t = adaptor.DupTree(tree) [all...] |
/external/antlr/antlr-3.4/runtime/Java/src/main/java/org/antlr/runtime/debug/ |
TraceDebugEventListener.java | 35 TreeAdaptor adaptor; field in class:TraceDebugEventListener 37 public TraceDebugEventListener(TreeAdaptor adaptor) { 38 this.adaptor = adaptor; 50 int ID = adaptor.getUniqueID(t); 51 String text = adaptor.getText(t); 52 int type = adaptor.getType(t); 57 int ID = adaptor.getUniqueID(t); 58 String text = adaptor.getText(t); 59 int type = adaptor.getType(t) [all...] |
DebugTreeAdaptor.java | 37 * AST events are triggered by this adaptor; no code gen changes are needed 39 * tree adaptor routines. 42 * cannot be tracked as they might not use the adaptor to create foo, bar. 49 protected TreeAdaptor adaptor; field in class:DebugTreeAdaptor 51 public DebugTreeAdaptor(DebugEventListener dbg, TreeAdaptor adaptor) { 53 this.adaptor = adaptor; 61 Object node = adaptor.create(payload); 69 Object node = adaptor.errorNode(input, start, stop, e); 77 Object t = adaptor.dupTree(tree) [all...] |
/external/antlr/antlr-3.4/runtime/ObjC/Framework/ |
ANTLRTreeIterator.m | 42 + (ANTLRTreeIterator *) newANTRLTreeIteratorWithAdaptor:(ANTLRCommonTreeAdaptor *)adaptor 45 return [[ANTLRTreeIterator alloc] initWithTreeAdaptor:adaptor andTree:tree]; 54 down = [[adaptor createTree:ANTLRTokenTypeDOWN Text:@"DOWN"] retain]; 55 up = [[adaptor createTree:ANTLRTokenTypeUP Text:@"UP"] retain]; 56 eof = [[adaptor createTree:ANTLRTokenTypeEOF Text:@"EOF"] retain]; 68 adaptor = [[ANTLRCommonTreeAdaptor newTreeAdaptor] retain]; 72 down = [[adaptor createTree:ANTLRTokenTypeDOWN Text:@"DOWN"] retain]; 73 up = [[adaptor createTree:ANTLRTokenTypeUP Text:@"UP"] retain]; 74 eof = [[adaptor createTree:ANTLRTokenTypeEOF Text:@"EOF"] retain]; 84 adaptor = [a retain] [all...] |
ANTLRCommonTreeNodeStream.m | 42 @synthesize adaptor; 58 adaptor = [[ANTLRCommonTreeAdaptor newTreeAdaptor] retain]; 60 navigationNodeEOF = [[adaptor createTree:ANTLRTokenTypeEOF Text:@"EOF"] retain]; // set EOF 61 it = [[ANTLRTreeIterator newANTRLTreeIteratorWithAdaptor:adaptor andTree:root] retain]; 73 adaptor = [anAdaptor retain]; 75 navigationNodeEOF = [[adaptor createTree:ANTLRTokenTypeEOF Text:@"EOF"] retain]; // set EOF 77 it = [[ANTLRTreeIterator newANTRLTreeIteratorWithAdaptor:adaptor andTree:root] retain]; 94 if ( adaptor ) [adaptor release]; 116 //System.out.println("pulled "+adaptor.getType(t)) [all...] |
/external/llvm/utils/lit/tests/ |
unittest-adaptor.py | 3 # RUN: python %s %{inputs}/unittest-adaptor 2> %t.err 6 # CHECK: unittest-adaptor :: test-one.txt ... ok 7 # CHECK: unittest-adaptor :: test-two.txt ... FAIL
|
/external/antlr/antlr-3.4/runtime/ObjC/Framework/examples/simplecTreeParser/ |
SimpleCParser.java | 52 protected TreeAdaptor adaptor = new CommonTreeAdaptor(); field in class:SimpleCParser 54 public void setTreeAdaptor(TreeAdaptor adaptor) { 55 this.adaptor = adaptor; 58 return adaptor; 86 root_0 = (Object)adaptor.nil(); 109 adaptor.addChild(root_0, declaration1.getTree()); 128 retval.tree = (Object)adaptor.rulePostProcessing(root_0); 129 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 135 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re) [all...] |
/external/llvm/utils/lit/tests/Inputs/unittest-adaptor/ |
lit.cfg | 1 config.name = 'unittest-adaptor'
|
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/Java/ |
ASTDbg.stg | 34 protected DebugTreeAdaptor adaptor; 35 public void setTreeAdaptor(TreeAdaptor adaptor) { 37 this.adaptor = new DebugTreeAdaptor(dbg,adaptor); 39 this.adaptor = (DebugTreeAdaptor)adaptor; // delegator sends dbg adaptor 41 <grammar.directDelegates:{g|<g:delegateName()>.setTreeAdaptor(this.adaptor);}> 44 return adaptor; 54 new DebugEventSocketProxy(this,port,<if(TREE_PARSER)>input.getTreeAdaptor()<else>adaptor<endif>) [all...] |
/external/antlr/antlr-3.4/tool/src/main/antlr3/org/antlr/grammar/v3/ |
AssignTokenTypesWalker.g | 130 TreeAdaptor adaptor = new ANTLRParser.grammar_Adaptor(null); 135 stringAlias = (GrammarAST)adaptor.create( BLOCK, "BLOCK" ); 137 GrammarAST alt = (GrammarAST)adaptor.create( ALT, "ALT" ); 138 adaptor.addChild( alt, adaptor.create( STRING_LITERAL, "STRING_LITERAL" ) ); 139 adaptor.addChild( alt, adaptor.create( EOA, "EOA" ) ); 140 adaptor.addChild( stringAlias, alt ); 142 adaptor.addChild( stringAlias, adaptor.create( EOB, "EOB" ) ) [all...] |
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/C/ |
ASTParser.stg | 45 retval.tree = (<ASTLabelType>)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); 54 <label>_tree = (<ASTLabelType>)(ADAPTOR->create(ADAPTOR, <label>)); 55 ADAPTOR->addChild(ADAPTOR, root_0, <label>_tree); 67 root_0 = (<ASTLabelType>)(ADAPTOR->becomeRoot(ADAPTOR, <label>_tree, root_0)); 105 <super.matchSet(postmatchCode={<if(backtracking)>if ( <actions.(actionScope).synpredgate> ) <endif>ADAPTOR->addChild(ADAPTOR, root_0, <createNodeFromToken(...)>);},...) [all...] |
ASTTreeParser.stg | 64 if ( ADAPTOR->getParent(ADAPTOR, retval.tree) != NULL && ADAPTOR->isNilNode(ADAPTOR, ADAPTOR->getParent(ADAPTOR, retval.tree) ) ) 66 retval.tree = (<ASTLabelType>)ADAPTOR->getParent(ADAPTOR, retval.tree); 87 root_<treeLevel> = (<ASTLabelType>)(ADAPTOR->nilNode(ADAPTOR)); [all...] |
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/CSharp2/ |
ASTDbg.stg | 36 protected DebugTreeAdaptor adaptor; 42 return adaptor; 47 this.adaptor = new DebugTreeAdaptor(dbg,adaptor); 49 this.adaptor = (DebugTreeAdaptor)adaptor; // delegator sends dbg adaptor 51 <grammar.directDelegates:{g|<g:delegateName()>.TreeAdaptor = this.adaptor;}> 61 DebugEventSocketProxy proxy = new DebugEventSocketProxy( this, port, <if(TREE_PARSER)>input.TreeAdaptor<else>adaptor<endif> ); 88 <if(grammar.grammarIsRoot)><! don't create new adaptor for delegates ! [all...] |
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/ObjC/ |
ASTDbg.stg | 33 ANTLRDebugTreeAdaptor *adaptor = [ANTLRDebugTreeAdaptor newTreeAdaptor:(id)dbg Adaptor:[ANTLRCommonTreeAdaptor newTreeAdaptor]]; 38 adaptor = [ANTLRDebugTreeAdaptor newTreeAdaptor:dbg Adaptor:anAdaptor]; 40 adaptor = [ANTLRDebugTreeAdaptor newTreeAdaptor:adaptor withDBG:dbg]; 42 adaptor = (ANTLRDebugTreeAdaptor *)adaptor; // delegator sends dbg adaptor 44 <grammar.directDelegates:{g|[<g:delegateName()> setTreeAdaptor:adaptor];}> [all...] |
/external/antlr/antlr-3.4/runtime/Ruby/lib/antlr3/ |
dot.rb | 91 def self.generate( tree, adaptor = nil, tree_template = TREE_TEMPLATE, 93 new.to_dot( tree, adaptor, tree_template, edge_template ) 105 def to_dot( tree, adaptor = nil, tree_template = TREE_TEMPLATE, 107 adaptor ||= AST::CommonTreeAdaptor.new 110 define_nodes( tree, adaptor, tree_template ) 113 define_edges( tree, adaptor, tree_template, edge_template ) 117 def define_nodes( tree, adaptor, tree_template, known_nodes = nil ) 120 n = adaptor.child_count( tree ) 124 parent_node_template = node_template_for( adaptor, child ) 130 child = adaptor.child_of( tree, index [all...] |