Home
last modified time | relevance | path

Searched refs:Lexer (Results 1 – 25 of 159) sorted by relevance

1234567

/third_party/ninja/src/
Dlexer_test.cc20 TEST(Lexer, ReadVarValue) { in TEST() argument
21 Lexer lexer("plain text $var $VaR ${x}\n"); in TEST()
30 TEST(Lexer, ReadEvalStringEscapes) { in TEST() argument
31 Lexer lexer("$ $$ab c$: $\ncde\n"); in TEST()
40 TEST(Lexer, ReadIdent) { in TEST() argument
41 Lexer lexer("foo baR baz_123 foo-bar"); in TEST()
53 TEST(Lexer, ReadIdentCurlies) { in TEST() argument
56 Lexer lexer("foo.dots $bar.dots ${bar.dots}\n"); in TEST()
69 TEST(Lexer, Error) { in TEST() argument
70 Lexer lexer("foo$\nbad $"); in TEST()
[all …]
Dlexer.in.cc22 bool Lexer::Error(const string& message, string* err) { in Error()
61 Lexer::Lexer(const char* input) { in Lexer() function in Lexer
65 void Lexer::Start(StringPiece filename, StringPiece input) { in Start()
72 const char* Lexer::TokenName(Token t) { in TokenName()
93 const char* Lexer::TokenErrorHint(Token expected) { in TokenErrorHint()
102 string Lexer::DescribeLastError() { in DescribeLastError()
112 void Lexer::UnreadToken() { in UnreadToken()
116 Lexer::Token Lexer::ReadToken() { in ReadToken()
120 Lexer::Token token; in ReadToken()
160 bool Lexer::PeekToken(Token token) { in PeekToken()
[all …]
Dmanifest_parser.cc38 Lexer::Token token = lexer_.ReadToken(); in Parse()
40 case Lexer::POOL: in Parse()
44 case Lexer::BUILD: in Parse()
48 case Lexer::RULE: in Parse()
52 case Lexer::DEFAULT: in Parse()
56 case Lexer::IDENT: { in Parse()
70 case Lexer::INCLUDE: in Parse()
74 case Lexer::SUBNINJA: in Parse()
78 case Lexer::ERROR: { in Parse()
81 case Lexer::TEOF: in Parse()
[all …]
Ddyndep_parser.cc40 Lexer::Token token = lexer_.ReadToken(); in Parse()
42 case Lexer::BUILD: { in Parse()
49 case Lexer::IDENT: { in Parse()
52 return lexer_.Error(string("unexpected ") + Lexer::TokenName(token), in Parse()
59 case Lexer::ERROR: in Parse()
61 case Lexer::TEOF: in Parse()
65 case Lexer::NEWLINE: in Parse()
68 return lexer_.Error(string("unexpected ") + Lexer::TokenName(token), in Parse()
97 if (!ExpectToken(Lexer::EQUALS, err)) in ParseLet()
142 if (lexer_.PeekToken(Lexer::PIPE)) { in ParseEdge()
[all …]
Dparser.cc20 bool Parser::Load(const string& filename, string* err, Lexer* parent) { in Load()
42 bool Parser::ExpectToken(Lexer::Token expected, string* err) { in ExpectToken()
43 Lexer::Token token = lexer_.ReadToken(); in ExpectToken()
45 string message = string("expected ") + Lexer::TokenName(expected); in ExpectToken()
46 message += string(", got ") + Lexer::TokenName(token); in ExpectToken()
47 message += Lexer::TokenErrorHint(expected); in ExpectToken()
/third_party/boost/boost/spirit/home/lex/
Dtokenize_and_parse.hpp73 template <typename Iterator, typename Lexer, typename ParserExpr>
75 tokenize_and_parse(Iterator& first, Iterator last, Lexer const& lex, in tokenize_and_parse()
83 typename Lexer::iterator_type iter = lex.begin(first, last); in tokenize_and_parse()
89 template <typename Iterator, typename Lexer, typename ParserExpr
92 tokenize_and_parse(Iterator& first, Iterator last, Lexer const& lex in tokenize_and_parse()
100 typename Lexer::iterator_type iter = lex.begin(first, last); in tokenize_and_parse()
155 template <typename Iterator, typename Lexer, typename ParserExpr
159 , Lexer const& lex, ParserExpr const& xpr, Skipper const& skipper in tokenize_and_phrase_parse()
173 typename Lexer::iterator_type iter = lex.begin(first, last); in tokenize_and_phrase_parse()
174 typename Lexer::iterator_type end = lex.end(); in tokenize_and_phrase_parse()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/MC/MCParser/
DWasmAsmParser.cpp36 MCAsmLexer *Lexer = nullptr; member in __anon70acb4eb0111::WasmAsmParser
51 Lexer = &Parser->getLexer(); in Initialize()
75 auto Ok = Lexer->is(Kind); in isNext()
84 Lexer->getTok()); in expect()
101 return error("Expected section flags, instead got: ", Lexer->getTok()); in parseSectionFlags()
114 if (Lexer->isNot(AsmToken::String)) in parseSectionDirective()
115 return error("expected string in directive, instead got: ", Lexer->getTok()); in parseSectionDirective()
129 return Parser->Error(Lexer->getLoc(), "unknown section kind: " + Name); in parseSectionDirective()
179 if (!Lexer->is(AsmToken::Identifier)) in parseDirectiveType()
181 Lexer->getTok()); in parseDirectiveType()
[all …]
DAsmParser.cpp123 AsmLexer Lexer; member in __anoncbbc4b130111::AsmParser
209 MCAsmLexer &getLexer() override { return Lexer; } in getLexer()
235 Lexer.setLexMasmIntegers(V); in setParsingInlineAsm()
703 : Lexer(MAI), Ctx(Ctx), Out(Out), MAI(MAI), SrcMgr(SM), in AsmParser()
711 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in AsmParser()
786 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in enterIncludeFile()
791 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in enterIncludeFile()
802 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in processIncbinFile()
823 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(), in jumpToLoc()
828 if (Lexer.getTok().is(AsmToken::Error)) in Lex()
[all …]
/third_party/boost/libs/spirit/example/lex/
Dexample5.cpp43 template <typename Lexer>
44 struct example5_base_tokens : lex::lexer<Lexer>
94 template <typename Iterator, typename Lexer>
96 : qi::grammar<Iterator, qi::in_state_skipper<Lexer> >
148 typedef qi::in_state_skipper<Lexer> skipper_type;
162 template <typename Lexer>
163 struct example5_tokens : example5_base_tokens<Lexer>
165 typedef example5_base_tokens<Lexer> base_type;
188 template <typename Iterator, typename Lexer>
189 struct example5_grammar : example5_base_grammar<Iterator, Lexer>
[all …]
Dexample4.cpp41 template <typename Lexer>
42 struct example4_tokens : lex::lexer<Lexer>
90 template <typename Iterator, typename Lexer>
92 : qi::grammar<Iterator, qi::in_state_skipper<Lexer> >
148 qi::rule<Iterator, qi::in_state_skipper<Lexer> > program, block, statement;
149 qi::rule<Iterator, qi::in_state_skipper<Lexer> > assignment, if_stmt;
150 qi::rule<Iterator, qi::in_state_skipper<Lexer> > while_stmt;
153 qi::rule<Iterator, expression_type(), qi::in_state_skipper<Lexer> > expression;
Dexample6.cpp57 template <typename Lexer>
58 struct example6_tokens : lex::lexer<Lexer>
109 template <typename Iterator, typename Lexer>
111 : qi::grammar<Iterator, qi::in_state_skipper<Lexer> >
170 qi::rule<Iterator, qi::in_state_skipper<Lexer> > program, block, statement;
171 qi::rule<Iterator, qi::in_state_skipper<Lexer> > assignment, if_stmt;
172 qi::rule<Iterator, qi::in_state_skipper<Lexer> > while_stmt;
175 qi::rule<Iterator, expression_type(), qi::in_state_skipper<Lexer> > expression;
/third_party/boost/libs/spirit/test/lex/
Dsemantic_actions.cpp25 template <typename Lexer>
26 struct lexer_sa0 : lex::lexer<Lexer>
46 template <typename Lexer>
47 struct lexer_sa2 : lex::lexer<Lexer>
67 template <typename Lexer>
68 struct lexer_sa3_normal : lex::lexer<Lexer>
84 template <typename Lexer>
85 struct lexer_sa3_fail : lex::lexer<Lexer>
101 template <typename Lexer>
102 struct lexer_sa3_ignore : lex::lexer<Lexer>
[all …]
Dtest_parser.hpp15 template <typename Char, typename Parser, typename Lexer>
16 inline bool test_parser(Char const* in, Parser const& p, Lexer& lex, in test_parser()
27 typedef typename Lexer::iterator_type iterator_type; in test_parser()
36 template <typename Char, typename Parser, typename Lexer, typename Skipper>
37 inline bool test_parser(Char const* in, Parser const& p, Lexer& lex, in test_parser()
48 typedef typename Lexer::iterator_type iterator_type; in test_parser()
/third_party/boost/libs/spirit/doc/lex/
Dconcepts.qbk9 [section:lexer_concepts Lexer Concepts]
12 /Lexer/ is the most fundamental concept. All __lex__ components are
13 models of the /Lexer/ concept. /PrimitiveLexer/, /UnaryLexer/,
14 and /NaryLexer/ are all refinements of the /Lexer/ concept.
19 [section Lexer]
23 The /Lexer/ is the most fundamental concept. A Lexer has a member
27 Each Lexer can represent a specific pattern or algorithm, or it
28 can be a more complex lexer component formed as a composition of other Lexer's.
29 Additionally, a Lexer exposes a member `add_actions`, that accepts the token
34 [[`l`] [A `Lexer`.]]
[all …]
Dlexer_states.qbk9 [section:lexer_states Lexer States]
12 [heading Controlling the Lexer State from Lexer Semantic Actions]
15 [heading Controlling the Lexer State from Parser Semantic Actions]
18 [heading Using a Lexer State for the Skip Parser]
/third_party/spirv-tools/tools/sva/src/
Dlexer_test.js16 import Lexer from "./lexer";
23 let l = new Lexer(input);
41 let l = new Lexer(input);
63 let l = new Lexer(val);
80 let l = new Lexer(val);
95 let l = new Lexer(val);
123 let l = new Lexer(input);
136 let l = new Lexer(input);
151 let l = new Lexer(input);
160 let l = new Lexer(input);
[all …]
Dparser_test.js16 import Lexer from "./lexer";
23 let l = new Lexer(input);
38 let l = new Lexer(input);
58 let l = new Lexer(input);
78 let l = new Lexer(input);
89 let l = new Lexer(input);
109 let l = new Lexer(input);
127 let l = new Lexer(input);
148 let l = new Lexer(input);
176 let l = new Lexer(input);
[all …]
Dassembler_test.js16 import Lexer from "./lexer";
41 let l = new Lexer(input);
55 let l = new Lexer(input);
76 let l = new Lexer(input);
95 let l = new Lexer(input);
113 let l = new Lexer(input);
131 let l = new Lexer(input);
149 let l = new Lexer(input);
/third_party/skia/third_party/externals/spirv-tools/tools/sva/src/
Dlexer_test.js16 import Lexer from "./lexer";
23 let l = new Lexer(input);
41 let l = new Lexer(input);
63 let l = new Lexer(val);
80 let l = new Lexer(val);
95 let l = new Lexer(val);
123 let l = new Lexer(input);
136 let l = new Lexer(input);
151 let l = new Lexer(input);
160 let l = new Lexer(input);
[all …]
Dparser_test.js16 import Lexer from "./lexer";
23 let l = new Lexer(input);
38 let l = new Lexer(input);
58 let l = new Lexer(input);
78 let l = new Lexer(input);
89 let l = new Lexer(input);
109 let l = new Lexer(input);
127 let l = new Lexer(input);
148 let l = new Lexer(input);
176 let l = new Lexer(input);
[all …]
Dassembler_test.js16 import Lexer from "./lexer";
41 let l = new Lexer(input);
55 let l = new Lexer(input);
76 let l = new Lexer(input);
95 let l = new Lexer(input);
113 let l = new Lexer(input);
131 let l = new Lexer(input);
149 let l = new Lexer(input);
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/tools/sva/src/
Dlexer_test.js16 import Lexer from "./lexer";
23 let l = new Lexer(input);
41 let l = new Lexer(input);
63 let l = new Lexer(val);
80 let l = new Lexer(val);
95 let l = new Lexer(val);
123 let l = new Lexer(input);
136 let l = new Lexer(input);
151 let l = new Lexer(input);
160 let l = new Lexer(input);
[all …]
Dparser_test.js16 import Lexer from "./lexer";
23 let l = new Lexer(input);
38 let l = new Lexer(input);
58 let l = new Lexer(input);
78 let l = new Lexer(input);
89 let l = new Lexer(input);
109 let l = new Lexer(input);
127 let l = new Lexer(input);
148 let l = new Lexer(input);
176 let l = new Lexer(input);
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/WebAssembly/AsmParser/
DWebAssemblyAsmParser.cpp163 MCAsmLexer &Lexer; member in __anon357cdf260111::WebAssemblyAsmParser
205 Lexer(Parser.getLexer()) { in WebAssemblyAsmParser()
223 return Parser.Error(Lexer.getTok().getLoc(), Msg); in error()
273 auto Ok = Lexer.is(Kind); in isNext()
282 Lexer.getTok()); in expect()
287 if (!Lexer.is(AsmToken::Identifier)) { in expectIdent()
288 error("Expected identifier, got: ", Lexer.getTok()); in expectIdent()
291 auto Name = Lexer.getTok().getString(); in expectIdent()
330 while (Lexer.is(AsmToken::Identifier)) { in parseRegTypeList()
331 auto Type = parseType(Lexer.getTok().getString()); in parseRegTypeList()
[all …]
/third_party/boost/libs/spirit/doc/
Doutline.txt48 Parsing using a Lexer
49 Lexer Primitives
50 Lexer States
51 Lexer Attributes
52 Lexer Semantic Actions
56 Lexer
60 Lexer Class

1234567