26#ifndef ROUTING_SQL_PARSER_INCLUDED
27#define ROUTING_SQL_PARSER_INCLUDED
47 operator bool()
const {
return !
txt_.empty(); }
49 [[nodiscard]] std::string_view
text()
const {
return txt_; }
99 if (
auto txt =
accept(sym)) {
103 error_ =
"expected sym, got ...";
Definition: sql_lexer.h:41
int TokenId
Definition: sql_lexer.h:37
Definition: sql_parser.h:41
TokenText(SqlLexer::TokenId id, std::string_view txt)
Definition: sql_parser.h:44
SqlLexer::TokenId id_
Definition: sql_parser.h:53
std::string_view txt_
Definition: sql_parser.h:54
SqlLexer::TokenId id() const
Definition: sql_parser.h:50
std::string_view text() const
Definition: sql_parser.h:49
Definition: sql_parser.h:36
TokenText accept_if_not(int sym)
Definition: sql_parser.h:70
SqlLexer::iterator cur_
Definition: sql_parser.h:110
TokenText accept(int sym)
Definition: sql_parser.h:83
SqlParser(SqlLexer::iterator first, SqlLexer::iterator last)
Definition: sql_parser.h:38
std::string error_
Definition: sql_parser.h:113
bool has_error() const
Definition: sql_parser.h:108
TokenText ident()
Definition: sql_parser.h:60
SqlLexer::iterator end_
Definition: sql_parser.h:111
TokenText expect(int sym)
Definition: sql_parser.h:96
TokenText token() const
Definition: sql_parser.h:57
@ IDENT_QUOTED
Definition: sql_yacc.h:282
@ IDENT
Definition: sql_yacc.h:280
std::string_view text
Definition: sql_lexer.h:44
TokenId id
Definition: sql_lexer.h:45
unsigned long id[MAX_DEAD]
Definition: xcom_base.cc:510