Home
last modified time | relevance | path

Searched refs:CommonToken (Results 1 – 25 of 170) sorted by relevance

1234567

/external/antlr/tool/src/test/java/org/antlr/test/
DTestTrees.java30 import org.antlr.runtime.CommonToken;
47 public V(int ttype, int x) { this.x=x; token=new CommonToken(ttype); } in V()
54 CommonTree t = new CommonTree(new CommonToken(101)); in testSingleNode()
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()
86 r0.addChild(c0=new CommonTree(new CommonToken(101))); in testList()
87 r0.addChild(c1=new CommonTree(new CommonToken(102))); in testList()
[all …]
DTestTreeNodeStream.java30 import org.antlr.runtime.CommonToken;
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()
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 …]
DTestBufferedTreeNodeStream.java30 import org.antlr.runtime.CommonToken;
56 Tree r0 = new CommonTree(new CommonToken(101)); in testSeek()
57 Tree r1 = new CommonTree(new CommonToken(102)); in testSeek()
59 r1.addChild(new CommonTree(new CommonToken(103))); in testSeek()
60 Tree r2 = new CommonTree(new CommonToken(106)); in testSeek()
61 r2.addChild(new CommonTree(new CommonToken(107))); in testSeek()
63 r0.addChild(new CommonTree(new CommonToken(104))); in testSeek()
64 r0.addChild(new CommonTree(new CommonToken(105))); in testSeek()
DTestCommonTokenStream.java178 new CommonToken(1," "), in testOffChannel()
179 new CommonToken(1,"x"), in testOffChannel()
180 new CommonToken(1," "), in testOffChannel()
181 new CommonToken(1,"="), in testOffChannel()
182 new CommonToken(1,"34"), in testOffChannel()
183 new CommonToken(1," "), in testOffChannel()
184 new CommonToken(1," "), in testOffChannel()
185 new CommonToken(1,";"), in testOffChannel()
186 new CommonToken(1,"\n"), in testOffChannel()
187 new CommonToken(Token.EOF,"") in testOffChannel()
DTestAttributes.java34 import org.antlr.runtime.CommonToken;
62 new CommonToken(ANTLRParser.ACTION,action),0); in testEscapedLessThanInAction()
90 new CommonToken(ANTLRParser.ACTION,action),0); in testEscaped$InAction()
110 new CommonToken(ANTLRParser.ACTION,action),1); in testArguments()
135 new CommonToken(ANTLRParser.ACTION,action),1); in testComplicatedArgParsing()
188 new CommonToken(ANTLRParser.ACTION,action),1); in testStringArgParsing()
224 new CommonToken(ANTLRParser.ACTION,action),1); in testComplicatedSingleArgParsing()
249 new CommonToken(ANTLRParser.ACTION,action),1); in testArgWithLT()
280 new CommonToken(ANTLRParser.ACTION,action),1); in testGenericsAsArgumentDefinition()
318 new CommonToken(ANTLRParser.ACTION,action),1); in testGenericsAsArgumentDefinition2()
[all …]
/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime.Tests/
DITreeFixture.cs41 using CommonToken = Antlr.Runtime.CommonToken; typedef
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()
81 r0.AddChild(c0 = new CommonTree(new CommonToken(101))); in testList()
82 r0.AddChild(c1 = new CommonTree(new CommonToken(102))); in testList()
83 r0.AddChild(c2 = new CommonTree(new CommonToken(103))); in testList()
100 CommonTree root = new CommonTree(new CommonToken(5)); in testList2()
[all …]
DITreeNodeStreamFixture.cs42 using CommonToken = Antlr.Runtime.CommonToken; 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()
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()
100 t.AddChild(new CommonTree(new CommonToken(104))); in testList()
[all …]
/external/antlr/runtime/Python/unittests/
Dtesttree.py9 from antlr3 import CommonToken, UP, DOWN, EOF
25 t = CommonTree(CommonToken(101))
44 self.token = CommonToken(type=ttype)
60 u = V(token=CommonToken(type=102, text="102"))
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)))
89 t = CommonTree(CommonToken(101))
90 t.addChild(CommonTree(CommonToken(102)))
[all …]
Dteststreams.py361 return antlr3.CommonToken(type=antlr3.EOF)
401 antlr3.CommonToken(type=12)
414 antlr3.CommonToken(type=12, channel=antlr3.HIDDEN_CHANNEL)
418 antlr3.CommonToken(type=13)
431 antlr3.CommonToken(type=12)
435 antlr3.CommonToken(type=13, channel=antlr3.HIDDEN_CHANNEL)
449 antlr3.CommonToken(type=12)
453 antlr3.CommonToken(type=13)
468 antlr3.CommonToken(type=12)
472 antlr3.CommonToken(type=13)
[all …]
/external/antlr/runtime/Python3/unittests/
Dtesttree.py8 from antlr3 import CommonToken, UP, DOWN, EOF
24 t = CommonTree(CommonToken(101))
43 self.token = CommonToken(type=ttype)
57 u = V(token=CommonToken(type=102, text="102"))
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)))
86 t = CommonTree(CommonToken(101))
87 t.addChild(CommonTree(CommonToken(102)))
[all …]
Dteststreams.py360 return antlr3.CommonToken(type=antlr3.EOF)
399 antlr3.CommonToken(type=12)
412 antlr3.CommonToken(type=12, channel=antlr3.HIDDEN_CHANNEL)
416 antlr3.CommonToken(type=13)
429 antlr3.CommonToken(type=12)
433 antlr3.CommonToken(type=13, channel=antlr3.HIDDEN_CHANNEL)
447 antlr3.CommonToken(type=12)
451 antlr3.CommonToken(type=13)
466 antlr3.CommonToken(type=12)
470 antlr3.CommonToken(type=13)
[all …]
/external/antlr/runtime/Cpp/include/
Dantlr3commontoken.inl4 CommonToken<ImplTraits>::CommonToken()
18 CommonToken<ImplTraits>::CommonToken(ANTLR_UINT32 type) function in CommonToken
32 CommonToken<ImplTraits>::CommonToken(TOKEN_TYPE type) function in CommonToken
46 CommonToken<ImplTraits>::CommonToken( const CommonToken& ctoken ) function in CommonToken
61 CommonToken<ImplTraits>& CommonToken<ImplTraits>::operator=( const CommonToken& ctoken )
78 ANTLR_INLINE bool CommonToken<ImplTraits>::operator<( const CommonToken& ctoken ) const
84 bool CommonToken<ImplTraits>::operator==( const CommonToken& ctoken ) const
98 ANTLR_INLINE typename CommonToken<ImplTraits>::InputStreamType* CommonToken<ImplTraits>::get_input(…
104 ANTLR_INLINE ANTLR_MARKER CommonToken<ImplTraits>::get_index() const
110 ANTLR_INLINE void CommonToken<ImplTraits>::set_index( ANTLR_MARKER index )
[all …]
Dantlr3commontoken.hpp58 class CommonToken : public ImplTraits::AllocPolicyType class
132 CommonToken();
133 CommonToken(ANTLR_UINT32 type);
134 CommonToken(TOKEN_TYPE type);
135 CommonToken( const CommonToken& ctoken );
137 CommonToken& operator=( const CommonToken& ctoken );
138 bool operator==( const CommonToken& ctoken ) const;
139 bool operator<( const CommonToken& ctoken ) const;
/external/antlr/runtime/ObjC/Framework/test/runtime/token/
DCommonTokenTest.m10 #import "CommonToken.h"
17 CommonToken *token = [[CommonToken newToken] retain];
24 CommonToken *token = [[CommonToken eofToken] retain];
32 CommonToken *token = [[CommonToken newToken:TokenTypeUP] retain];
43 CommonToken *token = [[CommonToken newToken:TokenTypeUP Text:@"<UP>"] retain];
54CommonToken *token = [[CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 St…
66CommonToken *token = [[CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 St…
72 CommonToken *newToken = [[CommonToken newTokenWithToken:token] retain];
91CommonToken *token = [[CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 St…
/external/antlr/runtime/ObjC/Framework/
DCommonToken.m28 #import "CommonToken.h"
30 static CommonToken *SKIP_TOKEN;
31 static CommonToken *EOF_TOKEN;
32 static CommonToken *INVALID_TOKEN;
34 @implementation CommonToken implementation
52 EOF_TOKEN = [CommonToken newToken:TokenTypeEOF Text:@"EOF"];
53 SKIP_TOKEN = [CommonToken newToken:TokenTypeInvalid Text:@"Skip"];
54 INVALID_TOKEN = [CommonToken newToken:TokenTypeInvalid Text:@"Invalid"];
60 + (CommonToken *)INVALID_TOKEN
75 + (CommonToken *) newToken
[all …]
DCommonTree.h32 __strong CommonToken *token;
42 + (CommonTree *) newTreeWithToken:(CommonToken *)aToken;
48 - (id) initWithToken:(CommonToken *)aToken;
56 - (CommonToken *) getToken;
57 - (void) setToken:(CommonToken *)aToken;
58 - (CommonToken *) dupNode;
86 @property (retain) CommonToken *token;
/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/
DCommonToken.cs39 public class CommonToken : IToken { class
64 public CommonToken() { in CommonToken() method in Antlr.Runtime.CommonToken
67 public CommonToken(int type) { in CommonToken() method in Antlr.Runtime.CommonToken
71 public CommonToken(ICharStream input, int type, int channel, int start, int stop) { in CommonToken() method in Antlr.Runtime.CommonToken
79 public CommonToken(int type, string text) { in CommonToken() method in Antlr.Runtime.CommonToken
85 public CommonToken(IToken oldToken) { in CommonToken() method in Antlr.Runtime.CommonToken
93 if (oldToken is CommonToken) { in CommonToken()
94 start = ((CommonToken)oldToken).start; in CommonToken()
95 stop = ((CommonToken)oldToken).stop; in CommonToken()
/external/antlr/runtime/Perl5/lib/ANTLR/Runtime/
DToken.pm41 require ANTLR::Runtime::CommonToken;
42 state $EOF_TOKEN = ANTLR::Runtime::CommonToken->new({ type => EOF });
51 require ANTLR::Runtime::CommonToken;
52 state $INVALID_TOKEN = ANTLR::Runtime::CommonToken->new({ type => INVALID_TOKEN_TYPE });
60 require ANTLR::Runtime::CommonToken;
61 state $SKIP_TOKEN = ANTLR::Runtime::CommonToken->new({ type => INVALID_TOKEN_TYPE });
/external/antlr/runtime/Java/src/main/java/org/antlr/runtime/
DCommonToken.java32 public class CommonToken implements Token, Serializable { class
54 public CommonToken(int type) { in CommonToken() method in CommonToken
58 public CommonToken(CharStream input, int type, int channel, int start, int stop) { in CommonToken() method in CommonToken
66 public CommonToken(int type, String text) { in CommonToken() method in CommonToken
72 public CommonToken(Token oldToken) { in CommonToken() method in CommonToken
80 if ( oldToken instanceof CommonToken ) { in CommonToken()
81 start = ((CommonToken)oldToken).start; in CommonToken()
82 stop = ((CommonToken)oldToken).stop; in CommonToken()
/external/antlr/runtime/ObjC/Framework/test/runtime/TestRewriteRuleTokenStream/
DTestRewriteRuleTokenStream.h36 CommonToken *token1;
37 CommonToken *token2;
38 CommonToken *token3;
39 CommonToken *token4;
DTestRewriteRuleTokenStream.m30 #import "CommonToken.h"
39 token1 = [CommonToken newToken:5];
40 token2 = [CommonToken newToken:6];
41 token3 = [CommonToken newToken:7];
42 token4 = [CommonToken newToken:8];
74 token1 = [CommonToken newToken:5];
75 token2 = [CommonToken newToken:6];
94 token1 = [CommonToken newToken:5];
95 token2 = [CommonToken newToken:6];
96 token3 = [CommonToken newToken:7];
[all …]
/external/antlr/runtime/ObjC/Framework/test/runtime/tree/
DCommonTreeTest.m13 #import <ANTLR/CommonToken.h>
40CommonToken *token = [CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 Sto…
50 STAssertNotNil(((CommonToken *)tree.token).text, @"Tree with token with text was nil");
60 CommonTree *tree = [CommonTree newTreeWithToken:[CommonToken invalidToken]];
70CommonToken *token = [CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 Sto…
90CommonToken *token = [CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 Sto…
136CommonToken *token = [CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 Sto…
150CommonToken *token = [CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 Sto…
172CommonToken *token = [CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 Sto…
202CommonToken *token = [CommonToken newToken:stream Type:555 Channel:TokenChannelDefault Start:4 Sto…
[all …]
/external/antlr/runtime/JavaScript/src/org/antlr/runtime/
DCommonToken.js1 org.antlr.runtime.CommonToken = function() { class in org.antlr.runtime
19 if ( oldToken instanceof org.antlr.runtime.CommonToken ) {
37 org.antlr.lang.extend(org.antlr.runtime.CommonToken,
144 EOF_TOKEN: new org.antlr.runtime.CommonToken(org.antlr.runtime.CharStream.EOF),
145 INVALID_TOKEN: new org.antlr.runtime.CommonToken(0),
146 SKIP_TOKEN: new org.antlr.runtime.CommonToken(0)
/external/antlr/runtime/Ruby/test/unit/
Dtest-trees.rb21 t = CommonTree.new(CommonToken.new { |t| t.type = 101 })
39 super(token || (CommonToken.new { |t| t.type = type } if type))
48 u = v.new CommonToken.create(:type => 102, :text => '102')
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])
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/runtime/ActionScript/project/src/org/antlr/runtime/
DCommonToken.as32 public class CommonToken implements Token { class in org.antlr.runtime
54 public function CommonToken(type:int, text:String = null) { method in org.antlr.runtime.CommonToken
59 …nction createFromStream(input:CharStream, type:int, channel:int, start:int, stop:int):CommonToken {
60 var token:CommonToken = new CommonToken(type);
68 public static function cloneToken(oldToken:Token):CommonToken {
69 var token:CommonToken = new CommonToken(oldToken.type, oldToken.text);
74 if ( oldToken is CommonToken ) {
75 token._start = CommonToken(oldToken).startIndex;
76 token._stop = CommonToken(oldToken).stopIndex;

1234567