72 index(int64_t i, int64_t s, int64_t e,
bool r,
bool em, std::string n)
73 : start(i), stride(s), stop(e), rest(r), empty(em), dim_name{std::move(n)} {}
76 static index make_index() {
return {0, 1, 0,
true ,
true ,
""}; }
78 static index make_index(
const std::string &is);
80 static index make_index(
const std::string &i,
const std::string &s,
const std::string &e);
81 static index make_index(
const std::string &i, int64_t s,
const std::string &e);
83 static index make_index(
const std::string &i,
const std::string &s);
84 static index make_index(
const std::string &i, int64_t s);
86 bool d_trace_scanning =
false;
87 bool d_trace_parsing =
false;
88 bool d_result =
false;
93 std::vector<index> d_indexes;
95 std::stack<BaseType *> d_basetype_stack;
99 std::string *expression() {
return &d_expr; }
101 void search_for_and_mark_arrays(
BaseType *btp);
105 const D4ConstraintEvaluator::index &index);
107 D4Dimension *slice_dimension(
const std::string &
id,
const index &i);
109 void push_index(
const index &i) { d_indexes.push_back(i); }
111 void push_basetype(
BaseType *btp) { d_basetype_stack.push(btp); }
112 BaseType *top_basetype()
const {
return d_basetype_stack.empty() ? nullptr : d_basetype_stack.top(); }
114 void pop_basetype() { d_basetype_stack.pop(); }
116 [[noreturn]]
static void throw_not_found(
const std::string &
id,
const std::string &ident);
117 [[noreturn]]
static void throw_not_array(
const std::string &
id,
const std::string &ident);
120 void add_filter_clause(
const std::string &op,
const std::string &arg1,
const std::string &arg2)
const;
122 static std::string &remove_quotes(std::string &src);
133 bool parse(
const std::string &expr);
147 [[noreturn]]
static void error(
const libdap::location &l,
const std::string &m);