Lines Matching refs:Parser
17 #include "parser.h"
37 class Parser {
44 typedef void (Parser::*DirectiveHandler)(
49 Parser(StringPiece buf, const char* filename, vector<Stmt*>* stmts)
60 Parser(StringPiece buf, const Loc& loc, vector<Stmt*>* stmts)
70 ~Parser() {
103 (*make_directives_)["include"] = &Parser::ParseInclude;
104 (*make_directives_)["-include"] = &Parser::ParseInclude;
105 (*make_directives_)["sinclude"] = &Parser::ParseInclude;
106 (*make_directives_)["define"] = &Parser::ParseDefine;
107 (*make_directives_)["ifdef"] = &Parser::ParseIfdef;
108 (*make_directives_)["ifndef"] = &Parser::ParseIfdef;
109 (*make_directives_)["ifeq"] = &Parser::ParseIfeq;
110 (*make_directives_)["ifneq"] = &Parser::ParseIfeq;
111 (*make_directives_)["else"] = &Parser::ParseElse;
112 (*make_directives_)["endif"] = &Parser::ParseEndif;
113 (*make_directives_)["override"] = &Parser::ParseOverride;
114 (*make_directives_)["export"] = &Parser::ParseExport;
115 (*make_directives_)["unexport"] = &Parser::ParseUnexport;
118 (*else_if_directives_)["ifdef"] = &Parser::ParseIfdef;
119 (*else_if_directives_)["ifndef"] = &Parser::ParseIfdef;
120 (*else_if_directives_)["ifeq"] = &Parser::ParseIfeq;
121 (*else_if_directives_)["ifneq"] = &Parser::ParseIfeq;
124 (*assign_directives_)["define"] = &Parser::ParseDefine;
125 (*assign_directives_)["export"] = &Parser::ParseExport;
126 (*assign_directives_)["override"] = &Parser::ParseOverride;
548 Parser parser(StringPiece(mk->buf()),
551 parser.Parse();
556 Parser parser(buf, loc, out_stmts);
557 parser.Parse();
562 Parser parser(buf, loc, out_stmts);
563 parser.set_state(ParserState::NOT_AFTER_RULE);
564 parser.Parse();
568 Parser::Init();
572 Parser::Quit();
575 Parser::DirectiveMap* Parser::make_directives_;
576 Parser::DirectiveMap* Parser::else_if_directives_;
577 Parser::DirectiveMap* Parser::assign_directives_;
578 size_t Parser::shortest_directive_len_;
579 size_t Parser::longest_directive_len_;
580 vector<ParseErrorStmt*> Parser::parse_errors;
606 return Parser::parse_errors;