5 #ifndef JODA_AS_ACTIONS_H
6 #define JODA_AS_ACTIONS_H
8 #include "../grammar/Grammar.h"
9 #include "../states/States.h"
33 template <
typename Input>
36 if (!state.
projs.empty())
37 throw tao::pegtl::parse_error(
"'*' has to be the first projection", in);
44 template <
typename Input>
48 std::string
pointer = in.string();
49 state.
putValProv(std::make_unique<joda::query::PointerProvider>(
56 template <
typename Input>
59 std::string
pointer = in.string();
69 DCHECK(state.
valprov ==
nullptr);
70 state.
projs.push_back(
71 std::make_unique<joda::query::DeletePointerProjector>(
76 std::make_unique<joda::query::FlattenProjector>(
80 assert(state.
valprov !=
nullptr);
83 if (state.
toPointer ==
"" && pProv !=
nullptr &&
84 pProv->toString() ==
"''") {
85 state.
projs.push_back(
86 std::make_unique<joda::query::PointerCopyProject>(
"",
""));
89 state.
projs.push_back(
90 std::make_unique<joda::query::ValueProviderProjector>(
97 DCHECK(state.
valprov ==
nullptr);
99 state.
projs.push_back(
100 std::make_unique<joda::query::PointerCopyProject>(
"",
""));
107 assert(state.
valprov ==
nullptr);
Definition: PointerProvider.h:17
@ NOPROJ
Definition: As_State.h:15
@ allCopyProj
Definition: As_State.h:15
@ arrFlatProj
Definition: As_State.h:15
@ valProvProj
Definition: As_State.h:15
static void apply0(asState &state)
Definition: As_Actions.h:19
static void apply(const Input &in, asState &state)
Definition: As_Actions.h:45
static void apply(const Input &in, asState &state)
Definition: As_Actions.h:34
static void apply0(asState &state)
Definition: As_Actions.h:25
static void apply0(asState &state)
Definition: As_Actions.h:66
static void apply(const Input &in, asState &state)
Definition: As_Actions.h:57
Definition: As_State.h:17
std::vector< std::unique_ptr< joda::query::ISetProjector > > setprojs
Definition: As_State.h:51
bool putValProv(std::unique_ptr< joda::query::IValueProvider > &&val)
Definition: As_State.h:36
projFun fun
Definition: As_State.h:48
std::string toPointer
Definition: As_State.h:47
std::unique_ptr< joda::query::IValueProvider > valprov
Definition: As_State.h:49
std::vector< std::unique_ptr< joda::query::IProjector > > projs
Definition: As_State.h:50
Definition: Literals.h:114
Definition: Literals.h:27