📄 parse.cc
字号:
#include "parser.ih"rPredicate Parser::parse(std::string const &_msg){ Token tok; rPredicate pred = new Predicate(Predicate::type_list); tok.type = Token::none; // Initialize the lexer. initLex(_msg); while (true) { // lex the next token. tok = lex(); // LPARENT | END_OF_LINE if (tok.type == Token::lparent) { lexPushBack(tok); pred->push(parsePred()); } else if (tok.type == Token::end_of_line) { break; } else throw parser_error("parser error, expected '(' or END_OF_LINE"); } return pred;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -