Home
last modified time | relevance | path

Searched refs:lexer (Results 1 – 25 of 804) sorted by relevance

12345678910>>...33

/external/antlr/runtime/C/src/
Dantlr3lexer.c42 static void mTokens (pANTLR3_LEXER lexer);
43 static void setCharStream (pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input);
44 static void pushCharStream (pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input);
45 static void popCharStream (pANTLR3_LEXER lexer);
47 static void emitNew (pANTLR3_LEXER lexer, pANTLR3_COMMON_TOKEN token);
48 static pANTLR3_COMMON_TOKEN emit (pANTLR3_LEXER lexer);
49 static ANTLR3_BOOLEAN matchs (pANTLR3_LEXER lexer, ANTLR3_UCHAR * string);
50 static ANTLR3_BOOLEAN matchc (pANTLR3_LEXER lexer, ANTLR3_UCHAR c);
51 static ANTLR3_BOOLEAN matchRange (pANTLR3_LEXER lexer, ANTLR3_UCHAR low, ANTLR3_UCHAR high);
52 static void matchAny (pANTLR3_LEXER lexer);
[all …]
/external/llvm-project/mlir/examples/toy/Ch7/include/toy/
DParser.h39 Parser(Lexer &lexer) : lexer(lexer) {} in Parser() argument
43 lexer.getNextToken(); // prime the lexer in parseModule()
49 switch (lexer.getCurToken()) { in parseModule()
68 if (lexer.getCurToken() != tok_eof) in parseModule()
75 Lexer &lexer;
80 auto loc = lexer.getLastLocation(); in parseReturn()
81 lexer.consume(tok_return); in parseReturn()
85 if (lexer.getCurToken() != ';') { in parseReturn()
96 auto loc = lexer.getLastLocation(); in parseNumberExpr()
98 std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue()); in parseNumberExpr()
[all …]
/external/nist-sip/java/gov/nist/javax/sip/parser/
DViaParser.java47 public ViaParser(Lexer lexer) { in ViaParser() argument
48 super(lexer); in ViaParser()
56 lexer.match(TokenTypes.ID); in parseVia()
57 Token protocolName = lexer.getNextToken(); in parseVia()
59 this.lexer.SPorHT(); in parseVia()
61 lexer.match('/'); in parseVia()
62 this.lexer.SPorHT(); in parseVia()
63 lexer.match(TokenTypes.ID); in parseVia()
64 this.lexer.SPorHT(); in parseVia()
65 Token protocolVersion = lexer.getNextToken(); in parseVia()
[all …]
DURLParser.java50 this.lexer = new Lexer("sip_urlLexer", url); in URLParser()
54 public URLParser(Lexer lexer) { in URLParser() argument
55 this.lexer = lexer; in URLParser()
56 this.lexer.selectLexer("sip_urlLexer"); in URLParser()
116 char next = lexer.lookAhead(0); in unreserved()
118 lexer.consume(1); in unreserved()
128 int startIdx = lexer.getPtr(); in paramNameOrValue()
129 while (lexer.hasMoreChars()) { in paramNameOrValue()
130 char next = lexer.lookAhead(0); in paramNameOrValue()
143 lexer.consume(1); in paramNameOrValue()
[all …]
DWarningParser.java63 protected WarningParser(Lexer lexer) { in WarningParser() argument
64 super(lexer); in WarningParser()
82 while (lexer.lookAhead(0) != '\n') { in parse()
87 this.lexer.match(TokenTypes.ID); in parse()
88 Token token = lexer.getNextToken(); in parse()
97 this.lexer.SPorHT(); in parse()
100 this.lexer.match(TokenTypes.ID); in parse()
101 token = lexer.getNextToken(); in parse()
103 if (lexer.lookAhead(0) == ':') { in parse()
104 this.lexer.match(':'); in parse()
[all …]
DSubscriptionStateParser.java56 protected SubscriptionStateParser(Lexer lexer) { in SubscriptionStateParser() argument
57 super(lexer); in SubscriptionStateParser()
77 lexer.match(TokenTypes.ID); in parse()
78 Token token = lexer.getNextToken(); in parse()
81 while (lexer.lookAhead(0) == ';') { in parse()
82 this.lexer.match(';'); in parse()
83 this.lexer.SPorHT(); in parse()
84 lexer.match(TokenTypes.ID); in parse()
85 token = lexer.getNextToken(); in parse()
88 this.lexer.match('='); in parse()
[all …]
DAddressParser.java40 public AddressParser(Lexer lexer) { in AddressParser() argument
41 this.lexer = lexer; in AddressParser()
42 this.lexer.selectLexer("charLexer"); in AddressParser()
46 this.lexer = new Lexer("charLexer", address); in AddressParser()
53 if (this.lexer.lookAhead(0) == '<') { in nameAddr()
54 this.lexer.consume(1); in nameAddr()
55 this.lexer.selectLexer("sip_urlLexer"); in nameAddr()
56 this.lexer.SPorHT(); in nameAddr()
57 URLParser uriParser = new URLParser((Lexer) lexer); in nameAddr()
62 this.lexer.SPorHT(); in nameAddr()
[all …]
DAcceptLanguageParser.java74 protected AcceptLanguageParser(Lexer lexer) { in AcceptLanguageParser() argument
75 super(lexer); in AcceptLanguageParser()
91 while (lexer.lookAhead(0) != '\n') { in parse()
94 if (lexer.lookAhead(0) != ';') { in parse()
96 lexer.match(TokenTypes.ID); in parse()
97 Token value = lexer.getNextToken(); in parse()
101 while (lexer.lookAhead(0) == ';') { in parse()
102 this.lexer.match(';'); in parse()
103 this.lexer.SPorHT(); in parse()
104 this.lexer.match('q'); in parse()
[all …]
DRetryAfterParser.java58 protected RetryAfterParser(Lexer lexer) { in RetryAfterParser() argument
59 super(lexer); in RetryAfterParser()
77 String value = lexer.number(); in parse()
87 this.lexer.SPorHT(); in parse()
88 if (lexer.lookAhead(0) == '(') { in parse()
89 String comment = this.lexer.comment(); in parse()
92 this.lexer.SPorHT(); in parse()
94 while (lexer.lookAhead(0) == ';') { in parse()
95 this.lexer.match(';'); in parse()
96 this.lexer.SPorHT(); in parse()
[all …]
DAcceptEncodingParser.java77 protected AcceptEncodingParser(Lexer lexer) { in AcceptEncodingParser() argument
78 super(lexer); in AcceptEncodingParser()
94 if (lexer.lookAhead(0) == '\n') { in parse()
98 while (lexer.lookAhead(0) != '\n') { in parse()
100 if (lexer.lookAhead(0) != ';') { in parse()
102 lexer.match(TokenTypes.ID); in parse()
103 Token value = lexer.getNextToken(); in parse()
107 while (lexer.lookAhead(0) == ';') { in parse()
108 this.lexer.match(';'); in parse()
109 this.lexer.SPorHT(); in parse()
[all …]
DInReplyToParser.java56 protected InReplyToParser(Lexer lexer) { in InReplyToParser() argument
57 super(lexer); in InReplyToParser()
74 while (lexer.lookAhead(0) != '\n') { in parse()
78 this.lexer.match(TokenTypes.ID); in parse()
79 Token token = lexer.getNextToken(); in parse()
80 if (lexer.lookAhead(0) == '@') { in parse()
81 this.lexer.match('@'); in parse()
82 this.lexer.match(TokenTypes.ID); in parse()
83 Token secToken = lexer.getNextToken(); in parse()
90 this.lexer.SPorHT(); in parse()
[all …]
DAcceptParser.java56 protected AcceptParser(Lexer lexer) { in AcceptParser() argument
57 super(lexer); in AcceptParser()
77 this.lexer.SPorHT(); in parse()
78 this.lexer.match(TokenTypes.ID); in parse()
79 Token token = lexer.getNextToken(); in parse()
81 this.lexer.match('/'); in parse()
82 this.lexer.match(TokenTypes.ID); in parse()
83 token = lexer.getNextToken(); in parse()
85 this.lexer.SPorHT(); in parse()
90 while (lexer.lookAhead(0) == ',') { in parse()
[all …]
/external/llvm-project/mlir/examples/toy/Ch4/include/toy/
DParser.h39 Parser(Lexer &lexer) : lexer(lexer) {} in Parser() argument
43 lexer.getNextToken(); // prime the lexer in parseModule()
49 if (lexer.getCurToken() == tok_eof) in parseModule()
53 if (lexer.getCurToken() != tok_eof) in parseModule()
60 Lexer &lexer;
65 auto loc = lexer.getLastLocation(); in parseReturn()
66 lexer.consume(tok_return); in parseReturn()
70 if (lexer.getCurToken() != ';') { in parseReturn()
81 auto loc = lexer.getLastLocation(); in parseNumberExpr()
83 std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue()); in parseNumberExpr()
[all …]
/external/llvm-project/mlir/examples/toy/Ch2/include/toy/
DParser.h39 Parser(Lexer &lexer) : lexer(lexer) {} in Parser() argument
43 lexer.getNextToken(); // prime the lexer in parseModule()
49 if (lexer.getCurToken() == tok_eof) in parseModule()
53 if (lexer.getCurToken() != tok_eof) in parseModule()
60 Lexer &lexer;
65 auto loc = lexer.getLastLocation(); in parseReturn()
66 lexer.consume(tok_return); in parseReturn()
70 if (lexer.getCurToken() != ';') { in parseReturn()
81 auto loc = lexer.getLastLocation(); in parseNumberExpr()
83 std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue()); in parseNumberExpr()
[all …]
/external/llvm-project/mlir/examples/toy/Ch5/include/toy/
DParser.h39 Parser(Lexer &lexer) : lexer(lexer) {} in Parser() argument
43 lexer.getNextToken(); // prime the lexer in parseModule()
49 if (lexer.getCurToken() == tok_eof) in parseModule()
53 if (lexer.getCurToken() != tok_eof) in parseModule()
60 Lexer &lexer;
65 auto loc = lexer.getLastLocation(); in parseReturn()
66 lexer.consume(tok_return); in parseReturn()
70 if (lexer.getCurToken() != ';') { in parseReturn()
81 auto loc = lexer.getLastLocation(); in parseNumberExpr()
83 std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue()); in parseNumberExpr()
[all …]
/external/llvm-project/mlir/examples/toy/Ch6/include/toy/
DParser.h39 Parser(Lexer &lexer) : lexer(lexer) {} in Parser() argument
43 lexer.getNextToken(); // prime the lexer in parseModule()
49 if (lexer.getCurToken() == tok_eof) in parseModule()
53 if (lexer.getCurToken() != tok_eof) in parseModule()
60 Lexer &lexer;
65 auto loc = lexer.getLastLocation(); in parseReturn()
66 lexer.consume(tok_return); in parseReturn()
70 if (lexer.getCurToken() != ';') { in parseReturn()
81 auto loc = lexer.getLastLocation(); in parseNumberExpr()
83 std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue()); in parseNumberExpr()
[all …]
/external/llvm-project/mlir/examples/toy/Ch1/include/toy/
DParser.h39 Parser(Lexer &lexer) : lexer(lexer) {} in Parser() argument
43 lexer.getNextToken(); // prime the lexer in parseModule()
49 if (lexer.getCurToken() == tok_eof) in parseModule()
53 if (lexer.getCurToken() != tok_eof) in parseModule()
60 Lexer &lexer;
65 auto loc = lexer.getLastLocation(); in parseReturn()
66 lexer.consume(tok_return); in parseReturn()
70 if (lexer.getCurToken() != ';') { in parseReturn()
81 auto loc = lexer.getLastLocation(); in parseNumberExpr()
83 std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue()); in parseNumberExpr()
[all …]
/external/llvm-project/mlir/examples/toy/Ch3/include/toy/
DParser.h39 Parser(Lexer &lexer) : lexer(lexer) {} in Parser() argument
43 lexer.getNextToken(); // prime the lexer in parseModule()
49 if (lexer.getCurToken() == tok_eof) in parseModule()
53 if (lexer.getCurToken() != tok_eof) in parseModule()
60 Lexer &lexer;
65 auto loc = lexer.getLastLocation(); in parseReturn()
66 lexer.consume(tok_return); in parseReturn()
70 if (lexer.getCurToken() != ';') { in parseReturn()
81 auto loc = lexer.getLastLocation(); in parseNumberExpr()
83 std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue()); in parseNumberExpr()
[all …]
/external/antlr/runtime/Ruby/test/functional/lexer/
Dbasic.rb18 lexer = Zero::Lexer.new( '0' )
20 token = lexer.next_token
23 token = lexer.next_token
28 lexer = Zero::Lexer.new( '0' )
30 token_types = lexer.map { |token| token.name }
35 lexer = Zero::Lexer.new( '1' )
38 token = lexer.next_token
60 lexer = Binary::Lexer.new( '01' )
62 token = lexer.next_token
65 token = lexer.next_token
[all …]
/external/pdfium/xfa/fxfa/fm2js/
Dcxfa_fmlexer_unittest.cpp14 CXFA_FMLexer lexer(null_string); in TEST() local
15 CXFA_FMToken token = lexer.NextToken(); in TEST()
17 EXPECT_TRUE(lexer.IsComplete()); in TEST()
21 CXFA_FMLexer lexer(L""); in TEST() local
22 CXFA_FMToken token = lexer.NextToken(); in TEST()
24 EXPECT_TRUE(lexer.IsComplete()); in TEST()
28 auto lexer = pdfium::MakeUnique<CXFA_FMLexer>(L"-12"); in TEST() local
29 CXFA_FMToken token = lexer->NextToken(); in TEST()
32 token = lexer->NextToken(); in TEST()
34 token = lexer->NextToken(); in TEST()
[all …]
/external/antlr/runtime/Python/tests/
Dt025lexerRulePropertyRef.py13 lexer = self.getLexer(stream)
16 token = lexer.nextToken()
20 assert len(lexer.properties) == 3, lexer.properties
22 text, type, line, pos, index, channel, start, stop = lexer.properties[0]
23 assert text == 'foobar', lexer.properties[0]
24 assert type == self.lexerModule.IDENTIFIER, lexer.properties[0]
25 assert line == 1, lexer.properties[0]
26 assert pos == 0, lexer.properties[0]
27 assert index == -1, lexer.properties[0]
28 assert channel == antlr3.DEFAULT_CHANNEL, lexer.properties[0]
[all …]
/external/nist-sip/java/gov/nist/core/
DHostNameParser.java66 this.lexer = new LexerCore("charLexer", hname); in HostNameParser()
75 public HostNameParser(LexerCore lexer) { in HostNameParser() argument
76 this.lexer = lexer; in HostNameParser()
77 lexer.selectLexer("charLexer"); in HostNameParser()
89 lexer.consumeValidChars(VALID_DOMAIN_LABEL_CHAR); in consumeDomainLabel()
104 while (lexer.hasMoreChars()) { in ipv6Reference()
105 char la = lexer.lookAhead(0); in ipv6Reference()
110 lexer.consume(1); in ipv6Reference()
113 lexer.consume(1); in ipv6Reference()
118 lexer.consume(1); in ipv6Reference()
[all …]
/external/antlr/runtime/Python3/tests/
Dt025lexerRulePropertyRef.py13 lexer = self.getLexer(stream)
16 token = lexer.nextToken()
20 self.assertEqual(len(lexer.properties), 3, lexer.properties)
22 text, type, line, pos, index, channel, start, stop = lexer.properties[0]
23 self.assertEqual(text, 'foobar', lexer.properties[0])
24 self.assertEqual(type, self.lexerModule.IDENTIFIER, lexer.properties[0])
25 self.assertEqual(line, 1, lexer.properties[0])
26 self.assertEqual(pos, 0, lexer.properties[0])
27 self.assertEqual(index, -1, lexer.properties[0])
28 self.assertEqual(channel, antlr3.DEFAULT_CHANNEL, lexer.properties[0])
[all …]
/external/antlr/runtime/Ruby/test/functional/ast-output/
Dtree-rewrite.rb1005 lexer = FlatList::Lexer.new( "abc 34" )
1006 tokens = ANTLR3::CommonTokenStream.new( lexer )
1019 lexer = SimpleTree::Lexer.new( "abc 34" )
1020 tokens = ANTLR3::CommonTokenStream.new( lexer )
1033 lexer = CombinedRewriteAndAuto::Lexer.new( "abc 34" )
1034 tokens = ANTLR3::CommonTokenStream.new( lexer )
1043 lexer = CombinedRewriteAndAuto::Lexer.new( "34" )
1044 tokens = ANTLR3::CommonTokenStream.new( lexer )
1056 lexer = AvoidDup::Lexer.new( "abc" )
1057 tokens = ANTLR3::CommonTokenStream.new( lexer )
[all …]
/external/antlr/runtime/Ruby/test/functional/parser/
Dscopes.rb30 lexer = SimpleScope::Lexer.new( 'foobar' )
31 parser = SimpleScope::Parser.new lexer
178 lexer = LotsaScopes::Lexer.new( "foobar" )
179 parser = LotsaScopes::Parser.new lexer
184 lexer = LotsaScopes::Lexer.new( "foobar" )
185 parser = LotsaScopes::Parser.new lexer
190 lexer = LotsaScopes::Lexer.new( "foobar" )
191 parser = LotsaScopes::Parser.new lexer
196 lexer = LotsaScopes::Lexer.new( <<-END.here_indent! )
203 parser = LotsaScopes::Parser.new lexer
[all …]

12345678910>>...33