59 value_t::sequence_t::const_iterator begin;
60 value_t::sequence_t::const_iterator end;
62 string::const_iterator prev_arg_i;
63 string::const_iterator arg_i;
64 string::const_iterator arg_end;
66 bool consume_whitespace;
67 bool consume_next_arg;
133 case UNKNOWN:
return "UNKNOWN";
134 case LPAREN:
return "LPAREN";
135 case RPAREN:
return "RPAREN";
136 case TOK_NOT:
return "TOK_NOT";
137 case TOK_AND:
return "TOK_AND";
138 case TOK_OR:
return "TOK_OR";
139 case TOK_EQ:
return "TOK_EQ";
149 case TOK_FOR:
return "TOK_FOR";
188#if !defined(__clang__)
199 value_t::sequence_t::const_iterator
_end,
202 consume_whitespace(
false), consume_next_arg(
false),
206 arg_i = (*begin).as_string().begin();
207 arg_end = (*begin).as_string().end();
212 : begin(lexer.begin), end(lexer.end),
213 arg_i(lexer.arg_i), arg_end(lexer.arg_end),
214 consume_whitespace(lexer.consume_whitespace),
215 consume_next_arg(lexer.consume_next_arg),
268 bool multiple_args =
true)
269 : args(
_args), lexer(args.begin(), args.end(), multiple_args),
305 bool multiple_args =
true) {
314 bool multiple_args =
true) {
316 parse_args(args, what_to_keep, multiple_args);
327 bool multiple_args =
true,
339 query_map_t::const_iterator
i =
parser->query_map.find(
id);
340 if (
i !=
parser->query_map.end())
#define TRACE_CTOR(cls, args)
value_t string_value(const string &str="")
intrusive_ptr< op_t > ptr_op_t
bool has_query(const kind_t &id) const
expr_t::ptr_op_t parse_args(const value_t &args, const keep_details_t &what_to_keep=keep_details_t(), bool multiple_args=true, bool subexpression=false)
optional< parser_t > parser
string get_query(const kind_t &id) const
query_t(const value_t &args, const keep_details_t &what_to_keep=keep_details_t(), bool multiple_args=true)
std::map< kind_t, string > query_map_t
query_t(const string &arg, const keep_details_t &what_to_keep=keep_details_t(), bool multiple_args=true)
query_t(const query_t &other)
lexer_t(const lexer_t &lexer)
void push_token(token_t tok)
lexer_t(value_t::sequence_t::const_iterator _begin, value_t::sequence_t::const_iterator _end, bool _multiple_args=true)
token_t peek_token(token_t::kind_t tok_context=token_t::UNKNOWN)
token_t next_token(token_t::kind_t tok_context=token_t::UNKNOWN)
bool unbalanced_braces(const string str)
token_t & operator=(const token_t &tok)
token_t(const token_t &tok)
enum ledger::query_t::lexer_t::token_t::kind_t kind
token_t(kind_t _kind=UNKNOWN, const optional< string > &_value=none)
void expected(char wanted)
expr_t::ptr_op_t parse(bool subexpression=false)
parser_t(const value_t &_args, const keep_details_t &_what_to_keep=keep_details_t(), bool multiple_args=true)
parser_t(const parser_t &other)
Dynamic type representing various numeric types.