summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Tuckman <ted.tuckman@mongodb.com>2020-07-24 08:13:44 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-04 18:32:24 +0000
commit4c4ce2bb432dacd0e771a9eae1572c86e7e0519b (patch)
tree2daf14d0ff5656d059c321e51acc04b4fe9825dc
parent0e3bd22e59a51dcdfc7fdac6d96dcda22e2e6647 (diff)
downloadmongo-4c4ce2bb432dacd0e771a9eae1572c86e7e0519b.tar.gz
SERVER-48861 Add arithmetic expressions to grammar
-rw-r--r--src/mongo/db/cst/bson_lexer.cpp15
-rw-r--r--src/mongo/db/cst/cst_pipeline_translation.cpp30
-rw-r--r--src/mongo/db/cst/cst_pipeline_translation_test.cpp140
-rw-r--r--src/mongo/db/cst/cst_test.cpp193
-rw-r--r--src/mongo/db/cst/key_fieldname.h15
-rw-r--r--src/mongo/db/cst/location_gen.h18
-rw-r--r--src/mongo/db/cst/pipeline_grammar.yy154
-rw-r--r--src/mongo/db/cst/pipeline_parser_gen.cpp3048
-rw-r--r--src/mongo/db/cst/pipeline_parser_gen.hpp1440
-rw-r--r--src/mongo/db/pipeline/expression.h35
10 files changed, 3238 insertions, 1850 deletions
diff --git a/src/mongo/db/cst/bson_lexer.cpp b/src/mongo/db/cst/bson_lexer.cpp
index 3d8c5683783..6e8c4088615 100644
--- a/src/mongo/db/cst/bson_lexer.cpp
+++ b/src/mongo/db/cst/bson_lexer.cpp
@@ -80,6 +80,21 @@ const StringMap<PipelineParserGen::token_type> reservedKeyLookup = {
{"$toObjectId", PipelineParserGen::token::TO_OBJECT_ID},
{"$toString", PipelineParserGen::token::TO_STRING},
{"$type", PipelineParserGen::token::TYPE},
+ {"$abs", PipelineParserGen::token::ABS},
+ {"$ceil", PipelineParserGen::token::CEIL},
+ {"$divide", PipelineParserGen::token::DIVIDE},
+ {"$exp", PipelineParserGen::token::EXPONENT},
+ {"$floor", PipelineParserGen::token::FLOOR},
+ {"$ln", PipelineParserGen::token::LN},
+ {"$log", PipelineParserGen::token::LOG},
+ {"$log10", PipelineParserGen::token::LOGTEN},
+ {"$mod", PipelineParserGen::token::MOD},
+ {"$multiply", PipelineParserGen::token::MULTIPLY},
+ {"$pow", PipelineParserGen::token::POW},
+ {"$round", PipelineParserGen::token::ROUND},
+ {"$sqrt", PipelineParserGen::token::SQRT},
+ {"$subtract", PipelineParserGen::token::SUBTRACT},
+ {"$trunc", PipelineParserGen::token::TRUNC},
};
bool isCompound(PipelineParserGen::symbol_type token) {
return token.type_get() == static_cast<int>(PipelineParserGen::token::START_OBJECT) ||
diff --git a/src/mongo/db/cst/cst_pipeline_translation.cpp b/src/mongo/db/cst/cst_pipeline_translation.cpp
index 29babc351ba..eefe6e3782c 100644
--- a/src/mongo/db/cst/cst_pipeline_translation.cpp
+++ b/src/mongo/db/cst/cst_pipeline_translation.cpp
@@ -254,6 +254,36 @@ boost::intrusive_ptr<Expression> translateFunctionObject(
expCtx.get(), std::move(expressions[0]), BSONType::String);
case KeyFieldname::type:
return make_intrusive<ExpressionType>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::abs:
+ return make_intrusive<ExpressionAbs>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::ceil:
+ return make_intrusive<ExpressionCeil>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::divide:
+ return make_intrusive<ExpressionDivide>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::exponent:
+ return make_intrusive<ExpressionExp>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::floor:
+ return make_intrusive<ExpressionFloor>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::ln:
+ return make_intrusive<ExpressionLn>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::log:
+ return make_intrusive<ExpressionLog>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::logten:
+ return make_intrusive<ExpressionLog10>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::mod:
+ return make_intrusive<ExpressionMod>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::multiply:
+ return make_intrusive<ExpressionMultiply>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::pow:
+ return make_intrusive<ExpressionPow>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::round:
+ return make_intrusive<ExpressionRound>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::sqrt:
+ return make_intrusive<ExpressionSqrt>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::subtract:
+ return make_intrusive<ExpressionSubtract>(expCtx.get(), std::move(expressions));
+ case KeyFieldname::trunc:
+ return make_intrusive<ExpressionTrunc>(expCtx.get(), std::move(expressions));
default:
MONGO_UNREACHABLE;
}
diff --git a/src/mongo/db/cst/cst_pipeline_translation_test.cpp b/src/mongo/db/cst/cst_pipeline_translation_test.cpp
index c7b260f56be..097c98000d0 100644
--- a/src/mongo/db/cst/cst_pipeline_translation_test.cpp
+++ b/src/mongo/db/cst/cst_pipeline_translation_test.cpp
@@ -742,5 +742,145 @@ TEST(CstPipelineTranslationTest, TranslatesTypeExpression) {
ASSERT(dynamic_cast<ExpressionType*>(expr.get()));
}
+
+TEST(CstTest, AbsConstantTranslation) {
+ auto cst = CNode{CNode::ObjectChildren{{KeyFieldname::abs, CNode{UserInt{-1}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$abs: [{$const: -1}]}")) ==
+ expr->serialize(false)));
+ cst = CNode{CNode::ObjectChildren{{KeyFieldname::abs, CNode{UserDouble{-1.534}}}}};
+ expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$abs: [{$const: -1.534}]}")) ==
+ expr->serialize(false)));
+}
+
+TEST(CstTest, AbsVariableTransation) {
+ const auto cst = CNode{CNode::ObjectChildren{{KeyFieldname::abs, CNode{UserString{"$foo"}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ // TODO SERVER-49927 This should be a field path.
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$abs: [{$const: \"$foo\"}]}")) ==
+ expr->serialize(false)));
+}
+
+TEST(CstTest, CeilTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{{KeyFieldname::ceil, CNode{UserDouble{1.578}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$ceil: [{$const: 1.578}]}")) ==
+ expr->serialize(false)));
+}
+TEST(CstTest, DivideTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{
+ {KeyFieldname::divide,
+ CNode{CNode::ArrayChildren{CNode{UserDouble{1.5}}, CNode{UserDouble{1}}}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(
+ Value(fromjson("{$divide: [{$const: 1.5}, {$const: 1}]}")) == expr->serialize(false)));
+}
+
+TEST(CstTest, ExpTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{{KeyFieldname::exponent, CNode{UserDouble{1.5}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$exp: [{$const: 1.5}]}")) ==
+ expr->serialize(false)));
+}
+
+TEST(CstTest, FloorTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{{KeyFieldname::floor, CNode{UserDouble{1.5}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$floor: [{$const: 1.5}]}")) ==
+ expr->serialize(false)));
+}
+TEST(CstTest, LnTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{{KeyFieldname::ln, CNode{UserDouble{1.5}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$ln: [{$const: 1.5}]}")) ==
+ expr->serialize(false)));
+}
+
+TEST(CstTest, LogTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{
+ {KeyFieldname::ln,
+ CNode{CNode::ArrayChildren{CNode{UserDouble{1.5}}, CNode{UserDouble{10}}}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(
+ Value(fromjson("{$ln: [{$const: 1.5}, {$const: 10}]}")) == expr->serialize(false)));
+}
+
+TEST(CstTest, LogTenTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{{KeyFieldname::logten, CNode{UserDouble{1.5}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$log10: [{$const: 1.5}]}")) ==
+ expr->serialize(false)));
+}
+
+TEST(CstTest, ModTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{
+ {KeyFieldname::mod,
+ CNode{CNode::ArrayChildren{CNode{UserDouble{15}}, CNode{UserDouble{10}}}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(
+ Value(fromjson("{$mod: [{$const: 15}, {$const: 10}]}")) == expr->serialize(false)));
+}
+
+TEST(CstTest, MultiplyTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{
+ {KeyFieldname::multiply,
+ CNode{CNode::ArrayChildren{
+ CNode{UserDouble{15}}, CNode{UserDouble{10}}, CNode{UserDouble{2}}}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(
+ Value(fromjson("{$multiply: [{$const: 15}, {$const: 10}, {$const: 2}]}")) ==
+ expr->serialize(false)));
+}
+
+TEST(CstTest, PowTranslationTest) {
+ auto cst = CNode{CNode::ObjectChildren{
+ {KeyFieldname::pow,
+ CNode{CNode::ArrayChildren{CNode{UserDouble{5}}, CNode{UserDouble{2}}}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$pow: [{$const: 5}, {$const: 2}]}")) ==
+ expr->serialize(false)));
+ cst = CNode{CNode::ObjectChildren{
+ {KeyFieldname::pow,
+ CNode{CNode::ArrayChildren{CNode{UserDouble{5.846}}, CNode{UserDouble{2.846}}}}}}};
+ expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(
+ Value(fromjson("{$pow: [{$const: 5.846}, {$const: 2.846}]}")) == expr->serialize(false)));
+}
+
+TEST(CstTest, RoundTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{
+ {KeyFieldname::round,
+ CNode{CNode::ArrayChildren{CNode{UserDouble{1.5786}}, CNode{UserDouble{2}}}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(
+ Value(fromjson("{$round: [{$const: 1.5786}, {$const: 2}]}")) == expr->serialize(false)));
+}
+
+TEST(CstTest, SqrtTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{{KeyFieldname::sqrt, CNode{UserDouble{144}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(Value(fromjson("{$sqrt: [{$const: 144}]}")) ==
+ expr->serialize(false)));
+}
+
+TEST(CstTest, SubtractTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{
+ {KeyFieldname::subtract,
+ CNode{CNode::ArrayChildren{CNode{UserDouble{1.5786}}, CNode{UserDouble{2}}}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(
+ Value(fromjson("{$subtract: [{$const: 1.5786}, {$const: 2}]}")) == expr->serialize(false)));
+}
+
+TEST(CstTest, TruncTranslationTest) {
+ const auto cst = CNode{CNode::ObjectChildren{
+ {KeyFieldname::trunc,
+ CNode{CNode::ArrayChildren{CNode{UserDouble{1.5786}}, CNode{UserDouble{2}}}}}}};
+ auto expr = cst_pipeline_translation::translateExpression(cst, getExpCtx());
+ ASSERT_TRUE(ValueComparator().evaluate(
+ Value(fromjson("{$trunc: [{$const: 1.5786}, {$const: 2}]}")) == expr->serialize(false)));
+}
+
} // namespace
} // namespace mongo
diff --git a/src/mongo/db/cst/cst_test.cpp b/src/mongo/db/cst/cst_test.cpp
index 7af8da47804..179275ace7d 100644
--- a/src/mongo/db/cst/cst_test.cpp
+++ b/src/mongo/db/cst/cst_test.cpp
@@ -629,5 +629,198 @@ TEST(CstTest, BuildsAndPrintsType) {
}
}
+TEST(CstGrammarTest, ParsesValidNumberAbs) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$abs: 1}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(), "{ project: { val: { abs: \"<UserInt 1>\" } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidCeil) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$ceil: 1.5}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { ceil: \"<UserDouble 1.500000>\" } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidDivide) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$divide: [10, 5]}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { divide: [ \"<UserInt 10>\", \"<UserInt 5>\" ] } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidExp) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$exp: 1.5}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { exponent: \"<UserDouble 1.500000>\" } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidFloor) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$floor: 1.5}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { floor: \"<UserDouble 1.500000>\" } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidLn) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$ln: [37, 10]}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { ln: [ \"<UserInt 10>\", \"<UserInt 37>\" ] } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidLog) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$log: [10, 5]}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { log: [ \"<UserInt 10>\", \"<UserInt 5>\" ] } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidLog10) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$log10: 1.5}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { logten: \"<UserDouble 1.500000>\" } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidMod) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$mod: [10, 5]}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { mod: [ \"<UserInt 10>\", \"<UserInt 5>\" ] } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidMultiply) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$multiply: [10, 5]}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { multiply: [ \"<UserInt 10>\", \"<UserInt 5>\" ] } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidPow) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$pow: [10, 5]}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { pow: [ \"<UserInt 10>\", \"<UserInt 5>\" ] } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidRound) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$round: [1.234, 2]}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ std::cout << "TEDLOG " << stages[0].toBson().toString() << "\n";
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { round: [ \"<UserDouble 1.234000>\", \"<UserInt 2>\" ] } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidSqrt) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$sqrt: 25}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(), "{ project: { val: { sqrt: \"<UserInt 25>\" } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidSubtract) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$subtract: [10, 5]}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { subtract: [ \"<UserInt 10>\", \"<UserInt 5>\" ] } } }");
+}
+
+TEST(CstGrammarTest, ParsesValidTrunc) {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$project: {val: {$trunc: [1.234, 2]}}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_EQ(0, parseTree.parse());
+ auto stages = stdx::get<CNode::ArrayChildren>(output.payload);
+ ASSERT_EQ(1, stages.size());
+ ASSERT(KeyFieldname::project == stages[0].firstKeyFieldname());
+ ASSERT_EQ(stages[0].toBson().toString(),
+ "{ project: { val: { trunc: [ \"<UserDouble 1.234000>\", \"<UserInt 2>\" ] } } }");
+}
} // namespace
} // namespace mongo
diff --git a/src/mongo/db/cst/key_fieldname.h b/src/mongo/db/cst/key_fieldname.h
index eb1baf54828..e29ee30cd55 100644
--- a/src/mongo/db/cst/key_fieldname.h
+++ b/src/mongo/db/cst/key_fieldname.h
@@ -36,6 +36,21 @@
#define KEYFIELDNAMES(ENUMIFY) \
ENUMIFY(add) \
ENUMIFY(atan2) \
+ ENUMIFY(abs) \
+ ENUMIFY(ceil) \
+ ENUMIFY(divide) \
+ ENUMIFY(exponent) \
+ ENUMIFY(floor) \
+ ENUMIFY(ln) \
+ ENUMIFY(log) \
+ ENUMIFY(logten) \
+ ENUMIFY(mod) \
+ ENUMIFY(multiply) \
+ ENUMIFY(pow) \
+ ENUMIFY(round) \
+ ENUMIFY(sqrt) \
+ ENUMIFY(subtract) \
+ ENUMIFY(trunc) \
ENUMIFY(id) \
ENUMIFY(andExpr) \
ENUMIFY(orExpr) \
diff --git a/src/mongo/db/cst/location_gen.h b/src/mongo/db/cst/location_gen.h
index e7873ad89d6..c6549fdadbf 100644
--- a/src/mongo/db/cst/location_gen.h
+++ b/src/mongo/db/cst/location_gen.h
@@ -1,4 +1,4 @@
-// A Bison parser, made by GNU Bison 3.6.
+// A Bison parser, made by GNU Bison 3.6.3.
// Locations for Bison parsers in C++
@@ -31,12 +31,12 @@
// version 2.2 of Bison.
/**
- ** \file src/mongo/db/cst/location_gen.h
+ ** \file location_gen.h
** Define the mongo::location class.
*/
-#ifndef YY_YY_SRC_MONGO_DB_CST_LOCATION_GEN_H_INCLUDED
-#define YY_YY_SRC_MONGO_DB_CST_LOCATION_GEN_H_INCLUDED
+#ifndef YY_YY_LOCATION_GEN_H_INCLUDED
+#define YY_YY_LOCATION_GEN_H_INCLUDED
#include <iostream>
#include <string>
@@ -53,9 +53,9 @@
#endif
#endif
-#line 58 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 58 "pipeline_grammar.yy"
namespace mongo {
-#line 59 "src/mongo/db/cst/location_gen.h"
+#line 59 "location_gen.h"
/// A point in a source file.
class position {
@@ -260,8 +260,8 @@ std::basic_ostream<YYChar>& operator<<(std::basic_ostream<YYChar>& ostr, const l
return ostr;
}
-#line 58 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 58 "pipeline_grammar.yy"
} // namespace mongo
-#line 333 "src/mongo/db/cst/location_gen.h"
+#line 333 "location_gen.h"
-#endif // !YY_YY_SRC_MONGO_DB_CST_LOCATION_GEN_H_INCLUDED
+#endif // !YY_YY_LOCATION_GEN_H_INCLUDED
diff --git a/src/mongo/db/cst/pipeline_grammar.yy b/src/mongo/db/cst/pipeline_grammar.yy
index 92afd5163e5..d962f7ed835 100644
--- a/src/mongo/db/cst/pipeline_grammar.yy
+++ b/src/mongo/db/cst/pipeline_grammar.yy
@@ -162,6 +162,21 @@
TO_OBJECT_ID
TO_STRING
TYPE
+ ABS
+ CEIL
+ DIVIDE
+ EXPONENT
+ FLOOR
+ LN
+ LOG
+ LOGTEN
+ MOD
+ MULTIPLY
+ POW
+ ROUND
+ SQRT
+ SUBTRACT
+ TRUNC
// $convert arguments.
INPUT_ARG
@@ -217,6 +232,7 @@
%nterm <CNode> compExprs cmp eq gt gte lt lte ne
%nterm <CNode> typeExpression typeValue convert toBool toDate toDecimal toDouble toInt toLong
%nterm <CNode> toObjectId toString type
+%nterm <CNode> abs ceil divide exponent floor ln log logten mod multiply pow round sqrt subtract trunc
%nterm <std::pair<CNode::Fieldname, CNode>> onErrorArg onNullArg
%nterm <std::vector<CNode>> expressions values
@@ -482,9 +498,54 @@ aggExprAsUserFieldname:
| TYPE {
$$ = UserFieldname{"$type"};
}
+ | ABS {
+ $$ = UserFieldname{"$abs"};
+ }
+ | CEIL {
+ $$ = UserFieldname{"$ceil"};
+ }
+ | DIVIDE {
+ $$ = UserFieldname{"$divide"};
+ }
+ | EXPONENT {
+ $$ = UserFieldname{"$exp"};
+ }
+ | FLOOR {
+ $$ = UserFieldname{"$floor"};
+ }
+ | LN {
+ $$ = UserFieldname{"$ln"};
+ }
+ | LOG {
+ $$ = UserFieldname{"$log"};
+ }
+ | LOGTEN {
+ $$ = UserFieldname{"$log10"};
+ }
+ | MOD {
+ $$ = UserFieldname{"$mod"};
+ }
+ | MULTIPLY {
+ $$ = UserFieldname{"$multiply"};
+ }
+ | POW {
+ $$ = UserFieldname{"$pow"};
+ }
+ | ROUND {
+ $$ = UserFieldname{"$round"};
+ }
+ | SQRT {
+ $$ = UserFieldname{"$sqrt"};
+ }
+ | SUBTRACT {
+ $$ = UserFieldname{"$subtract"};
+ }
+ | TRUNC {
+ $$ = UserFieldname{"$trunc"};
+ }
;
-// Rules for literal non-terminals.
+// Rules for literal non-terminals.
string:
STRING {
$$ = CNode{UserString{$1}};
@@ -705,8 +766,8 @@ idAsUserFieldname:
;
maths:
- add
- | atan2
+ add | atan2 | abs | ceil | divide | exponent | floor | ln | log | logten | mod | multiply | pow
+| round | sqrt | subtract | trunc
;
add:
@@ -725,7 +786,92 @@ atan2:
$exprFixedTwoArg}}};
}
;
-
+abs:
+ START_OBJECT ABS expression END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::abs, $expression}}};
+ }
+;
+ceil:
+ START_OBJECT CEIL expression END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::ceil, $expression}}};
+ }
+;
+divide:
+ START_OBJECT DIVIDE START_ARRAY expression[expr1] expression[expr2] END_ARRAY END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::divide,
+ CNode{CNode::ArrayChildren{$expr1, $expr2}}}}};
+ }
+;
+exponent:
+ START_OBJECT EXPONENT expression END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::exponent, $expression}}};
+ }
+;
+floor:
+ START_OBJECT FLOOR expression END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::floor, $expression}}};
+ }
+;
+ln:
+ START_OBJECT LN expression END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::ln, $expression}}};
+ }
+;
+log:
+ START_OBJECT LOG START_ARRAY expression[expr1] expression[expr2] END_ARRAY END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::log,
+ CNode{CNode::ArrayChildren{$expr1, $expr2}}}}};
+ }
+;
+logten:
+ START_OBJECT LOGTEN expression END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::logten, $expression}}};
+ }
+;
+mod:
+ START_OBJECT MOD START_ARRAY expression[expr1] expression[expr2] END_ARRAY END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::mod,
+ CNode{CNode::ArrayChildren{$expr1, $expr2}}}}};
+ }
+;
+multiply:
+ START_OBJECT MULTIPLY START_ARRAY expression[expr1] expression[expr2] expressions END_ARRAY END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::multiply,
+ CNode{CNode::ArrayChildren{$expr1, $expr2}}}}};
+ auto&& others = $expressions;
+ auto&& array = $$.objectChildren()[0].second.arrayChildren();
+ array.insert(array.end(), others.begin(), others.end());
+ }
+;
+pow:
+ START_OBJECT POW START_ARRAY expression[expr1] expression[expr2] END_ARRAY END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::pow,
+ CNode{CNode::ArrayChildren{$expr1, $expr2}}}}};
+ }
+;
+round:
+ START_OBJECT ROUND START_ARRAY expression[expr1] expression[expr2] END_ARRAY END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::round,
+ CNode{CNode::ArrayChildren{$expr1, $expr2}}}}};
+ }
+;
+sqrt:
+ START_OBJECT SQRT expression END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::sqrt, $expression}}};
+ }
+;
+subtract:
+ START_OBJECT SUBTRACT START_ARRAY expression[expr1] expression[expr2] END_ARRAY END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::subtract,
+ CNode{CNode::ArrayChildren{$expr1, $expr2}}}}};
+ }
+;
+trunc:
+ START_OBJECT TRUNC START_ARRAY expression[expr1] expression[expr2] END_ARRAY END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{{KeyFieldname::trunc,
+ CNode{CNode::ArrayChildren{$expr1, $expr2}}}}};
+ }
+;
boolExps:
and | or | not
;
diff --git a/src/mongo/db/cst/pipeline_parser_gen.cpp b/src/mongo/db/cst/pipeline_parser_gen.cpp
index 8d13065b8ee..6b78e3bc2e2 100644
--- a/src/mongo/db/cst/pipeline_parser_gen.cpp
+++ b/src/mongo/db/cst/pipeline_parser_gen.cpp
@@ -1,4 +1,4 @@
-// A Bison parser, made by GNU Bison 3.6.
+// A Bison parser, made by GNU Bison 3.6.3.
// Skeleton implementation for Bison LALR(1) parsers in C++
@@ -39,7 +39,7 @@
// Unqualified %code blocks.
-#line 83 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 83 "pipeline_grammar.yy"
#include "mongo/db/cst/bson_lexer.h"
#include "mongo/platform/decimal128.h"
@@ -54,7 +54,7 @@ void PipelineParserGen::error(const PipelineParserGen::location_type& loc, const
}
} // namespace mongo
-#line 63 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 63 "pipeline_parser_gen.cpp"
#ifndef YY_
@@ -145,16 +145,9 @@ void PipelineParserGen::error(const PipelineParserGen::location_type& loc, const
#define YYERROR goto yyerrorlab
#define YYRECOVERING() (!!yyerrstatus_)
-#line 58 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 58 "pipeline_grammar.yy"
namespace mongo {
-#line 156 "src/mongo/db/cst/pipeline_parser_gen.cpp"
-
-#if YYDEBUG || 0
-const char* PipelineParserGen::symbol_name(symbol_kind_type yysymbol) {
- return yytname_[yysymbol];
-}
-#endif // #if YYDEBUG || 0
-
+#line 156 "pipeline_parser_gen.cpp"
/// Build a parser object.
PipelineParserGen::PipelineParserGen(BSONLexer& lexer_yyarg, CNode* cst_yyarg)
@@ -205,175 +198,190 @@ PipelineParserGen::stack_symbol_type::stack_symbol_type() {}
PipelineParserGen::stack_symbol_type::stack_symbol_type(YY_RVREF(stack_symbol_type) that)
: super_type(YY_MOVE(that.state), YY_MOVE(that.location)) {
switch (that.kind()) {
- case 53: // BINARY
+ case 68: // BINARY
value.YY_MOVE_OR_COPY<BSONBinData>(YY_MOVE(that.value));
break;
- case 60: // JAVASCRIPT
+ case 75: // JAVASCRIPT
value.YY_MOVE_OR_COPY<BSONCode>(YY_MOVE(that.value));
break;
- case 62: // JAVASCRIPT_W_SCOPE
+ case 77: // JAVASCRIPT_W_SCOPE
value.YY_MOVE_OR_COPY<BSONCodeWScope>(YY_MOVE(that.value));
break;
- case 59: // DB_POINTER
+ case 74: // DB_POINTER
value.YY_MOVE_OR_COPY<BSONDBRef>(YY_MOVE(that.value));
break;
- case 58: // REGEX
+ case 73: // REGEX
value.YY_MOVE_OR_COPY<BSONRegEx>(YY_MOVE(that.value));
break;
- case 61: // SYMBOL
+ case 76: // SYMBOL
value.YY_MOVE_OR_COPY<BSONSymbol>(YY_MOVE(that.value));
break;
- case 82: // dbPointer
- case 83: // javascript
- case 84: // symbol
- case 85: // javascriptWScope
- case 86: // int
- case 87: // timestamp
- case 88: // long
- case 89: // double
- case 90: // decimal
- case 91: // minKey
- case 92: // maxKey
- case 93: // value
- case 94: // string
- case 95: // binary
- case 96: // undefined
- case 97: // objectId
- case 98: // bool
- case 99: // date
- case 100: // null
- case 101: // regex
- case 102: // simpleValue
- case 103: // compoundValue
- case 104: // valueArray
- case 105: // valueObject
- case 106: // valueFields
- case 107: // stageList
- case 108: // stage
- case 109: // inhibitOptimization
- case 110: // unionWith
- case 111: // skip
- case 112: // limit
- case 113: // project
- case 114: // sample
- case 115: // projectFields
- case 116: // projection
- case 117: // num
- case 118: // expression
- case 119: // compoundExpression
- case 120: // exprFixedTwoArg
- case 121: // expressionArray
- case 122: // expressionObject
- case 123: // expressionFields
- case 124: // maths
- case 125: // add
- case 126: // atan2
- case 127: // boolExps
- case 128: // and
- case 129: // or
- case 130: // not
- case 131: // literalEscapes
- case 132: // const
- case 133: // literal
- case 134: // compExprs
- case 135: // cmp
- case 136: // eq
- case 137: // gt
- case 138: // gte
- case 139: // lt
- case 140: // lte
- case 141: // ne
- case 142: // typeExpression
- case 143: // typeValue
- case 144: // convert
- case 145: // toBool
- case 146: // toDate
- case 147: // toDecimal
- case 148: // toDouble
- case 149: // toInt
- case 150: // toLong
- case 151: // toObjectId
- case 152: // toString
- case 153: // type
+ case 97: // dbPointer
+ case 98: // javascript
+ case 99: // symbol
+ case 100: // javascriptWScope
+ case 101: // int
+ case 102: // timestamp
+ case 103: // long
+ case 104: // double
+ case 105: // decimal
+ case 106: // minKey
+ case 107: // maxKey
+ case 108: // value
+ case 109: // string
+ case 110: // binary
+ case 111: // undefined
+ case 112: // objectId
+ case 113: // bool
+ case 114: // date
+ case 115: // null
+ case 116: // regex
+ case 117: // simpleValue
+ case 118: // compoundValue
+ case 119: // valueArray
+ case 120: // valueObject
+ case 121: // valueFields
+ case 122: // stageList
+ case 123: // stage
+ case 124: // inhibitOptimization
+ case 125: // unionWith
+ case 126: // skip
+ case 127: // limit
+ case 128: // project
+ case 129: // sample
+ case 130: // projectFields
+ case 131: // projection
+ case 132: // num
+ case 133: // expression
+ case 134: // compoundExpression
+ case 135: // exprFixedTwoArg
+ case 136: // expressionArray
+ case 137: // expressionObject
+ case 138: // expressionFields
+ case 139: // maths
+ case 140: // add
+ case 141: // atan2
+ case 142: // boolExps
+ case 143: // and
+ case 144: // or
+ case 145: // not
+ case 146: // literalEscapes
+ case 147: // const
+ case 148: // literal
+ case 149: // compExprs
+ case 150: // cmp
+ case 151: // eq
+ case 152: // gt
+ case 153: // gte
+ case 154: // lt
+ case 155: // lte
+ case 156: // ne
+ case 157: // typeExpression
+ case 158: // typeValue
+ case 159: // convert
+ case 160: // toBool
+ case 161: // toDate
+ case 162: // toDecimal
+ case 163: // toDouble
+ case 164: // toInt
+ case 165: // toLong
+ case 166: // toObjectId
+ case 167: // toString
+ case 168: // type
+ case 169: // abs
+ case 170: // ceil
+ case 171: // divide
+ case 172: // exponent
+ case 173: // floor
+ case 174: // ln
+ case 175: // log
+ case 176: // logten
+ case 177: // mod
+ case 178: // multiply
+ case 179: // pow
+ case 180: // round
+ case 181: // sqrt
+ case 182: // subtract
+ case 183: // trunc
value.YY_MOVE_OR_COPY<CNode>(YY_MOVE(that.value));
break;
- case 71: // projectionFieldname
- case 72: // expressionFieldname
- case 73: // stageAsUserFieldname
- case 74: // argAsUserFieldname
- case 75: // aggExprAsUserFieldname
- case 76: // invariableUserFieldname
- case 77: // idAsUserFieldname
- case 78: // valueFieldname
+ case 86: // projectionFieldname
+ case 87: // expressionFieldname
+ case 88: // stageAsUserFieldname
+ case 89: // argAsUserFieldname
+ case 90: // aggExprAsUserFieldname
+ case 91: // invariableUserFieldname
+ case 92: // idAsUserFieldname
+ case 93: // valueFieldname
value.YY_MOVE_OR_COPY<CNode::Fieldname>(YY_MOVE(that.value));
break;
- case 56: // DATE_LITERAL
+ case 71: // DATE_LITERAL
value.YY_MOVE_OR_COPY<Date_t>(YY_MOVE(that.value));
break;
- case 67: // DECIMAL_NON_ZERO
+ case 82: // DECIMAL_NON_ZERO
value.YY_MOVE_OR_COPY<Decimal128>(YY_MOVE(that.value));
break;
- case 55: // OBJECT_ID
+ case 70: // OBJECT_ID
value.YY_MOVE_OR_COPY<OID>(YY_MOVE(that.value));
break;
- case 64: // TIMESTAMP
+ case 79: // TIMESTAMP
value.YY_MOVE_OR_COPY<Timestamp>(YY_MOVE(that.value));
break;
- case 69: // MAX_KEY
+ case 84: // MAX_KEY
value.YY_MOVE_OR_COPY<UserMaxKey>(YY_MOVE(that.value));
break;
- case 68: // MIN_KEY
+ case 83: // MIN_KEY
value.YY_MOVE_OR_COPY<UserMinKey>(YY_MOVE(that.value));
break;
- case 57: // JSNULL
+ case 72: // JSNULL
value.YY_MOVE_OR_COPY<UserNull>(YY_MOVE(that.value));
break;
- case 54: // UNDEFINED
+ case 69: // UNDEFINED
value.YY_MOVE_OR_COPY<UserUndefined>(YY_MOVE(that.value));
break;
- case 66: // DOUBLE_NON_ZERO
+ case 81: // DOUBLE_NON_ZERO
value.YY_MOVE_OR_COPY<double>(YY_MOVE(that.value));
break;
- case 63: // INT_NON_ZERO
+ case 78: // INT_NON_ZERO
value.YY_MOVE_OR_COPY<int>(YY_MOVE(that.value));
break;
- case 65: // LONG_NON_ZERO
+ case 80: // LONG_NON_ZERO
value.YY_MOVE_OR_COPY<long long>(YY_MOVE(that.value));
break;
- case 79: // projectField
- case 80: // expressionField
- case 81: // valueField
- case 154: // onErrorArg
- case 155: // onNullArg
+ case 94: // projectField
+ case 95: // expressionField
+ case 96: // valueField
+ case 184: // onErrorArg
+ case 185: // onNullArg
value.YY_MOVE_OR_COPY<std::pair<CNode::Fieldname, CNode>>(YY_MOVE(that.value));
break;
- case 51: // FIELDNAME
- case 52: // STRING
+ case 66: // FIELDNAME
+ case 67: // STRING
value.YY_MOVE_OR_COPY<std::string>(YY_MOVE(that.value));
break;
- case 156: // expressions
- case 157: // values
+ case 186: // expressions
+ case 187: // values
value.YY_MOVE_OR_COPY<std::vector<CNode>>(YY_MOVE(that.value));
break;
@@ -390,175 +398,190 @@ PipelineParserGen::stack_symbol_type::stack_symbol_type(YY_RVREF(stack_symbol_ty
PipelineParserGen::stack_symbol_type::stack_symbol_type(state_type s, YY_MOVE_REF(symbol_type) that)
: super_type(s, YY_MOVE(that.location)) {
switch (that.kind()) {
- case 53: // BINARY
+ case 68: // BINARY
value.move<BSONBinData>(YY_MOVE(that.value));
break;
- case 60: // JAVASCRIPT
+ case 75: // JAVASCRIPT
value.move<BSONCode>(YY_MOVE(that.value));
break;
- case 62: // JAVASCRIPT_W_SCOPE
+ case 77: // JAVASCRIPT_W_SCOPE
value.move<BSONCodeWScope>(YY_MOVE(that.value));
break;
- case 59: // DB_POINTER
+ case 74: // DB_POINTER
value.move<BSONDBRef>(YY_MOVE(that.value));
break;
- case 58: // REGEX
+ case 73: // REGEX
value.move<BSONRegEx>(YY_MOVE(that.value));
break;
- case 61: // SYMBOL
+ case 76: // SYMBOL
value.move<BSONSymbol>(YY_MOVE(that.value));
break;
- case 82: // dbPointer
- case 83: // javascript
- case 84: // symbol
- case 85: // javascriptWScope
- case 86: // int
- case 87: // timestamp
- case 88: // long
- case 89: // double
- case 90: // decimal
- case 91: // minKey
- case 92: // maxKey
- case 93: // value
- case 94: // string
- case 95: // binary
- case 96: // undefined
- case 97: // objectId
- case 98: // bool
- case 99: // date
- case 100: // null
- case 101: // regex
- case 102: // simpleValue
- case 103: // compoundValue
- case 104: // valueArray
- case 105: // valueObject
- case 106: // valueFields
- case 107: // stageList
- case 108: // stage
- case 109: // inhibitOptimization
- case 110: // unionWith
- case 111: // skip
- case 112: // limit
- case 113: // project
- case 114: // sample
- case 115: // projectFields
- case 116: // projection
- case 117: // num
- case 118: // expression
- case 119: // compoundExpression
- case 120: // exprFixedTwoArg
- case 121: // expressionArray
- case 122: // expressionObject
- case 123: // expressionFields
- case 124: // maths
- case 125: // add
- case 126: // atan2
- case 127: // boolExps
- case 128: // and
- case 129: // or
- case 130: // not
- case 131: // literalEscapes
- case 132: // const
- case 133: // literal
- case 134: // compExprs
- case 135: // cmp
- case 136: // eq
- case 137: // gt
- case 138: // gte
- case 139: // lt
- case 140: // lte
- case 141: // ne
- case 142: // typeExpression
- case 143: // typeValue
- case 144: // convert
- case 145: // toBool
- case 146: // toDate
- case 147: // toDecimal
- case 148: // toDouble
- case 149: // toInt
- case 150: // toLong
- case 151: // toObjectId
- case 152: // toString
- case 153: // type
+ case 97: // dbPointer
+ case 98: // javascript
+ case 99: // symbol
+ case 100: // javascriptWScope
+ case 101: // int
+ case 102: // timestamp
+ case 103: // long
+ case 104: // double
+ case 105: // decimal
+ case 106: // minKey
+ case 107: // maxKey
+ case 108: // value
+ case 109: // string
+ case 110: // binary
+ case 111: // undefined
+ case 112: // objectId
+ case 113: // bool
+ case 114: // date
+ case 115: // null
+ case 116: // regex
+ case 117: // simpleValue
+ case 118: // compoundValue
+ case 119: // valueArray
+ case 120: // valueObject
+ case 121: // valueFields
+ case 122: // stageList
+ case 123: // stage
+ case 124: // inhibitOptimization
+ case 125: // unionWith
+ case 126: // skip
+ case 127: // limit
+ case 128: // project
+ case 129: // sample
+ case 130: // projectFields
+ case 131: // projection
+ case 132: // num
+ case 133: // expression
+ case 134: // compoundExpression
+ case 135: // exprFixedTwoArg
+ case 136: // expressionArray
+ case 137: // expressionObject
+ case 138: // expressionFields
+ case 139: // maths
+ case 140: // add
+ case 141: // atan2
+ case 142: // boolExps
+ case 143: // and
+ case 144: // or
+ case 145: // not
+ case 146: // literalEscapes
+ case 147: // const
+ case 148: // literal
+ case 149: // compExprs
+ case 150: // cmp
+ case 151: // eq
+ case 152: // gt
+ case 153: // gte
+ case 154: // lt
+ case 155: // lte
+ case 156: // ne
+ case 157: // typeExpression
+ case 158: // typeValue
+ case 159: // convert
+ case 160: // toBool
+ case 161: // toDate
+ case 162: // toDecimal
+ case 163: // toDouble
+ case 164: // toInt
+ case 165: // toLong
+ case 166: // toObjectId
+ case 167: // toString
+ case 168: // type
+ case 169: // abs
+ case 170: // ceil
+ case 171: // divide
+ case 172: // exponent
+ case 173: // floor
+ case 174: // ln
+ case 175: // log
+ case 176: // logten
+ case 177: // mod
+ case 178: // multiply
+ case 179: // pow
+ case 180: // round
+ case 181: // sqrt
+ case 182: // subtract
+ case 183: // trunc
value.move<CNode>(YY_MOVE(that.value));
break;
- case 71: // projectionFieldname
- case 72: // expressionFieldname
- case 73: // stageAsUserFieldname
- case 74: // argAsUserFieldname
- case 75: // aggExprAsUserFieldname
- case 76: // invariableUserFieldname
- case 77: // idAsUserFieldname
- case 78: // valueFieldname
+ case 86: // projectionFieldname
+ case 87: // expressionFieldname
+ case 88: // stageAsUserFieldname
+ case 89: // argAsUserFieldname
+ case 90: // aggExprAsUserFieldname
+ case 91: // invariableUserFieldname
+ case 92: // idAsUserFieldname
+ case 93: // valueFieldname
value.move<CNode::Fieldname>(YY_MOVE(that.value));
break;
- case 56: // DATE_LITERAL
+ case 71: // DATE_LITERAL
value.move<Date_t>(YY_MOVE(that.value));
break;
- case 67: // DECIMAL_NON_ZERO
+ case 82: // DECIMAL_NON_ZERO
value.move<Decimal128>(YY_MOVE(that.value));
break;
- case 55: // OBJECT_ID
+ case 70: // OBJECT_ID
value.move<OID>(YY_MOVE(that.value));
break;
- case 64: // TIMESTAMP
+ case 79: // TIMESTAMP
value.move<Timestamp>(YY_MOVE(that.value));
break;
- case 69: // MAX_KEY
+ case 84: // MAX_KEY
value.move<UserMaxKey>(YY_MOVE(that.value));
break;
- case 68: // MIN_KEY
+ case 83: // MIN_KEY
value.move<UserMinKey>(YY_MOVE(that.value));
break;
- case 57: // JSNULL
+ case 72: // JSNULL
value.move<UserNull>(YY_MOVE(that.value));
break;
- case 54: // UNDEFINED
+ case 69: // UNDEFINED
value.move<UserUndefined>(YY_MOVE(that.value));
break;
- case 66: // DOUBLE_NON_ZERO
+ case 81: // DOUBLE_NON_ZERO
value.move<double>(YY_MOVE(that.value));
break;
- case 63: // INT_NON_ZERO
+ case 78: // INT_NON_ZERO
value.move<int>(YY_MOVE(that.value));
break;
- case 65: // LONG_NON_ZERO
+ case 80: // LONG_NON_ZERO
value.move<long long>(YY_MOVE(that.value));
break;
- case 79: // projectField
- case 80: // expressionField
- case 81: // valueField
- case 154: // onErrorArg
- case 155: // onNullArg
+ case 94: // projectField
+ case 95: // expressionField
+ case 96: // valueField
+ case 184: // onErrorArg
+ case 185: // onNullArg
value.move<std::pair<CNode::Fieldname, CNode>>(YY_MOVE(that.value));
break;
- case 51: // FIELDNAME
- case 52: // STRING
+ case 66: // FIELDNAME
+ case 67: // STRING
value.move<std::string>(YY_MOVE(that.value));
break;
- case 156: // expressions
- case 157: // values
+ case 186: // expressions
+ case 187: // values
value.move<std::vector<CNode>>(YY_MOVE(that.value));
break;
@@ -575,175 +598,190 @@ PipelineParserGen::stack_symbol_type& PipelineParserGen::stack_symbol_type::oper
const stack_symbol_type& that) {
state = that.state;
switch (that.kind()) {
- case 53: // BINARY
+ case 68: // BINARY
value.copy<BSONBinData>(that.value);
break;
- case 60: // JAVASCRIPT
+ case 75: // JAVASCRIPT
value.copy<BSONCode>(that.value);
break;
- case 62: // JAVASCRIPT_W_SCOPE
+ case 77: // JAVASCRIPT_W_SCOPE
value.copy<BSONCodeWScope>(that.value);
break;
- case 59: // DB_POINTER
+ case 74: // DB_POINTER
value.copy<BSONDBRef>(that.value);
break;
- case 58: // REGEX
+ case 73: // REGEX
value.copy<BSONRegEx>(that.value);
break;
- case 61: // SYMBOL
+ case 76: // SYMBOL
value.copy<BSONSymbol>(that.value);
break;
- case 82: // dbPointer
- case 83: // javascript
- case 84: // symbol
- case 85: // javascriptWScope
- case 86: // int
- case 87: // timestamp
- case 88: // long
- case 89: // double
- case 90: // decimal
- case 91: // minKey
- case 92: // maxKey
- case 93: // value
- case 94: // string
- case 95: // binary
- case 96: // undefined
- case 97: // objectId
- case 98: // bool
- case 99: // date
- case 100: // null
- case 101: // regex
- case 102: // simpleValue
- case 103: // compoundValue
- case 104: // valueArray
- case 105: // valueObject
- case 106: // valueFields
- case 107: // stageList
- case 108: // stage
- case 109: // inhibitOptimization
- case 110: // unionWith
- case 111: // skip
- case 112: // limit
- case 113: // project
- case 114: // sample
- case 115: // projectFields
- case 116: // projection
- case 117: // num
- case 118: // expression
- case 119: // compoundExpression
- case 120: // exprFixedTwoArg
- case 121: // expressionArray
- case 122: // expressionObject
- case 123: // expressionFields
- case 124: // maths
- case 125: // add
- case 126: // atan2
- case 127: // boolExps
- case 128: // and
- case 129: // or
- case 130: // not
- case 131: // literalEscapes
- case 132: // const
- case 133: // literal
- case 134: // compExprs
- case 135: // cmp
- case 136: // eq
- case 137: // gt
- case 138: // gte
- case 139: // lt
- case 140: // lte
- case 141: // ne
- case 142: // typeExpression
- case 143: // typeValue
- case 144: // convert
- case 145: // toBool
- case 146: // toDate
- case 147: // toDecimal
- case 148: // toDouble
- case 149: // toInt
- case 150: // toLong
- case 151: // toObjectId
- case 152: // toString
- case 153: // type
+ case 97: // dbPointer
+ case 98: // javascript
+ case 99: // symbol
+ case 100: // javascriptWScope
+ case 101: // int
+ case 102: // timestamp
+ case 103: // long
+ case 104: // double
+ case 105: // decimal
+ case 106: // minKey
+ case 107: // maxKey
+ case 108: // value
+ case 109: // string
+ case 110: // binary
+ case 111: // undefined
+ case 112: // objectId
+ case 113: // bool
+ case 114: // date
+ case 115: // null
+ case 116: // regex
+ case 117: // simpleValue
+ case 118: // compoundValue
+ case 119: // valueArray
+ case 120: // valueObject
+ case 121: // valueFields
+ case 122: // stageList
+ case 123: // stage
+ case 124: // inhibitOptimization
+ case 125: // unionWith
+ case 126: // skip
+ case 127: // limit
+ case 128: // project
+ case 129: // sample
+ case 130: // projectFields
+ case 131: // projection
+ case 132: // num
+ case 133: // expression
+ case 134: // compoundExpression
+ case 135: // exprFixedTwoArg
+ case 136: // expressionArray
+ case 137: // expressionObject
+ case 138: // expressionFields
+ case 139: // maths
+ case 140: // add
+ case 141: // atan2
+ case 142: // boolExps
+ case 143: // and
+ case 144: // or
+ case 145: // not
+ case 146: // literalEscapes
+ case 147: // const
+ case 148: // literal
+ case 149: // compExprs
+ case 150: // cmp
+ case 151: // eq
+ case 152: // gt
+ case 153: // gte
+ case 154: // lt
+ case 155: // lte
+ case 156: // ne
+ case 157: // typeExpression
+ case 158: // typeValue
+ case 159: // convert
+ case 160: // toBool
+ case 161: // toDate
+ case 162: // toDecimal
+ case 163: // toDouble
+ case 164: // toInt
+ case 165: // toLong
+ case 166: // toObjectId
+ case 167: // toString
+ case 168: // type
+ case 169: // abs
+ case 170: // ceil
+ case 171: // divide
+ case 172: // exponent
+ case 173: // floor
+ case 174: // ln
+ case 175: // log
+ case 176: // logten
+ case 177: // mod
+ case 178: // multiply
+ case 179: // pow
+ case 180: // round
+ case 181: // sqrt
+ case 182: // subtract
+ case 183: // trunc
value.copy<CNode>(that.value);
break;
- case 71: // projectionFieldname
- case 72: // expressionFieldname
- case 73: // stageAsUserFieldname
- case 74: // argAsUserFieldname
- case 75: // aggExprAsUserFieldname
- case 76: // invariableUserFieldname
- case 77: // idAsUserFieldname
- case 78: // valueFieldname
+ case 86: // projectionFieldname
+ case 87: // expressionFieldname
+ case 88: // stageAsUserFieldname
+ case 89: // argAsUserFieldname
+ case 90: // aggExprAsUserFieldname
+ case 91: // invariableUserFieldname
+ case 92: // idAsUserFieldname
+ case 93: // valueFieldname
value.copy<CNode::Fieldname>(that.value);
break;
- case 56: // DATE_LITERAL
+ case 71: // DATE_LITERAL
value.copy<Date_t>(that.value);
break;
- case 67: // DECIMAL_NON_ZERO
+ case 82: // DECIMAL_NON_ZERO
value.copy<Decimal128>(that.value);
break;
- case 55: // OBJECT_ID
+ case 70: // OBJECT_ID
value.copy<OID>(that.value);
break;
- case 64: // TIMESTAMP
+ case 79: // TIMESTAMP
value.copy<Timestamp>(that.value);
break;
- case 69: // MAX_KEY
+ case 84: // MAX_KEY
value.copy<UserMaxKey>(that.value);
break;
- case 68: // MIN_KEY
+ case 83: // MIN_KEY
value.copy<UserMinKey>(that.value);
break;
- case 57: // JSNULL
+ case 72: // JSNULL
value.copy<UserNull>(that.value);
break;
- case 54: // UNDEFINED
+ case 69: // UNDEFINED
value.copy<UserUndefined>(that.value);
break;
- case 66: // DOUBLE_NON_ZERO
+ case 81: // DOUBLE_NON_ZERO
value.copy<double>(that.value);
break;
- case 63: // INT_NON_ZERO
+ case 78: // INT_NON_ZERO
value.copy<int>(that.value);
break;
- case 65: // LONG_NON_ZERO
+ case 80: // LONG_NON_ZERO
value.copy<long long>(that.value);
break;
- case 79: // projectField
- case 80: // expressionField
- case 81: // valueField
- case 154: // onErrorArg
- case 155: // onNullArg
+ case 94: // projectField
+ case 95: // expressionField
+ case 96: // valueField
+ case 184: // onErrorArg
+ case 185: // onNullArg
value.copy<std::pair<CNode::Fieldname, CNode>>(that.value);
break;
- case 51: // FIELDNAME
- case 52: // STRING
+ case 66: // FIELDNAME
+ case 67: // STRING
value.copy<std::string>(that.value);
break;
- case 156: // expressions
- case 157: // values
+ case 186: // expressions
+ case 187: // values
value.copy<std::vector<CNode>>(that.value);
break;
@@ -759,175 +797,190 @@ PipelineParserGen::stack_symbol_type& PipelineParserGen::stack_symbol_type::oper
stack_symbol_type& that) {
state = that.state;
switch (that.kind()) {
- case 53: // BINARY
+ case 68: // BINARY
value.move<BSONBinData>(that.value);
break;
- case 60: // JAVASCRIPT
+ case 75: // JAVASCRIPT
value.move<BSONCode>(that.value);
break;
- case 62: // JAVASCRIPT_W_SCOPE
+ case 77: // JAVASCRIPT_W_SCOPE
value.move<BSONCodeWScope>(that.value);
break;
- case 59: // DB_POINTER
+ case 74: // DB_POINTER
value.move<BSONDBRef>(that.value);
break;
- case 58: // REGEX
+ case 73: // REGEX
value.move<BSONRegEx>(that.value);
break;
- case 61: // SYMBOL
+ case 76: // SYMBOL
value.move<BSONSymbol>(that.value);
break;
- case 82: // dbPointer
- case 83: // javascript
- case 84: // symbol
- case 85: // javascriptWScope
- case 86: // int
- case 87: // timestamp
- case 88: // long
- case 89: // double
- case 90: // decimal
- case 91: // minKey
- case 92: // maxKey
- case 93: // value
- case 94: // string
- case 95: // binary
- case 96: // undefined
- case 97: // objectId
- case 98: // bool
- case 99: // date
- case 100: // null
- case 101: // regex
- case 102: // simpleValue
- case 103: // compoundValue
- case 104: // valueArray
- case 105: // valueObject
- case 106: // valueFields
- case 107: // stageList
- case 108: // stage
- case 109: // inhibitOptimization
- case 110: // unionWith
- case 111: // skip
- case 112: // limit
- case 113: // project
- case 114: // sample
- case 115: // projectFields
- case 116: // projection
- case 117: // num
- case 118: // expression
- case 119: // compoundExpression
- case 120: // exprFixedTwoArg
- case 121: // expressionArray
- case 122: // expressionObject
- case 123: // expressionFields
- case 124: // maths
- case 125: // add
- case 126: // atan2
- case 127: // boolExps
- case 128: // and
- case 129: // or
- case 130: // not
- case 131: // literalEscapes
- case 132: // const
- case 133: // literal
- case 134: // compExprs
- case 135: // cmp
- case 136: // eq
- case 137: // gt
- case 138: // gte
- case 139: // lt
- case 140: // lte
- case 141: // ne
- case 142: // typeExpression
- case 143: // typeValue
- case 144: // convert
- case 145: // toBool
- case 146: // toDate
- case 147: // toDecimal
- case 148: // toDouble
- case 149: // toInt
- case 150: // toLong
- case 151: // toObjectId
- case 152: // toString
- case 153: // type
+ case 97: // dbPointer
+ case 98: // javascript
+ case 99: // symbol
+ case 100: // javascriptWScope
+ case 101: // int
+ case 102: // timestamp
+ case 103: // long
+ case 104: // double
+ case 105: // decimal
+ case 106: // minKey
+ case 107: // maxKey
+ case 108: // value
+ case 109: // string
+ case 110: // binary
+ case 111: // undefined
+ case 112: // objectId
+ case 113: // bool
+ case 114: // date
+ case 115: // null
+ case 116: // regex
+ case 117: // simpleValue
+ case 118: // compoundValue
+ case 119: // valueArray
+ case 120: // valueObject
+ case 121: // valueFields
+ case 122: // stageList
+ case 123: // stage
+ case 124: // inhibitOptimization
+ case 125: // unionWith
+ case 126: // skip
+ case 127: // limit
+ case 128: // project
+ case 129: // sample
+ case 130: // projectFields
+ case 131: // projection
+ case 132: // num
+ case 133: // expression
+ case 134: // compoundExpression
+ case 135: // exprFixedTwoArg
+ case 136: // expressionArray
+ case 137: // expressionObject
+ case 138: // expressionFields
+ case 139: // maths
+ case 140: // add
+ case 141: // atan2
+ case 142: // boolExps
+ case 143: // and
+ case 144: // or
+ case 145: // not
+ case 146: // literalEscapes
+ case 147: // const
+ case 148: // literal
+ case 149: // compExprs
+ case 150: // cmp
+ case 151: // eq
+ case 152: // gt
+ case 153: // gte
+ case 154: // lt
+ case 155: // lte
+ case 156: // ne
+ case 157: // typeExpression
+ case 158: // typeValue
+ case 159: // convert
+ case 160: // toBool
+ case 161: // toDate
+ case 162: // toDecimal
+ case 163: // toDouble
+ case 164: // toInt
+ case 165: // toLong
+ case 166: // toObjectId
+ case 167: // toString
+ case 168: // type
+ case 169: // abs
+ case 170: // ceil
+ case 171: // divide
+ case 172: // exponent
+ case 173: // floor
+ case 174: // ln
+ case 175: // log
+ case 176: // logten
+ case 177: // mod
+ case 178: // multiply
+ case 179: // pow
+ case 180: // round
+ case 181: // sqrt
+ case 182: // subtract
+ case 183: // trunc
value.move<CNode>(that.value);
break;
- case 71: // projectionFieldname
- case 72: // expressionFieldname
- case 73: // stageAsUserFieldname
- case 74: // argAsUserFieldname
- case 75: // aggExprAsUserFieldname
- case 76: // invariableUserFieldname
- case 77: // idAsUserFieldname
- case 78: // valueFieldname
+ case 86: // projectionFieldname
+ case 87: // expressionFieldname
+ case 88: // stageAsUserFieldname
+ case 89: // argAsUserFieldname
+ case 90: // aggExprAsUserFieldname
+ case 91: // invariableUserFieldname
+ case 92: // idAsUserFieldname
+ case 93: // valueFieldname
value.move<CNode::Fieldname>(that.value);
break;
- case 56: // DATE_LITERAL
+ case 71: // DATE_LITERAL
value.move<Date_t>(that.value);
break;
- case 67: // DECIMAL_NON_ZERO
+ case 82: // DECIMAL_NON_ZERO
value.move<Decimal128>(that.value);
break;
- case 55: // OBJECT_ID
+ case 70: // OBJECT_ID
value.move<OID>(that.value);
break;
- case 64: // TIMESTAMP
+ case 79: // TIMESTAMP
value.move<Timestamp>(that.value);
break;
- case 69: // MAX_KEY
+ case 84: // MAX_KEY
value.move<UserMaxKey>(that.value);
break;
- case 68: // MIN_KEY
+ case 83: // MIN_KEY
value.move<UserMinKey>(that.value);
break;
- case 57: // JSNULL
+ case 72: // JSNULL
value.move<UserNull>(that.value);
break;
- case 54: // UNDEFINED
+ case 69: // UNDEFINED
value.move<UserUndefined>(that.value);
break;
- case 66: // DOUBLE_NON_ZERO
+ case 81: // DOUBLE_NON_ZERO
value.move<double>(that.value);
break;
- case 63: // INT_NON_ZERO
+ case 78: // INT_NON_ZERO
value.move<int>(that.value);
break;
- case 65: // LONG_NON_ZERO
+ case 80: // LONG_NON_ZERO
value.move<long long>(that.value);
break;
- case 79: // projectField
- case 80: // expressionField
- case 81: // valueField
- case 154: // onErrorArg
- case 155: // onNullArg
+ case 94: // projectField
+ case 95: // expressionField
+ case 96: // valueField
+ case 184: // onErrorArg
+ case 185: // onNullArg
value.move<std::pair<CNode::Fieldname, CNode>>(that.value);
break;
- case 51: // FIELDNAME
- case 52: // STRING
+ case 66: // FIELDNAME
+ case 67: // STRING
value.move<std::string>(that.value);
break;
- case 156: // expressions
- case 157: // values
+ case 186: // expressions
+ case 187: // values
value.move<std::vector<CNode>>(that.value);
break;
@@ -957,7 +1010,7 @@ void PipelineParserGen::yy_print_(std::ostream& yyo, const basic_symbol<Base>& y
yyo << "empty symbol";
else {
symbol_kind_type yykind = yysym.kind();
- yyo << (yykind < YYNTOKENS ? "token" : "nterm") << ' ' << symbol_name(yykind) << " ("
+ yyo << (yykind < YYNTOKENS ? "token" : "nterm") << ' ' << yysym.name() << " ("
<< yysym.location << ": ";
YYUSE(yykind);
yyo << ')';
@@ -1154,175 +1207,190 @@ int PipelineParserGen::parse() {
correct type. The default '$$ = $1' action is NOT applied
when using variants. */
switch (yyr1_[yyn]) {
- case 53: // BINARY
+ case 68: // BINARY
yylhs.value.emplace<BSONBinData>();
break;
- case 60: // JAVASCRIPT
+ case 75: // JAVASCRIPT
yylhs.value.emplace<BSONCode>();
break;
- case 62: // JAVASCRIPT_W_SCOPE
+ case 77: // JAVASCRIPT_W_SCOPE
yylhs.value.emplace<BSONCodeWScope>();
break;
- case 59: // DB_POINTER
+ case 74: // DB_POINTER
yylhs.value.emplace<BSONDBRef>();
break;
- case 58: // REGEX
+ case 73: // REGEX
yylhs.value.emplace<BSONRegEx>();
break;
- case 61: // SYMBOL
+ case 76: // SYMBOL
yylhs.value.emplace<BSONSymbol>();
break;
- case 82: // dbPointer
- case 83: // javascript
- case 84: // symbol
- case 85: // javascriptWScope
- case 86: // int
- case 87: // timestamp
- case 88: // long
- case 89: // double
- case 90: // decimal
- case 91: // minKey
- case 92: // maxKey
- case 93: // value
- case 94: // string
- case 95: // binary
- case 96: // undefined
- case 97: // objectId
- case 98: // bool
- case 99: // date
- case 100: // null
- case 101: // regex
- case 102: // simpleValue
- case 103: // compoundValue
- case 104: // valueArray
- case 105: // valueObject
- case 106: // valueFields
- case 107: // stageList
- case 108: // stage
- case 109: // inhibitOptimization
- case 110: // unionWith
- case 111: // skip
- case 112: // limit
- case 113: // project
- case 114: // sample
- case 115: // projectFields
- case 116: // projection
- case 117: // num
- case 118: // expression
- case 119: // compoundExpression
- case 120: // exprFixedTwoArg
- case 121: // expressionArray
- case 122: // expressionObject
- case 123: // expressionFields
- case 124: // maths
- case 125: // add
- case 126: // atan2
- case 127: // boolExps
- case 128: // and
- case 129: // or
- case 130: // not
- case 131: // literalEscapes
- case 132: // const
- case 133: // literal
- case 134: // compExprs
- case 135: // cmp
- case 136: // eq
- case 137: // gt
- case 138: // gte
- case 139: // lt
- case 140: // lte
- case 141: // ne
- case 142: // typeExpression
- case 143: // typeValue
- case 144: // convert
- case 145: // toBool
- case 146: // toDate
- case 147: // toDecimal
- case 148: // toDouble
- case 149: // toInt
- case 150: // toLong
- case 151: // toObjectId
- case 152: // toString
- case 153: // type
+ case 97: // dbPointer
+ case 98: // javascript
+ case 99: // symbol
+ case 100: // javascriptWScope
+ case 101: // int
+ case 102: // timestamp
+ case 103: // long
+ case 104: // double
+ case 105: // decimal
+ case 106: // minKey
+ case 107: // maxKey
+ case 108: // value
+ case 109: // string
+ case 110: // binary
+ case 111: // undefined
+ case 112: // objectId
+ case 113: // bool
+ case 114: // date
+ case 115: // null
+ case 116: // regex
+ case 117: // simpleValue
+ case 118: // compoundValue
+ case 119: // valueArray
+ case 120: // valueObject
+ case 121: // valueFields
+ case 122: // stageList
+ case 123: // stage
+ case 124: // inhibitOptimization
+ case 125: // unionWith
+ case 126: // skip
+ case 127: // limit
+ case 128: // project
+ case 129: // sample
+ case 130: // projectFields
+ case 131: // projection
+ case 132: // num
+ case 133: // expression
+ case 134: // compoundExpression
+ case 135: // exprFixedTwoArg
+ case 136: // expressionArray
+ case 137: // expressionObject
+ case 138: // expressionFields
+ case 139: // maths
+ case 140: // add
+ case 141: // atan2
+ case 142: // boolExps
+ case 143: // and
+ case 144: // or
+ case 145: // not
+ case 146: // literalEscapes
+ case 147: // const
+ case 148: // literal
+ case 149: // compExprs
+ case 150: // cmp
+ case 151: // eq
+ case 152: // gt
+ case 153: // gte
+ case 154: // lt
+ case 155: // lte
+ case 156: // ne
+ case 157: // typeExpression
+ case 158: // typeValue
+ case 159: // convert
+ case 160: // toBool
+ case 161: // toDate
+ case 162: // toDecimal
+ case 163: // toDouble
+ case 164: // toInt
+ case 165: // toLong
+ case 166: // toObjectId
+ case 167: // toString
+ case 168: // type
+ case 169: // abs
+ case 170: // ceil
+ case 171: // divide
+ case 172: // exponent
+ case 173: // floor
+ case 174: // ln
+ case 175: // log
+ case 176: // logten
+ case 177: // mod
+ case 178: // multiply
+ case 179: // pow
+ case 180: // round
+ case 181: // sqrt
+ case 182: // subtract
+ case 183: // trunc
yylhs.value.emplace<CNode>();
break;
- case 71: // projectionFieldname
- case 72: // expressionFieldname
- case 73: // stageAsUserFieldname
- case 74: // argAsUserFieldname
- case 75: // aggExprAsUserFieldname
- case 76: // invariableUserFieldname
- case 77: // idAsUserFieldname
- case 78: // valueFieldname
+ case 86: // projectionFieldname
+ case 87: // expressionFieldname
+ case 88: // stageAsUserFieldname
+ case 89: // argAsUserFieldname
+ case 90: // aggExprAsUserFieldname
+ case 91: // invariableUserFieldname
+ case 92: // idAsUserFieldname
+ case 93: // valueFieldname
yylhs.value.emplace<CNode::Fieldname>();
break;
- case 56: // DATE_LITERAL
+ case 71: // DATE_LITERAL
yylhs.value.emplace<Date_t>();
break;
- case 67: // DECIMAL_NON_ZERO
+ case 82: // DECIMAL_NON_ZERO
yylhs.value.emplace<Decimal128>();
break;
- case 55: // OBJECT_ID
+ case 70: // OBJECT_ID
yylhs.value.emplace<OID>();
break;
- case 64: // TIMESTAMP
+ case 79: // TIMESTAMP
yylhs.value.emplace<Timestamp>();
break;
- case 69: // MAX_KEY
+ case 84: // MAX_KEY
yylhs.value.emplace<UserMaxKey>();
break;
- case 68: // MIN_KEY
+ case 83: // MIN_KEY
yylhs.value.emplace<UserMinKey>();
break;
- case 57: // JSNULL
+ case 72: // JSNULL
yylhs.value.emplace<UserNull>();
break;
- case 54: // UNDEFINED
+ case 69: // UNDEFINED
yylhs.value.emplace<UserUndefined>();
break;
- case 66: // DOUBLE_NON_ZERO
+ case 81: // DOUBLE_NON_ZERO
yylhs.value.emplace<double>();
break;
- case 63: // INT_NON_ZERO
+ case 78: // INT_NON_ZERO
yylhs.value.emplace<int>();
break;
- case 65: // LONG_NON_ZERO
+ case 80: // LONG_NON_ZERO
yylhs.value.emplace<long long>();
break;
- case 79: // projectField
- case 80: // expressionField
- case 81: // valueField
- case 154: // onErrorArg
- case 155: // onNullArg
+ case 94: // projectField
+ case 95: // expressionField
+ case 96: // valueField
+ case 184: // onErrorArg
+ case 185: // onNullArg
yylhs.value.emplace<std::pair<CNode::Fieldname, CNode>>();
break;
- case 51: // FIELDNAME
- case 52: // STRING
+ case 66: // FIELDNAME
+ case 67: // STRING
yylhs.value.emplace<std::string>();
break;
- case 156: // expressions
- case 157: // values
+ case 186: // expressions
+ case 187: // values
yylhs.value.emplace<std::vector<CNode>>();
break;
@@ -1346,87 +1414,87 @@ int PipelineParserGen::parse() {
{
switch (yyn) {
case 2:
-#line 230 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 246 "pipeline_grammar.yy"
{
*cst = YY_MOVE(yystack_[1].value.as<CNode>());
}
-#line 1422 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1488 "pipeline_parser_gen.cpp"
break;
case 3:
-#line 236 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 252 "pipeline_grammar.yy"
{
}
-#line 1428 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1494 "pipeline_parser_gen.cpp"
break;
case 4:
-#line 237 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 253 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>())}};
}
-#line 1436 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1502 "pipeline_parser_gen.cpp"
break;
case 5:
-#line 245 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 261 "pipeline_grammar.yy"
{
lexer.sortObjTokens();
}
-#line 1442 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1508 "pipeline_parser_gen.cpp"
break;
case 7:
-#line 248 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 264 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1448 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1514 "pipeline_parser_gen.cpp"
break;
case 8:
-#line 248 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 264 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1454 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1520 "pipeline_parser_gen.cpp"
break;
case 9:
-#line 248 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 264 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1460 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1526 "pipeline_parser_gen.cpp"
break;
case 10:
-#line 248 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 264 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1466 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1532 "pipeline_parser_gen.cpp"
break;
case 11:
-#line 248 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 264 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1472 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1538 "pipeline_parser_gen.cpp"
break;
case 12:
-#line 248 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 264 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1478 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1544 "pipeline_parser_gen.cpp"
break;
case 13:
-#line 251 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 267 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::sample,
@@ -1434,20 +1502,20 @@ int PipelineParserGen::parse() {
{KeyFieldname::sizeArg, YY_MOVE(yystack_[1].value.as<CNode>())},
}}}}};
}
-#line 1490 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1556 "pipeline_parser_gen.cpp"
break;
case 14:
-#line 261 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 277 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
std::pair{KeyFieldname::inhibitOptimization, CNode::noopLeaf()}}};
}
-#line 1498 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1564 "pipeline_parser_gen.cpp"
break;
case 15:
-#line 267 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 283 "pipeline_grammar.yy"
{
auto pipeline = YY_MOVE(yystack_[1].value.as<CNode>());
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{std::pair{
@@ -1456,1113 +1524,1353 @@ int PipelineParserGen::parse() {
{KeyFieldname::collArg, YY_MOVE(yystack_[3].value.as<CNode>())},
{KeyFieldname::pipelineArg, std::move(pipeline)}}}}}};
}
-#line 1511 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1577 "pipeline_parser_gen.cpp"
break;
case 16:
-#line 277 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 293 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1517 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1583 "pipeline_parser_gen.cpp"
break;
case 17:
-#line 277 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 293 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1523 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1589 "pipeline_parser_gen.cpp"
break;
case 18:
-#line 277 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 293 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1529 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1595 "pipeline_parser_gen.cpp"
break;
case 19:
-#line 277 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 293 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1535 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1601 "pipeline_parser_gen.cpp"
break;
case 20:
-#line 281 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 297 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
std::pair{KeyFieldname::skip, YY_MOVE(yystack_[0].value.as<CNode>())}}};
}
-#line 1543 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1609 "pipeline_parser_gen.cpp"
break;
case 21:
-#line 286 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 302 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::limit, YY_MOVE(yystack_[0].value.as<CNode>())}}};
}
-#line 1551 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1617 "pipeline_parser_gen.cpp"
break;
case 22:
-#line 291 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 307 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::project, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 1559 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1625 "pipeline_parser_gen.cpp"
break;
case 23:
-#line 297 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 313 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode::noopLeaf();
}
-#line 1567 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1633 "pipeline_parser_gen.cpp"
break;
case 24:
-#line 300 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 316 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[1].value.as<CNode>());
yylhs.value.as<CNode>().objectChildren().emplace_back(
YY_MOVE(yystack_[0].value.as<std::pair<CNode::Fieldname, CNode>>()));
}
-#line 1576 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1642 "pipeline_parser_gen.cpp"
break;
case 25:
-#line 307 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 323 "pipeline_grammar.yy"
{
yylhs.value.as<std::pair<CNode::Fieldname, CNode>>() = {
KeyFieldname::id, YY_MOVE(yystack_[0].value.as<CNode>())};
}
-#line 1584 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1650 "pipeline_parser_gen.cpp"
break;
case 26:
-#line 310 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 326 "pipeline_grammar.yy"
{
yylhs.value.as<std::pair<CNode::Fieldname, CNode>>() = {
YY_MOVE(yystack_[1].value.as<CNode::Fieldname>()),
YY_MOVE(yystack_[0].value.as<CNode>())};
}
-#line 1592 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1658 "pipeline_parser_gen.cpp"
break;
case 27:
-#line 316 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 332 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1598 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1664 "pipeline_parser_gen.cpp"
break;
case 28:
-#line 317 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 333 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as<int>())}};
}
-#line 1606 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1672 "pipeline_parser_gen.cpp"
break;
case 29:
-#line 320 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 336 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{KeyValue::intZeroKey};
}
-#line 1614 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1680 "pipeline_parser_gen.cpp"
break;
case 30:
-#line 323 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 339 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as<long long>())}};
}
-#line 1622 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1688 "pipeline_parser_gen.cpp"
break;
case 31:
-#line 326 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 342 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{KeyValue::longZeroKey};
}
-#line 1630 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1696 "pipeline_parser_gen.cpp"
break;
case 32:
-#line 329 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 345 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as<double>())}};
}
-#line 1638 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1704 "pipeline_parser_gen.cpp"
break;
case 33:
-#line 332 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 348 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{KeyValue::doubleZeroKey};
}
-#line 1646 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1712 "pipeline_parser_gen.cpp"
break;
case 34:
-#line 335 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 351 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as<Decimal128>())}};
}
-#line 1654 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1720 "pipeline_parser_gen.cpp"
break;
case 35:
-#line 338 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 354 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{KeyValue::decimalZeroKey};
}
-#line 1662 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1728 "pipeline_parser_gen.cpp"
break;
case 36:
-#line 341 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 357 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{KeyValue::trueKey};
}
-#line 1670 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1736 "pipeline_parser_gen.cpp"
break;
case 37:
-#line 344 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 360 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{KeyValue::falseKey};
}
-#line 1678 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1744 "pipeline_parser_gen.cpp"
break;
case 38:
-#line 347 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 363 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1684 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1750 "pipeline_parser_gen.cpp"
break;
case 39:
-#line 351 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 367 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 1690 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1756 "pipeline_parser_gen.cpp"
break;
case 40:
-#line 351 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 367 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 1696 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1762 "pipeline_parser_gen.cpp"
break;
case 41:
-#line 351 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 367 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 1702 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1768 "pipeline_parser_gen.cpp"
break;
case 42:
-#line 351 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 367 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 1708 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1774 "pipeline_parser_gen.cpp"
break;
case 43:
-#line 355 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 371 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
UserFieldname{YY_MOVE(yystack_[0].value.as<std::string>())};
}
-#line 1716 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1782 "pipeline_parser_gen.cpp"
break;
case 44:
-#line 363 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 379 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
UserFieldname{"$_internalInhibitOptimization"};
}
-#line 1724 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1790 "pipeline_parser_gen.cpp"
break;
case 45:
-#line 366 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 382 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$unionWith"};
}
-#line 1732 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1798 "pipeline_parser_gen.cpp"
break;
case 46:
-#line 369 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 385 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$skip"};
}
-#line 1740 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1806 "pipeline_parser_gen.cpp"
break;
case 47:
-#line 372 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 388 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$limit"};
}
-#line 1748 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1814 "pipeline_parser_gen.cpp"
break;
case 48:
-#line 375 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 391 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$project"};
}
-#line 1756 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1822 "pipeline_parser_gen.cpp"
break;
case 49:
-#line 378 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 394 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$sample"};
}
-#line 1764 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1830 "pipeline_parser_gen.cpp"
break;
case 50:
-#line 387 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 403 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"coll"};
}
-#line 1772 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1838 "pipeline_parser_gen.cpp"
break;
case 51:
-#line 390 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 406 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"pipeline"};
}
-#line 1780 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1846 "pipeline_parser_gen.cpp"
break;
case 52:
-#line 393 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 409 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"size"};
}
-#line 1788 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1854 "pipeline_parser_gen.cpp"
break;
case 53:
-#line 396 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 412 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"input"};
}
-#line 1796 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1862 "pipeline_parser_gen.cpp"
break;
case 54:
-#line 399 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 415 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"to"};
}
-#line 1804 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1870 "pipeline_parser_gen.cpp"
break;
case 55:
-#line 402 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 418 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"onError"};
}
-#line 1812 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1878 "pipeline_parser_gen.cpp"
break;
case 56:
-#line 405 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 421 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"onNull"};
}
-#line 1820 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1886 "pipeline_parser_gen.cpp"
break;
case 57:
-#line 413 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 429 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$add"};
}
-#line 1828 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1894 "pipeline_parser_gen.cpp"
break;
case 58:
-#line 416 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 432 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$atan2"};
}
-#line 1836 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1902 "pipeline_parser_gen.cpp"
break;
case 59:
-#line 419 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 435 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$and"};
}
-#line 1844 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1910 "pipeline_parser_gen.cpp"
break;
case 60:
-#line 422 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 438 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$const"};
}
-#line 1852 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1918 "pipeline_parser_gen.cpp"
break;
case 61:
-#line 425 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 441 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$literal"};
}
-#line 1860 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1926 "pipeline_parser_gen.cpp"
break;
case 62:
-#line 428 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 444 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$or"};
}
-#line 1868 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1934 "pipeline_parser_gen.cpp"
break;
case 63:
-#line 431 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 447 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$not"};
}
-#line 1876 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1942 "pipeline_parser_gen.cpp"
break;
case 64:
-#line 434 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 450 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$cmp"};
}
-#line 1884 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1950 "pipeline_parser_gen.cpp"
break;
case 65:
-#line 437 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 453 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$eq"};
}
-#line 1892 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1958 "pipeline_parser_gen.cpp"
break;
case 66:
-#line 440 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 456 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$gt"};
}
-#line 1900 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1966 "pipeline_parser_gen.cpp"
break;
case 67:
-#line 443 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 459 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$gte"};
}
-#line 1908 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1974 "pipeline_parser_gen.cpp"
break;
case 68:
-#line 446 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 462 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$lt"};
}
-#line 1916 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1982 "pipeline_parser_gen.cpp"
break;
case 69:
-#line 449 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 465 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$lte"};
}
-#line 1924 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1990 "pipeline_parser_gen.cpp"
break;
case 70:
-#line 452 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 468 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$ne"};
}
-#line 1932 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1998 "pipeline_parser_gen.cpp"
break;
case 71:
-#line 455 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 471 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$convert"};
}
-#line 1940 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2006 "pipeline_parser_gen.cpp"
break;
case 72:
-#line 458 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 474 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$toBool"};
}
-#line 1948 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2014 "pipeline_parser_gen.cpp"
break;
case 73:
-#line 461 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 477 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$toDate"};
}
-#line 1956 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2022 "pipeline_parser_gen.cpp"
break;
case 74:
-#line 464 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 480 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$toDecimal"};
}
-#line 1964 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2030 "pipeline_parser_gen.cpp"
break;
case 75:
-#line 467 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 483 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$toDouble"};
}
-#line 1972 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2038 "pipeline_parser_gen.cpp"
break;
case 76:
-#line 470 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 486 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$toInt"};
}
-#line 1980 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2046 "pipeline_parser_gen.cpp"
break;
case 77:
-#line 473 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 489 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$toLong"};
}
-#line 1988 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2054 "pipeline_parser_gen.cpp"
break;
case 78:
-#line 476 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 492 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$toObjectId"};
}
-#line 1996 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2062 "pipeline_parser_gen.cpp"
break;
case 79:
-#line 479 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 495 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$toString"};
}
-#line 2004 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2070 "pipeline_parser_gen.cpp"
break;
case 80:
-#line 482 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 498 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$type"};
}
-#line 2012 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2078 "pipeline_parser_gen.cpp"
break;
case 81:
-#line 489 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 501 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$abs"};
+ }
+#line 2086 "pipeline_parser_gen.cpp"
+ break;
+
+ case 82:
+#line 504 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$ceil"};
+ }
+#line 2094 "pipeline_parser_gen.cpp"
+ break;
+
+ case 83:
+#line 507 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$divide"};
+ }
+#line 2102 "pipeline_parser_gen.cpp"
+ break;
+
+ case 84:
+#line 510 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$exp"};
+ }
+#line 2110 "pipeline_parser_gen.cpp"
+ break;
+
+ case 85:
+#line 513 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$floor"};
+ }
+#line 2118 "pipeline_parser_gen.cpp"
+ break;
+
+ case 86:
+#line 516 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$ln"};
+ }
+#line 2126 "pipeline_parser_gen.cpp"
+ break;
+
+ case 87:
+#line 519 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$log"};
+ }
+#line 2134 "pipeline_parser_gen.cpp"
+ break;
+
+ case 88:
+#line 522 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$log10"};
+ }
+#line 2142 "pipeline_parser_gen.cpp"
+ break;
+
+ case 89:
+#line 525 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$mod"};
+ }
+#line 2150 "pipeline_parser_gen.cpp"
+ break;
+
+ case 90:
+#line 528 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$multiply"};
+ }
+#line 2158 "pipeline_parser_gen.cpp"
+ break;
+
+ case 91:
+#line 531 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$pow"};
+ }
+#line 2166 "pipeline_parser_gen.cpp"
+ break;
+
+ case 92:
+#line 534 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$round"};
+ }
+#line 2174 "pipeline_parser_gen.cpp"
+ break;
+
+ case 93:
+#line 537 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$sqrt"};
+ }
+#line 2182 "pipeline_parser_gen.cpp"
+ break;
+
+ case 94:
+#line 540 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$subtract"};
+ }
+#line 2190 "pipeline_parser_gen.cpp"
+ break;
+
+ case 95:
+#line 543 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$trunc"};
+ }
+#line 2198 "pipeline_parser_gen.cpp"
+ break;
+
+ case 96:
+#line 550 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserString{YY_MOVE(yystack_[0].value.as<std::string>())}};
}
-#line 2020 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2206 "pipeline_parser_gen.cpp"
break;
- case 82:
-#line 495 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 97:
+#line 556 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserBinary{YY_MOVE(yystack_[0].value.as<BSONBinData>())}};
}
-#line 2028 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2214 "pipeline_parser_gen.cpp"
break;
- case 83:
-#line 501 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 98:
+#line 562 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserUndefined{}};
}
-#line 2036 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2222 "pipeline_parser_gen.cpp"
break;
- case 84:
-#line 507 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 99:
+#line 568 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserObjectId{}};
}
-#line 2044 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2230 "pipeline_parser_gen.cpp"
break;
- case 85:
-#line 513 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 100:
+#line 574 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserDate{YY_MOVE(yystack_[0].value.as<Date_t>())}};
}
-#line 2052 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2238 "pipeline_parser_gen.cpp"
break;
- case 86:
-#line 519 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 101:
+#line 580 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserNull{}};
}
-#line 2060 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2246 "pipeline_parser_gen.cpp"
break;
- case 87:
-#line 525 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 102:
+#line 586 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserRegex{YY_MOVE(yystack_[0].value.as<BSONRegEx>())}};
}
-#line 2068 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2254 "pipeline_parser_gen.cpp"
break;
- case 88:
-#line 531 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 103:
+#line 592 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserDBPointer{YY_MOVE(yystack_[0].value.as<BSONDBRef>())}};
}
-#line 2076 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2262 "pipeline_parser_gen.cpp"
break;
- case 89:
-#line 537 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 104:
+#line 598 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserJavascript{YY_MOVE(yystack_[0].value.as<BSONCode>())}};
}
-#line 2084 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2270 "pipeline_parser_gen.cpp"
break;
- case 90:
-#line 543 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 105:
+#line 604 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserSymbol{YY_MOVE(yystack_[0].value.as<BSONSymbol>())}};
}
-#line 2092 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2278 "pipeline_parser_gen.cpp"
break;
- case 91:
-#line 549 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 106:
+#line 610 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserJavascriptWithScope{
YY_MOVE(yystack_[0].value.as<BSONCodeWScope>())}};
}
-#line 2100 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2286 "pipeline_parser_gen.cpp"
break;
- case 92:
-#line 555 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 107:
+#line 616 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserTimestamp{YY_MOVE(yystack_[0].value.as<Timestamp>())}};
}
-#line 2108 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2294 "pipeline_parser_gen.cpp"
break;
- case 93:
-#line 561 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 108:
+#line 622 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserMinKey{YY_MOVE(yystack_[0].value.as<UserMinKey>())}};
}
-#line 2116 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2302 "pipeline_parser_gen.cpp"
break;
- case 94:
-#line 567 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 109:
+#line 628 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserMaxKey{YY_MOVE(yystack_[0].value.as<UserMaxKey>())}};
}
-#line 2124 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2310 "pipeline_parser_gen.cpp"
break;
- case 95:
-#line 573 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 110:
+#line 634 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserInt{YY_MOVE(yystack_[0].value.as<int>())}};
}
-#line 2132 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2318 "pipeline_parser_gen.cpp"
break;
- case 96:
-#line 576 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 111:
+#line 637 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserInt{0}};
}
-#line 2140 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2326 "pipeline_parser_gen.cpp"
break;
- case 97:
-#line 582 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 112:
+#line 643 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserLong{YY_MOVE(yystack_[0].value.as<long long>())}};
}
-#line 2148 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2334 "pipeline_parser_gen.cpp"
break;
- case 98:
-#line 585 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 113:
+#line 646 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserLong{0ll}};
}
-#line 2156 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2342 "pipeline_parser_gen.cpp"
break;
- case 99:
-#line 591 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 114:
+#line 652 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserDouble{YY_MOVE(yystack_[0].value.as<double>())}};
}
-#line 2164 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2350 "pipeline_parser_gen.cpp"
break;
- case 100:
-#line 594 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 115:
+#line 655 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserDouble{0.0}};
}
-#line 2172 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2358 "pipeline_parser_gen.cpp"
break;
- case 101:
-#line 600 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 116:
+#line 661 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{UserDecimal{YY_MOVE(yystack_[0].value.as<Decimal128>())}};
}
-#line 2180 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2366 "pipeline_parser_gen.cpp"
break;
- case 102:
-#line 603 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 117:
+#line 664 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserDecimal{0.0}};
}
-#line 2188 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2374 "pipeline_parser_gen.cpp"
break;
- case 103:
-#line 609 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 118:
+#line 670 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserBoolean{true}};
}
-#line 2196 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2382 "pipeline_parser_gen.cpp"
break;
- case 104:
-#line 612 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 119:
+#line 673 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{UserBoolean{false}};
}
-#line 2204 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2390 "pipeline_parser_gen.cpp"
break;
- case 105:
-#line 618 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 120:
+#line 679 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2210 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2396 "pipeline_parser_gen.cpp"
break;
- case 106:
-#line 619 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 121:
+#line 680 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2216 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2402 "pipeline_parser_gen.cpp"
break;
- case 107:
-#line 620 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 122:
+#line 681 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2222 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2408 "pipeline_parser_gen.cpp"
break;
- case 108:
-#line 621 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 123:
+#line 682 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2228 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2414 "pipeline_parser_gen.cpp"
break;
- case 109:
-#line 622 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 124:
+#line 683 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2234 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2420 "pipeline_parser_gen.cpp"
break;
- case 110:
-#line 623 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 125:
+#line 684 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2240 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2426 "pipeline_parser_gen.cpp"
break;
- case 111:
-#line 624 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 126:
+#line 685 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2246 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2432 "pipeline_parser_gen.cpp"
break;
- case 112:
-#line 625 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 127:
+#line 686 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2252 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2438 "pipeline_parser_gen.cpp"
break;
- case 113:
-#line 626 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 128:
+#line 687 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2258 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2444 "pipeline_parser_gen.cpp"
break;
- case 114:
-#line 627 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 129:
+#line 688 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2264 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2450 "pipeline_parser_gen.cpp"
break;
- case 115:
-#line 628 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 130:
+#line 689 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2270 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2456 "pipeline_parser_gen.cpp"
break;
- case 116:
-#line 629 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 131:
+#line 690 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2276 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2462 "pipeline_parser_gen.cpp"
break;
- case 117:
-#line 630 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 132:
+#line 691 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2282 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2468 "pipeline_parser_gen.cpp"
break;
- case 118:
-#line 631 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 133:
+#line 692 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2288 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2474 "pipeline_parser_gen.cpp"
break;
- case 119:
-#line 632 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 134:
+#line 693 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2294 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2480 "pipeline_parser_gen.cpp"
break;
- case 120:
-#line 633 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 135:
+#line 694 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2300 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2486 "pipeline_parser_gen.cpp"
break;
- case 121:
-#line 634 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 136:
+#line 695 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2306 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2492 "pipeline_parser_gen.cpp"
break;
- case 122:
-#line 635 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 137:
+#line 696 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2312 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2498 "pipeline_parser_gen.cpp"
break;
- case 123:
-#line 636 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 138:
+#line 697 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2318 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2504 "pipeline_parser_gen.cpp"
break;
- case 124:
-#line 643 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 139:
+#line 704 "pipeline_grammar.yy"
{
}
-#line 2324 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2510 "pipeline_parser_gen.cpp"
break;
- case 125:
-#line 644 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 140:
+#line 705 "pipeline_grammar.yy"
{
yylhs.value.as<std::vector<CNode>>() =
YY_MOVE(yystack_[0].value.as<std::vector<CNode>>());
yylhs.value.as<std::vector<CNode>>().emplace_back(
YY_MOVE(yystack_[1].value.as<CNode>()));
}
-#line 2333 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2519 "pipeline_parser_gen.cpp"
break;
- case 126:
-#line 651 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 141:
+#line 712 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2339 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2525 "pipeline_parser_gen.cpp"
break;
- case 127:
-#line 651 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 142:
+#line 712 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2345 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2531 "pipeline_parser_gen.cpp"
break;
- case 128:
-#line 655 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 143:
+#line 716 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>()),
YY_MOVE(yystack_[1].value.as<CNode>())}};
}
-#line 2353 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2539 "pipeline_parser_gen.cpp"
break;
- case 129:
-#line 660 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 144:
+#line 721 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2359 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2545 "pipeline_parser_gen.cpp"
break;
- case 130:
-#line 660 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 145:
+#line 721 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2365 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2551 "pipeline_parser_gen.cpp"
break;
- case 131:
-#line 660 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 146:
+#line 721 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2371 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2557 "pipeline_parser_gen.cpp"
break;
- case 132:
-#line 660 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 147:
+#line 721 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2377 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2563 "pipeline_parser_gen.cpp"
break;
- case 133:
-#line 660 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 148:
+#line 721 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2383 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2569 "pipeline_parser_gen.cpp"
break;
- case 134:
-#line 660 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 149:
+#line 721 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2389 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2575 "pipeline_parser_gen.cpp"
break;
- case 135:
-#line 661 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 150:
+#line 722 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2395 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2581 "pipeline_parser_gen.cpp"
break;
- case 136:
-#line 667 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 151:
+#line 728 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{YY_MOVE(yystack_[1].value.as<std::vector<CNode>>())};
}
-#line 2403 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2589 "pipeline_parser_gen.cpp"
break;
- case 137:
-#line 675 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 152:
+#line 736 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[1].value.as<CNode>());
}
-#line 2411 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2597 "pipeline_parser_gen.cpp"
break;
- case 138:
-#line 681 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 153:
+#line 742 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode::noopLeaf();
}
-#line 2419 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2605 "pipeline_parser_gen.cpp"
break;
- case 139:
-#line 684 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 154:
+#line 745 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[1].value.as<CNode>());
yylhs.value.as<CNode>().objectChildren().emplace_back(
YY_MOVE(yystack_[0].value.as<std::pair<CNode::Fieldname, CNode>>()));
}
-#line 2428 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2614 "pipeline_parser_gen.cpp"
break;
- case 140:
-#line 691 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 155:
+#line 752 "pipeline_grammar.yy"
{
yylhs.value.as<std::pair<CNode::Fieldname, CNode>>() = {
YY_MOVE(yystack_[1].value.as<CNode::Fieldname>()),
YY_MOVE(yystack_[0].value.as<CNode>())};
}
-#line 2436 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2622 "pipeline_parser_gen.cpp"
break;
- case 141:
-#line 698 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 156:
+#line 759 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2442 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2628 "pipeline_parser_gen.cpp"
break;
- case 142:
-#line 698 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 157:
+#line 759 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2448 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2634 "pipeline_parser_gen.cpp"
break;
- case 143:
-#line 698 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 158:
+#line 759 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2454 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2640 "pipeline_parser_gen.cpp"
break;
- case 144:
-#line 698 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 159:
+#line 759 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2460 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2646 "pipeline_parser_gen.cpp"
break;
- case 145:
-#line 702 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 160:
+#line 763 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"_id"};
}
-#line 2468 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2654 "pipeline_parser_gen.cpp"
break;
- case 146:
-#line 708 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 161:
+#line 769 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2474 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2660 "pipeline_parser_gen.cpp"
break;
- case 147:
-#line 709 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 162:
+#line 769 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2480 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2666 "pipeline_parser_gen.cpp"
break;
- case 148:
-#line 713 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 163:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2672 "pipeline_parser_gen.cpp"
+ break;
+
+ case 164:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2678 "pipeline_parser_gen.cpp"
+ break;
+
+ case 165:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2684 "pipeline_parser_gen.cpp"
+ break;
+
+ case 166:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2690 "pipeline_parser_gen.cpp"
+ break;
+
+ case 167:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2696 "pipeline_parser_gen.cpp"
+ break;
+
+ case 168:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2702 "pipeline_parser_gen.cpp"
+ break;
+
+ case 169:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2708 "pipeline_parser_gen.cpp"
+ break;
+
+ case 170:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2714 "pipeline_parser_gen.cpp"
+ break;
+
+ case 171:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2720 "pipeline_parser_gen.cpp"
+ break;
+
+ case 172:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2726 "pipeline_parser_gen.cpp"
+ break;
+
+ case 173:
+#line 769 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2732 "pipeline_parser_gen.cpp"
+ break;
+
+ case 174:
+#line 770 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2738 "pipeline_parser_gen.cpp"
+ break;
+
+ case 175:
+#line 770 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2744 "pipeline_parser_gen.cpp"
+ break;
+
+ case 176:
+#line 770 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2750 "pipeline_parser_gen.cpp"
+ break;
+
+ case 177:
+#line 770 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2756 "pipeline_parser_gen.cpp"
+ break;
+
+ case 178:
+#line 774 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::add,
@@ -2573,44 +2881,199 @@ int PipelineParserGen::parse() {
yylhs.value.as<CNode>().objectChildren()[0].second.arrayChildren();
array.insert(array.end(), others.begin(), others.end());
}
-#line 2492 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2768 "pipeline_parser_gen.cpp"
break;
- case 149:
-#line 723 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 179:
+#line 784 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::atan2, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2501 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2777 "pipeline_parser_gen.cpp"
break;
- case 150:
-#line 730 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 180:
+#line 790 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::abs, YY_MOVE(yystack_[1].value.as<CNode>())}}};
+ }
+#line 2785 "pipeline_parser_gen.cpp"
+ break;
+
+ case 181:
+#line 795 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::ceil, YY_MOVE(yystack_[1].value.as<CNode>())}}};
+ }
+#line 2793 "pipeline_parser_gen.cpp"
+ break;
+
+ case 182:
+#line 800 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::divide,
+ CNode{CNode::ArrayChildren{YY_MOVE(yystack_[3].value.as<CNode>()),
+ YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
+ }
+#line 2802 "pipeline_parser_gen.cpp"
+ break;
+
+ case 183:
+#line 806 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::exponent, YY_MOVE(yystack_[1].value.as<CNode>())}}};
+ }
+#line 2810 "pipeline_parser_gen.cpp"
+ break;
+
+ case 184:
+#line 811 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::floor, YY_MOVE(yystack_[1].value.as<CNode>())}}};
+ }
+#line 2818 "pipeline_parser_gen.cpp"
+ break;
+
+ case 185:
+#line 816 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::ln, YY_MOVE(yystack_[1].value.as<CNode>())}}};
+ }
+#line 2826 "pipeline_parser_gen.cpp"
+ break;
+
+ case 186:
+#line 821 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::log,
+ CNode{CNode::ArrayChildren{YY_MOVE(yystack_[3].value.as<CNode>()),
+ YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
+ }
+#line 2835 "pipeline_parser_gen.cpp"
+ break;
+
+ case 187:
+#line 827 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::logten, YY_MOVE(yystack_[1].value.as<CNode>())}}};
+ }
+#line 2843 "pipeline_parser_gen.cpp"
+ break;
+
+ case 188:
+#line 832 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::mod,
+ CNode{CNode::ArrayChildren{YY_MOVE(yystack_[3].value.as<CNode>()),
+ YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
+ }
+#line 2852 "pipeline_parser_gen.cpp"
+ break;
+
+ case 189:
+#line 838 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::multiply,
+ CNode{CNode::ArrayChildren{YY_MOVE(yystack_[4].value.as<CNode>()),
+ YY_MOVE(yystack_[3].value.as<CNode>())}}}}};
+ auto&& others = YY_MOVE(yystack_[2].value.as<std::vector<CNode>>());
+ auto&& array =
+ yylhs.value.as<CNode>().objectChildren()[0].second.arrayChildren();
+ array.insert(array.end(), others.begin(), others.end());
+ }
+#line 2864 "pipeline_parser_gen.cpp"
+ break;
+
+ case 190:
+#line 847 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::pow,
+ CNode{CNode::ArrayChildren{YY_MOVE(yystack_[3].value.as<CNode>()),
+ YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
+ }
+#line 2873 "pipeline_parser_gen.cpp"
+ break;
+
+ case 191:
+#line 853 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::round,
+ CNode{CNode::ArrayChildren{YY_MOVE(yystack_[3].value.as<CNode>()),
+ YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
+ }
+#line 2882 "pipeline_parser_gen.cpp"
+ break;
+
+ case 192:
+#line 859 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::sqrt, YY_MOVE(yystack_[1].value.as<CNode>())}}};
+ }
+#line 2890 "pipeline_parser_gen.cpp"
+ break;
+
+ case 193:
+#line 864 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::subtract,
+ CNode{CNode::ArrayChildren{YY_MOVE(yystack_[3].value.as<CNode>()),
+ YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
+ }
+#line 2899 "pipeline_parser_gen.cpp"
+ break;
+
+ case 194:
+#line 870 "pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
+ {KeyFieldname::trunc,
+ CNode{CNode::ArrayChildren{YY_MOVE(yystack_[3].value.as<CNode>()),
+ YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
+ }
+#line 2908 "pipeline_parser_gen.cpp"
+ break;
+
+ case 195:
+#line 876 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2507 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2914 "pipeline_parser_gen.cpp"
break;
- case 151:
-#line 730 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 196:
+#line 876 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2513 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2920 "pipeline_parser_gen.cpp"
break;
- case 152:
-#line 730 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 197:
+#line 876 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2519 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2926 "pipeline_parser_gen.cpp"
break;
- case 153:
-#line 734 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 198:
+#line 880 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::andExpr,
@@ -2621,11 +3084,11 @@ int PipelineParserGen::parse() {
yylhs.value.as<CNode>().objectChildren()[0].second.arrayChildren();
array.insert(array.end(), others.begin(), others.end());
}
-#line 2531 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2938 "pipeline_parser_gen.cpp"
break;
- case 154:
-#line 744 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 199:
+#line 890 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::orExpr,
@@ -2636,472 +3099,472 @@ int PipelineParserGen::parse() {
yylhs.value.as<CNode>().objectChildren()[0].second.arrayChildren();
array.insert(array.end(), others.begin(), others.end());
}
-#line 2543 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2950 "pipeline_parser_gen.cpp"
break;
- case 155:
-#line 754 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 200:
+#line 900 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::notExpr,
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
}
-#line 2552 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2959 "pipeline_parser_gen.cpp"
break;
- case 156:
-#line 761 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 201:
+#line 907 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2558 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2965 "pipeline_parser_gen.cpp"
break;
- case 157:
-#line 761 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 202:
+#line 907 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2564 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2971 "pipeline_parser_gen.cpp"
break;
- case 158:
-#line 765 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 203:
+#line 911 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::constExpr,
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
}
-#line 2573 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2980 "pipeline_parser_gen.cpp"
break;
- case 159:
-#line 772 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 204:
+#line 918 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::literal,
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
}
-#line 2582 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2989 "pipeline_parser_gen.cpp"
break;
- case 160:
-#line 779 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 205:
+#line 925 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2588 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2995 "pipeline_parser_gen.cpp"
break;
- case 161:
-#line 779 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 206:
+#line 925 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2594 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3001 "pipeline_parser_gen.cpp"
break;
- case 162:
-#line 783 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 207:
+#line 929 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2600 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3007 "pipeline_parser_gen.cpp"
break;
- case 163:
-#line 783 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 208:
+#line 929 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2606 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3013 "pipeline_parser_gen.cpp"
break;
- case 164:
-#line 787 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 209:
+#line 933 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{YY_MOVE(yystack_[1].value.as<std::vector<CNode>>())};
}
-#line 2614 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3021 "pipeline_parser_gen.cpp"
break;
- case 165:
-#line 793 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 210:
+#line 939 "pipeline_grammar.yy"
{
}
-#line 2620 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3027 "pipeline_parser_gen.cpp"
break;
- case 166:
-#line 794 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 211:
+#line 940 "pipeline_grammar.yy"
{
yylhs.value.as<std::vector<CNode>>() =
YY_MOVE(yystack_[0].value.as<std::vector<CNode>>());
yylhs.value.as<std::vector<CNode>>().emplace_back(
YY_MOVE(yystack_[1].value.as<CNode>()));
}
-#line 2629 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3036 "pipeline_parser_gen.cpp"
break;
- case 167:
-#line 801 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 212:
+#line 947 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[1].value.as<CNode>());
}
-#line 2637 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3044 "pipeline_parser_gen.cpp"
break;
- case 168:
-#line 807 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 213:
+#line 953 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode::noopLeaf();
}
-#line 2645 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3052 "pipeline_parser_gen.cpp"
break;
- case 169:
-#line 810 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 214:
+#line 956 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[1].value.as<CNode>());
yylhs.value.as<CNode>().objectChildren().emplace_back(
YY_MOVE(yystack_[0].value.as<std::pair<CNode::Fieldname, CNode>>()));
}
-#line 2654 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3061 "pipeline_parser_gen.cpp"
break;
- case 170:
-#line 817 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 215:
+#line 963 "pipeline_grammar.yy"
{
yylhs.value.as<std::pair<CNode::Fieldname, CNode>>() = {
YY_MOVE(yystack_[1].value.as<CNode::Fieldname>()),
YY_MOVE(yystack_[0].value.as<CNode>())};
}
-#line 2662 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3069 "pipeline_parser_gen.cpp"
break;
- case 171:
-#line 824 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 216:
+#line 970 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2668 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3075 "pipeline_parser_gen.cpp"
break;
- case 172:
-#line 825 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 217:
+#line 971 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2674 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3081 "pipeline_parser_gen.cpp"
break;
- case 173:
-#line 826 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 218:
+#line 972 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2680 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3087 "pipeline_parser_gen.cpp"
break;
- case 174:
-#line 827 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 219:
+#line 973 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2686 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3093 "pipeline_parser_gen.cpp"
break;
- case 175:
-#line 828 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 220:
+#line 974 "pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2692 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3099 "pipeline_parser_gen.cpp"
break;
- case 176:
-#line 831 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 221:
+#line 977 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2698 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3105 "pipeline_parser_gen.cpp"
break;
- case 177:
-#line 831 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 222:
+#line 977 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2704 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3111 "pipeline_parser_gen.cpp"
break;
- case 178:
-#line 831 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 223:
+#line 977 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2710 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3117 "pipeline_parser_gen.cpp"
break;
- case 179:
-#line 831 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 224:
+#line 977 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2716 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3123 "pipeline_parser_gen.cpp"
break;
- case 180:
-#line 831 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 225:
+#line 977 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2722 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3129 "pipeline_parser_gen.cpp"
break;
- case 181:
-#line 831 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 226:
+#line 977 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2728 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3135 "pipeline_parser_gen.cpp"
break;
- case 182:
-#line 831 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 227:
+#line 977 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2734 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3141 "pipeline_parser_gen.cpp"
break;
- case 183:
-#line 833 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 228:
+#line 979 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::cmp, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2743 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3150 "pipeline_parser_gen.cpp"
break;
- case 184:
-#line 838 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 229:
+#line 984 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::eq, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2752 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3159 "pipeline_parser_gen.cpp"
break;
- case 185:
-#line 843 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 230:
+#line 989 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::gt, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2761 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3168 "pipeline_parser_gen.cpp"
break;
- case 186:
-#line 848 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 231:
+#line 994 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::gte, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2770 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3177 "pipeline_parser_gen.cpp"
break;
- case 187:
-#line 853 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 232:
+#line 999 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::lt, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2779 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3186 "pipeline_parser_gen.cpp"
break;
- case 188:
-#line 858 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 233:
+#line 1004 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::lte, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2788 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3195 "pipeline_parser_gen.cpp"
break;
- case 189:
-#line 863 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 234:
+#line 1009 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::ne, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2797 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3204 "pipeline_parser_gen.cpp"
break;
- case 190:
-#line 869 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 235:
+#line 1015 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2803 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3210 "pipeline_parser_gen.cpp"
break;
- case 191:
-#line 870 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 236:
+#line 1016 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2809 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3216 "pipeline_parser_gen.cpp"
break;
- case 192:
-#line 871 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 237:
+#line 1017 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2815 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3222 "pipeline_parser_gen.cpp"
break;
- case 193:
-#line 872 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 238:
+#line 1018 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2821 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3228 "pipeline_parser_gen.cpp"
break;
- case 194:
-#line 873 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 239:
+#line 1019 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2827 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3234 "pipeline_parser_gen.cpp"
break;
- case 195:
-#line 874 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 240:
+#line 1020 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2833 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3240 "pipeline_parser_gen.cpp"
break;
- case 196:
-#line 875 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 241:
+#line 1021 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2839 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3246 "pipeline_parser_gen.cpp"
break;
- case 197:
-#line 876 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 242:
+#line 1022 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2845 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3252 "pipeline_parser_gen.cpp"
break;
- case 198:
-#line 877 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 243:
+#line 1023 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2851 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3258 "pipeline_parser_gen.cpp"
break;
- case 199:
-#line 878 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 244:
+#line 1024 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2857 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3264 "pipeline_parser_gen.cpp"
break;
- case 200:
-#line 884 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 245:
+#line 1030 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2863 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3270 "pipeline_parser_gen.cpp"
break;
- case 201:
-#line 884 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 246:
+#line 1030 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2869 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3276 "pipeline_parser_gen.cpp"
break;
- case 202:
-#line 884 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 247:
+#line 1030 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2875 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3282 "pipeline_parser_gen.cpp"
break;
- case 203:
-#line 884 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 248:
+#line 1030 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2881 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3288 "pipeline_parser_gen.cpp"
break;
- case 204:
-#line 884 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 249:
+#line 1030 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2887 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3294 "pipeline_parser_gen.cpp"
break;
- case 205:
-#line 888 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 250:
+#line 1034 "pipeline_grammar.yy"
{
yylhs.value.as<std::pair<CNode::Fieldname, CNode>>() =
std::pair{KeyFieldname::onErrorArg, CNode{KeyValue::absentKey}};
}
-#line 2895 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3302 "pipeline_parser_gen.cpp"
break;
- case 206:
-#line 891 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 251:
+#line 1037 "pipeline_grammar.yy"
{
yylhs.value.as<std::pair<CNode::Fieldname, CNode>>() = std::pair{
KeyFieldname::onErrorArg, YY_MOVE(yystack_[0].value.as<CNode>())};
}
-#line 2903 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3310 "pipeline_parser_gen.cpp"
break;
- case 207:
-#line 898 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 252:
+#line 1044 "pipeline_grammar.yy"
{
yylhs.value.as<std::pair<CNode::Fieldname, CNode>>() =
std::pair{KeyFieldname::onNullArg, CNode{KeyValue::absentKey}};
}
-#line 2911 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3318 "pipeline_parser_gen.cpp"
break;
- case 208:
-#line 901 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 253:
+#line 1047 "pipeline_grammar.yy"
{
yylhs.value.as<std::pair<CNode::Fieldname, CNode>>() = std::pair{
KeyFieldname::onNullArg, YY_MOVE(yystack_[0].value.as<CNode>())};
}
-#line 2919 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3326 "pipeline_parser_gen.cpp"
break;
- case 209:
-#line 907 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 254:
+#line 1053 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::convert,
@@ -3113,92 +3576,92 @@ int PipelineParserGen::parse() {
YY_MOVE(yystack_[2]
.value.as<std::pair<CNode::Fieldname, CNode>>())}}}}};
}
-#line 2930 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3337 "pipeline_parser_gen.cpp"
break;
- case 210:
-#line 916 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 255:
+#line 1062 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::toBool, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2938 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3345 "pipeline_parser_gen.cpp"
break;
- case 211:
-#line 921 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 256:
+#line 1067 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::toDate, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2946 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3353 "pipeline_parser_gen.cpp"
break;
- case 212:
-#line 926 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 257:
+#line 1072 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::toDecimal, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2954 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3361 "pipeline_parser_gen.cpp"
break;
- case 213:
-#line 931 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 258:
+#line 1077 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::toDouble, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2962 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3369 "pipeline_parser_gen.cpp"
break;
- case 214:
-#line 936 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 259:
+#line 1082 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::toInt, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2970 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3377 "pipeline_parser_gen.cpp"
break;
- case 215:
-#line 941 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 260:
+#line 1087 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::toLong, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2978 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3385 "pipeline_parser_gen.cpp"
break;
- case 216:
-#line 946 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 261:
+#line 1092 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::toObjectId, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2986 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3393 "pipeline_parser_gen.cpp"
break;
- case 217:
-#line 951 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 262:
+#line 1097 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::toString, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2994 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3401 "pipeline_parser_gen.cpp"
break;
- case 218:
-#line 956 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 263:
+#line 1102 "pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::type, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 3002 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3409 "pipeline_parser_gen.cpp"
break;
-#line 3006 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3413 "pipeline_parser_gen.cpp"
default:
break;
@@ -3362,161 +3825,201 @@ void PipelineParserGen::error(const syntax_error& yyexc) {
error(yyexc.location, yyexc.what());
}
+#if YYDEBUG || 0
+const char* PipelineParserGen::symbol_name(symbol_kind_type yysymbol) {
+ return yytname_[yysymbol];
+}
+#endif // #if YYDEBUG || 0
+
-const short PipelineParserGen::yypact_ninf_ = -190;
+const short PipelineParserGen::yypact_ninf_ = -226;
const signed char PipelineParserGen::yytable_ninf_ = -1;
const short PipelineParserGen::yypact_[] = {
- 29, 35, 39, 59, 34, -190, 46, 48, 49, 50, 48, -190, 47, -190, -190, -190,
- -190, -190, -190, -190, 51, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, 32, -190, 43, 63, 35, -190, 297, 48, 17, -190, -190, -190, 167,
- -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, -190, -190, -190, 167, -190, -190, -190, -190, -190, 66, -190, 58, 374,
- 129, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, 15,
- 75, 77, 79, 84, 85, 87, 89, 77, 77, 77, 77, 77, 77, 77, -190, 129,
- 129, 129, 129, 129, 129, 129, 129, 129, 222, -190, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, 129, -190, 90, 95,
- 129, 129, 98, 129, 147, 147, 129, 129, 99, 100, 101, 102, 104, 108, 112, 70,
- 116, 118, 119, 120, 121, 122, 123, 124, 125, -190, -190, 129, -190, -190, -190, -190,
- -190, -190, -190, -190, 129, 129, -190, 129, -190, 147, 137, -190, -190, -190, -190, 138,
- 129, 139, -190, -190, -190, -190, -190, -190, -190, 129, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, -190, 129, 140, 129, 345, 147, 141, 126, 127, 129, 131, 103, 142,
- -190, 143, -190, -190, -190, -190, -190, -190, 147, -190, -190, -190, -190, -190, 148, -190,
- 20, 149, 157, -190, 158, -190, -190, -190, -190, -190, 114, -190, -190, -190, 129, 115,
- -190, 129, 160, -190, 162, -190};
-
-const unsigned char PipelineParserGen::yydefact_[] = {
+ 35, 39, 44, 77, 41, -226, 43, 61, 51, 52, 61, -226, 60, -226, -226, -226,
+ -226, -226, -226, -226, 62, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, 45, -226, 48, 70, 39, -226, 278, 61, 7, -226, -226, -226, 40,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, 40, -226, -226, -226, -226, -226, 71, -226, 55, 487, 179,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -2, 76, 81,
+ 82, 83, 84, 92, 93, 81, 81, 81, 81, 81, 81, 81, -226, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 94, 179, 179, 179, 95, 179, 96, 97,
+ 98, 100, 179, 101, 104, 443, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, 179, -226, 108, 78, 179, 179, 113,
+ 179, 197, 197, 179, 179, 119, 129, 130, 131, 133, 141, 142, 85, 144, 146, 148,
+ 151, 152, 153, 154, 155, 158, 159, 160, 179, 170, 171, 172, 179, 173, 179, 179,
+ 179, 179, 174, 179, 179, -226, -226, 179, -226, -226, -226, -226, -226, -226, -226, -226,
+ 179, 179, -226, 179, -226, 197, 175, -226, -226, -226, -226, 180, 179, 187, -226, -226,
+ -226, -226, -226, -226, -226, 179, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, 179, -226, -226, -226, 179, -226, 179, 179, 179, 179, -226, 179, 179, -226, 179,
+ 189, 179, 380, 197, 193, 176, 181, 179, 199, 138, 198, 205, 206, 179, 207, 208,
+ 209, 210, 211, -226, 212, -226, -226, -226, -226, -226, -226, 197, -226, -226, -226, -226,
+ -226, 213, -226, 116, 216, 217, 218, 219, 220, 222, 223, 224, 225, 226, -226, 227,
+ -226, -226, -226, -226, -226, 115, -226, -226, -226, 228, -226, -226, -226, -226, -226, -226,
+ -226, 179, 168, -226, -226, 179, 230, -226, 231, -226};
+
+const short PipelineParserGen::yydefact_[] = {
0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 5, 0, 7, 8, 9, 10, 11, 12,
- 2, 0, 96, 98, 100, 102, 95, 97, 99, 101, 16, 17, 18, 19, 21, 23, 0, 20, 0,
+ 2, 0, 111, 113, 115, 117, 110, 112, 114, 116, 16, 17, 18, 19, 21, 23, 0, 20, 0,
0, 3, 14, 0, 0, 0, 6, 4, 22, 0, 44, 47, 48, 49, 46, 45, 50, 51, 52,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 77, 78, 79, 80, 53, 54, 55, 56, 43, 0, 40, 41, 42, 39, 24, 0, 81, 0,
- 138, 124, 29, 31, 33, 35, 36, 37, 28, 30, 32, 34, 27, 25, 38, 129, 130, 131, 146,
- 147, 132, 150, 151, 152, 133, 156, 157, 134, 176, 177, 178, 179, 180, 181, 182, 135, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199, 26, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, 104,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 112, 113, 114, 115, 116, 121,
- 117, 118, 119, 122, 123, 105, 106, 107, 108, 120, 109, 110, 111, 126, 124, 127, 0, 0, 0,
+ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 53, 54, 55, 56, 43, 0, 40, 41, 42, 39, 24, 0, 96, 0, 153, 139, 29, 31,
+ 33, 35, 36, 37, 28, 30, 32, 34, 27, 25, 38, 144, 145, 146, 161, 162, 147, 195, 196,
+ 197, 148, 201, 202, 149, 221, 222, 223, 224, 225, 226, 227, 150, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 26, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 118, 119, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 127, 128, 129, 130, 131, 136, 132, 133, 134, 137, 138, 120, 121, 122, 123, 135, 124, 125,
+ 126, 141, 139, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 137, 145, 0, 142, 143, 141, 144, 139, 125, 136, 15, 0, 0, 149,
- 0, 168, 165, 0, 160, 161, 162, 163, 0, 0, 0, 183, 184, 185, 186, 187, 188, 189, 0,
- 210, 211, 212, 213, 214, 215, 216, 217, 218, 140, 124, 0, 124, 0, 165, 0, 0, 0, 124,
- 0, 0, 0, 128, 0, 167, 172, 173, 174, 171, 175, 0, 169, 166, 164, 158, 159, 0, 155,
- 0, 0, 0, 170, 0, 201, 202, 203, 204, 200, 205, 148, 153, 154, 0, 207, 206, 0, 0,
- 208, 0, 209};
+ 0, 0, 0, 0, 0, 0, 0, 0, 152, 160, 0, 157, 158, 156, 159, 154, 140, 151, 15,
+ 0, 0, 179, 0, 213, 210, 0, 205, 206, 207, 208, 0, 0, 0, 228, 229, 230, 231, 232,
+ 233, 234, 0, 255, 256, 257, 258, 259, 260, 261, 262, 263, 180, 181, 0, 183, 184, 185, 0,
+ 187, 0, 0, 0, 0, 192, 0, 0, 155, 139, 0, 139, 0, 210, 0, 0, 0, 139, 0,
+ 0, 0, 0, 0, 139, 0, 0, 0, 0, 0, 143, 0, 212, 217, 218, 219, 216, 220, 0,
+ 214, 211, 209, 203, 204, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215,
+ 0, 246, 247, 248, 249, 245, 250, 182, 186, 188, 0, 190, 191, 193, 194, 178, 198, 199, 0,
+ 252, 189, 251, 0, 0, 253, 0, 254};
const short PipelineParserGen::yypgoto_[] = {
- -190, -190, -190, -160, -158, -112, -146, -111, -190, -190, -190, -190, -190, -190, -190, -190,
- -6, -190, -5, -7, -1, -190, -190, -186, -36, -190, -190, -190, -190, -190, -190, -190,
- -189, -190, -190, -190, -190, 130, -190, -190, -190, -190, -190, -190, -190, -190, 132, 23,
- -147, -15, -109, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
- -190, -190, -190, -190, -190, -190, -183, -107, -190, 62, -190};
+ -226, -226, -226, -203, -201, -131, -183, -118, -226, -226, -226, -226, -226, -226, -226, -226,
+ -6, -226, -5, -7, -1, -226, -226, -225, -36, -226, -226, -226, -226, -226, -226, -226,
+ -219, -226, -226, -226, -226, 200, -226, -226, -226, -226, -226, -226, -226, -226, 136, 14,
+ -176, -16, -124, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -221, -117, -226, 54, -226};
const short PipelineParserGen::yydefgoto_[] = {
- -1, 86, 235, 87, 88, 89, 90, 239, 296, 91, 240, 297, 184, 185, 186, 187, 188, 189, 190,
- 191, 192, 193, 194, 280, 195, 196, 197, 198, 199, 200, 201, 202, 203, 252, 253, 254, 279, 4,
- 12, 13, 14, 15, 16, 17, 18, 41, 108, 33, 204, 205, 210, 110, 111, 168, 112, 113, 114,
- 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 314, 131, 132,
- 133, 134, 135, 136, 137, 138, 139, 140, 319, 322, 206, 281, 2, 37, 38};
+ -1, 101, 295, 102, 103, 104, 105, 299, 379, 106, 300, 380, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 355, 240, 241, 242, 243, 244, 245, 246, 247, 248, 312, 313, 314,
+ 354, 4, 12, 13, 14, 15, 16, 17, 18, 41, 123, 33, 249, 250, 255, 125, 126, 213,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 405, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 418, 422, 251, 356, 2, 37, 38};
const short PipelineParserGen::yytable_[] = {
- 31, 29, 30, 31, 29, 30, 32, 94, 236, 32, 237, 107, 224, 225, 226, 227, 228, 229, 230,
- 231, 232, 241, 238, 251, 251, 23, 250, 255, 21, 22, 23, 24, 109, 36, 1, 31, 29, 30,
- 3, 5, 19, 32, 216, 217, 218, 219, 220, 221, 222, 20, 107, 39, 34, 35, 42, 40, 21,
- 22, 23, 24, 251, 244, 245, 43, 247, 92, 44, 256, 257, 93, 142, 109, 93, 6, 7, 8,
- 9, 10, 11, 143, 208, 27, 209, 25, 211, 26, 27, 28, 275, 212, 213, 251, 214, 287, 215,
- 289, 242, 276, 277, 243, 278, 302, 246, 258, 259, 260, 261, 251, 262, 284, 307, 25, 263, 26,
- 27, 28, 264, 265, 286, 291, 266, 292, 267, 268, 269, 270, 271, 272, 273, 274, 300, 301, 95,
- 294, 96, 303, 207, 21, 22, 23, 24, 169, 170, 282, 283, 285, 288, 299, 305, 306, 248, 304,
- 249, 315, 308, 21, 22, 23, 24, 169, 170, 316, 317, 318, 324, 321, 325, 293, 295, 45, 95,
- 320, 96, 298, 323, 97, 98, 99, 100, 101, 102, 93, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 25, 181, 26, 27, 28, 182, 183, 93, 171, 172, 173, 174, 175, 176, 177, 178, 179,
- 180, 25, 181, 26, 27, 28, 182, 183, 0, 141, 93, 223, 0, 0, 0, 0, 0, 233, 0,
- 0, 234, 103, 0, 104, 105, 106, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 313, 81, 82, 83, 84, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 309, 310, 0, 46, 0, 312,
+ 31, 29, 30, 31, 29, 30, 32, 109, 23, 32, 296, 122, 297, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 36, 281, 282, 283, 301, 285, 298, 124, 310, 315, 290, 31, 29, 30,
+ 311, 311, 1, 32, 3, 110, 5, 111, 20, 19, 112, 113, 114, 115, 116, 117, 34, 35, 107,
+ 261, 262, 263, 264, 265, 266, 267, 39, 122, 40, 42, 43, 21, 22, 23, 24, 44, 108, 172,
+ 173, 304, 305, 27, 307, 253, 303, 316, 317, 124, 254, 256, 257, 258, 311, 6, 7, 8, 9,
+ 10, 11, 259, 260, 280, 284, 286, 287, 288, 337, 289, 291, 108, 341, 292, 343, 344, 345, 346,
+ 302, 348, 349, 306, 118, 350, 119, 120, 121, 318, 21, 22, 23, 24, 351, 352, 370, 353, 372,
+ 319, 320, 321, 311, 322, 385, 25, 359, 26, 27, 28, 391, 323, 324, 325, 326, 361, 327, 374,
+ 328, 375, 398, 329, 330, 331, 332, 333, 311, 362, 334, 335, 336, 363, 252, 364, 365, 366, 367,
+ 377, 368, 369, 338, 339, 340, 342, 347, 417, 383, 357, 110, 108, 111, 384, 358, 21, 22, 23,
+ 24, 214, 215, 360, 25, 371, 26, 27, 28, 382, 308, 387, 309, 386, 388, 21, 22, 23, 24,
+ 214, 215, 389, 390, 392, 393, 394, 395, 396, 397, 399, 406, 407, 408, 376, 410, 409, 411, 412,
+ 413, 414, 415, 416, 419, 421, 424, 425, 378, 171, 381, 45, 0, 420, 268, 0, 0, 423, 108,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 25, 226, 26, 27, 28, 227, 228, 108, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 25, 226, 26, 27, 28, 227, 228, 46, 0, 0,
47, 0, 0, 0, 0, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 290, 0, 0, 234, 0, 0, 0, 0, 0, 0, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 144, 145,
- 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
- 165, 166, 167};
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 0, 0, 0, 0, 0, 0, 404, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 402, 400, 401, 0, 373, 0, 403, 294, 0, 0, 0, 0, 0, 0, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 293, 0, 0, 294, 0, 0, 0, 0, 0,
+ 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 97, 98, 99, 100, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212};
const short PipelineParserGen::yycheck_[] = {
- 7, 7, 7, 10, 10, 10, 7, 43, 168, 10, 168, 47, 159, 160, 161, 162, 163, 164, 165,
- 166, 167, 204, 168, 212, 213, 10, 212, 213, 8, 9, 10, 11, 47, 10, 5, 42, 42, 42,
- 3, 0, 6, 42, 151, 152, 153, 154, 155, 156, 157, 3, 86, 4, 3, 3, 22, 4, 8,
- 9, 10, 11, 249, 208, 209, 20, 211, 42, 3, 214, 215, 52, 4, 86, 52, 14, 15, 16,
- 17, 18, 19, 21, 5, 66, 5, 63, 5, 65, 66, 67, 235, 5, 5, 280, 5, 276, 5,
- 278, 6, 244, 245, 4, 247, 284, 4, 4, 4, 4, 4, 296, 4, 256, 296, 63, 4, 65,
- 66, 67, 4, 47, 265, 279, 4, 279, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3,
- 279, 5, 4, 143, 8, 9, 10, 11, 12, 13, 6, 6, 6, 6, 6, 6, 6, 3, 48,
- 5, 4, 6, 8, 9, 10, 11, 12, 13, 4, 4, 49, 4, 50, 4, 279, 279, 39, 3,
- 318, 5, 280, 321, 8, 9, 10, 11, 12, 13, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, 66, 67, 68, 69, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, -1, 86, 52, 158, -1, -1, -1, -1, -1, 4, -1,
- -1, 7, 63, -1, 65, 66, 67, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 304, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 304, 304, 304, -1, 4, -1, 304,
+ 7, 7, 7, 10, 10, 10, 7, 43, 10, 10, 213, 47, 213, 189, 190, 191, 192, 193, 194,
+ 195, 196, 197, 198, 199, 10, 201, 202, 203, 249, 205, 213, 47, 257, 258, 210, 42, 42, 42,
+ 257, 258, 5, 42, 3, 3, 0, 5, 3, 6, 8, 9, 10, 11, 12, 13, 3, 3, 42,
+ 181, 182, 183, 184, 185, 186, 187, 4, 101, 4, 22, 20, 8, 9, 10, 11, 3, 67, 4,
+ 21, 253, 254, 81, 256, 5, 4, 259, 260, 101, 5, 5, 5, 5, 309, 14, 15, 16, 17,
+ 18, 19, 5, 5, 5, 5, 5, 5, 5, 280, 5, 5, 67, 284, 5, 286, 287, 288, 289,
+ 6, 291, 292, 4, 78, 295, 80, 81, 82, 4, 8, 9, 10, 11, 304, 305, 351, 307, 353,
+ 4, 4, 4, 355, 4, 359, 78, 316, 80, 81, 82, 365, 4, 4, 62, 4, 325, 4, 354,
+ 4, 354, 379, 4, 4, 4, 4, 4, 379, 337, 4, 4, 4, 341, 173, 343, 344, 345, 346,
+ 354, 348, 349, 4, 4, 4, 4, 4, 64, 4, 6, 3, 67, 5, 4, 6, 8, 9, 10,
+ 11, 12, 13, 6, 78, 6, 80, 81, 82, 6, 3, 63, 5, 4, 6, 8, 9, 10, 11,
+ 12, 13, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 354, 4, 6, 4, 4,
+ 4, 4, 4, 4, 4, 65, 4, 4, 354, 101, 355, 39, -1, 417, 188, -1, -1, 421, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 4, -1, -1,
7, -1, -1, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 4, -1, -1, 7, -1, -1, -1, -1, -1, -1, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46};
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, -1, -1, -1, -1, -1, -1, 387, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 387, 387, 387, -1, 4, -1, 387, 7, -1, -1, -1, -1, -1, -1, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 4, -1, -1, 7, -1, -1, -1, -1, -1,
+ -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, 63, 64, 65, 66, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61};
const unsigned char PipelineParserGen::yystos_[] = {
- 0, 5, 158, 3, 107, 0, 14, 15, 16, 17, 18, 19, 108, 109, 110, 111, 112, 113, 114,
- 6, 3, 8, 9, 10, 11, 63, 65, 66, 67, 86, 88, 89, 90, 117, 3, 3, 117, 159,
- 160, 4, 4, 115, 22, 20, 3, 107, 4, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 0, 5, 188, 3, 122, 0, 14, 15, 16, 17, 18, 19, 123, 124, 125, 126, 127, 128, 129,
+ 6, 3, 8, 9, 10, 11, 78, 80, 81, 82, 101, 103, 104, 105, 132, 3, 3, 132, 189,
+ 190, 4, 4, 130, 22, 20, 3, 122, 4, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 71, 73, 74, 75, 76, 79, 117, 52, 94,
- 3, 5, 8, 9, 10, 11, 12, 13, 63, 65, 66, 67, 94, 116, 119, 121, 122, 124, 125,
- 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 144, 145,
- 146, 147, 148, 149, 150, 151, 152, 153, 116, 4, 21, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 123, 12, 13,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 68, 69, 82, 83, 84, 85, 86, 87,
- 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 101, 102, 118, 119, 156, 89, 5,
- 5, 120, 5, 5, 5, 5, 5, 120, 120, 120, 120, 120, 120, 120, 159, 118, 118, 118, 118,
- 118, 118, 118, 118, 118, 4, 7, 72, 73, 74, 76, 77, 80, 156, 6, 4, 118, 118, 4,
- 118, 3, 5, 93, 102, 103, 104, 105, 93, 118, 118, 4, 4, 4, 4, 4, 4, 4, 47,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 118, 118, 118, 118, 106, 93, 157, 6, 6, 118,
- 6, 118, 156, 6, 156, 4, 73, 74, 75, 76, 77, 78, 81, 157, 6, 4, 4, 156, 4,
- 48, 6, 6, 93, 6, 86, 88, 89, 90, 94, 143, 4, 4, 4, 49, 154, 118, 50, 155,
- 118, 4, 4};
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 86, 88, 89, 90, 91, 94, 132, 67, 109, 3, 5, 8, 9,
+ 10, 11, 12, 13, 78, 80, 81, 82, 109, 131, 134, 136, 137, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 131, 4, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 138, 12, 13, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 83,
+ 84, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 133, 134, 186, 104, 5, 5, 135, 5, 5, 5, 5, 5, 135, 135, 135, 135, 135,
+ 135, 135, 189, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 5, 133, 133, 133, 5,
+ 133, 5, 5, 5, 5, 133, 5, 5, 4, 7, 87, 88, 89, 91, 92, 95, 186, 6, 4,
+ 133, 133, 4, 133, 3, 5, 108, 117, 118, 119, 120, 108, 133, 133, 4, 4, 4, 4, 4,
+ 4, 4, 62, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 133, 4, 4, 4, 133,
+ 4, 133, 133, 133, 133, 4, 133, 133, 133, 133, 133, 133, 121, 108, 187, 6, 6, 133, 6,
+ 133, 133, 133, 133, 133, 133, 133, 133, 133, 186, 6, 186, 4, 88, 89, 90, 91, 92, 93,
+ 96, 187, 6, 4, 4, 186, 4, 63, 6, 6, 6, 186, 6, 6, 6, 6, 6, 6, 108,
+ 6, 101, 103, 104, 105, 109, 158, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 64,
+ 184, 4, 133, 65, 185, 133, 4, 4};
const unsigned char PipelineParserGen::yyr1_[] = {
- 0, 70, 158, 107, 107, 160, 159, 108, 108, 108, 108, 108, 108, 114, 109, 110, 117, 117, 117,
- 117, 111, 112, 113, 115, 115, 79, 79, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 71, 71, 71, 71, 76, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 74, 74,
- 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
- 75, 75, 75, 75, 75, 94, 95, 96, 97, 99, 100, 101, 82, 83, 84, 85, 87, 91, 92,
- 86, 86, 88, 88, 89, 89, 90, 90, 98, 98, 102, 102, 102, 102, 102, 102, 102, 102, 102,
- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 156, 156, 118, 118, 120, 119, 119, 119, 119,
- 119, 119, 119, 121, 122, 123, 123, 80, 72, 72, 72, 72, 77, 124, 124, 125, 126, 127, 127,
- 127, 128, 129, 130, 131, 131, 132, 133, 93, 93, 103, 103, 104, 157, 157, 105, 106, 106, 81,
- 78, 78, 78, 78, 78, 134, 134, 134, 134, 134, 134, 134, 135, 136, 137, 138, 139, 140, 141,
- 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 143, 143, 143, 143, 143, 154, 154, 155, 155,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153};
+ 0, 85, 188, 122, 122, 190, 189, 123, 123, 123, 123, 123, 123, 129, 124, 125, 132, 132, 132,
+ 132, 126, 127, 128, 130, 130, 94, 94, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 86, 86, 86, 86, 91, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 89,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 109, 110, 111, 112, 114, 115, 116, 97, 98, 99, 100, 102, 106, 107, 101, 101, 103, 103,
+ 104, 104, 105, 105, 113, 113, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+ 117, 117, 117, 117, 117, 117, 186, 186, 133, 133, 135, 134, 134, 134, 134, 134, 134, 134, 136,
+ 137, 138, 138, 95, 87, 87, 87, 87, 92, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
+ 139, 139, 139, 139, 139, 139, 139, 140, 141, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 142, 142, 142, 143, 144, 145, 146, 146, 147, 148, 108, 108, 118, 118,
+ 119, 187, 187, 120, 121, 121, 96, 93, 93, 93, 93, 93, 149, 149, 149, 149, 149, 149, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 158,
+ 158, 158, 158, 184, 184, 185, 185, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168};
const signed char PipelineParserGen::yyr2_[] = {
- 0, 2, 3, 0, 4, 0, 2, 1, 1, 1, 1, 1, 1, 5, 3, 7, 1, 1, 1, 1, 2, 2, 4, 0, 2, 2, 2, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1,
- 4, 1, 1, 1, 1, 1, 1, 1, 3, 3, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 8, 4, 1, 1, 1, 8, 8, 6, 1, 1, 6, 6,
- 1, 1, 1, 1, 3, 0, 2, 3, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 11, 4, 4, 4, 4, 4, 4, 4, 4, 4};
+ 0, 2, 3, 0, 4, 0, 2, 1, 1, 1, 1, 1, 1, 5, 3, 7, 1, 1, 1, 1, 2, 2, 4, 0, 2, 2, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 4, 1, 1, 1, 1, 1, 1,
+ 1, 3, 3, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 4,
+ 4, 4, 7, 4, 4, 4, 7, 4, 7, 8, 7, 7, 4, 7, 7, 1, 1, 1, 8, 8, 6, 1, 1, 6, 6, 1, 1, 1, 1, 3,
+ 0, 2, 3, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 11, 4, 4, 4, 4, 4, 4, 4, 4, 4};
#if YYDEBUG
@@ -3569,6 +4072,21 @@ const char* const PipelineParserGen::yytname_[] = {"\"EOF\"",
"TO_OBJECT_ID",
"TO_STRING",
"TYPE",
+ "ABS",
+ "CEIL",
+ "DIVIDE",
+ "EXPONENT",
+ "FLOOR",
+ "LN",
+ "LOG",
+ "LOGTEN",
+ "MOD",
+ "MULTIPLY",
+ "POW",
+ "ROUND",
+ "SQRT",
+ "SUBTRACT",
+ "TRUNC",
"INPUT_ARG",
"TO_ARG",
"ON_ERROR_ARG",
@@ -3676,6 +4194,21 @@ const char* const PipelineParserGen::yytname_[] = {"\"EOF\"",
"toObjectId",
"toString",
"type",
+ "abs",
+ "ceil",
+ "divide",
+ "exponent",
+ "floor",
+ "ln",
+ "log",
+ "logten",
+ "mod",
+ "multiply",
+ "pow",
+ "round",
+ "sqrt",
+ "subtract",
+ "trunc",
"onErrorArg",
"onNullArg",
"expressions",
@@ -3689,18 +4222,23 @@ const char* const PipelineParserGen::yytname_[] = {"\"EOF\"",
#if YYDEBUG
const short PipelineParserGen::yyrline_[] = {
- 0, 230, 230, 236, 237, 245, 245, 248, 248, 248, 248, 248, 248, 251, 261, 267, 277, 277, 277,
- 277, 281, 286, 291, 297, 300, 307, 310, 316, 317, 320, 323, 326, 329, 332, 335, 338, 341, 344,
- 347, 351, 351, 351, 351, 355, 363, 366, 369, 372, 375, 378, 387, 390, 393, 396, 399, 402, 405,
- 413, 416, 419, 422, 425, 428, 431, 434, 437, 440, 443, 446, 449, 452, 455, 458, 461, 464, 467,
- 470, 473, 476, 479, 482, 489, 495, 501, 507, 513, 519, 525, 531, 537, 543, 549, 555, 561, 567,
- 573, 576, 582, 585, 591, 594, 600, 603, 609, 612, 618, 619, 620, 621, 622, 623, 624, 625, 626,
- 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 643, 644, 651, 651, 655, 660, 660, 660, 660,
- 660, 660, 661, 667, 675, 681, 684, 691, 698, 698, 698, 698, 702, 708, 709, 713, 723, 730, 730,
- 730, 734, 744, 754, 761, 761, 765, 772, 779, 779, 783, 783, 787, 793, 794, 801, 807, 810, 817,
- 824, 825, 826, 827, 828, 831, 831, 831, 831, 831, 831, 831, 833, 838, 843, 848, 853, 858, 863,
- 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 884, 884, 884, 884, 884, 888, 891, 898, 901,
- 907, 916, 921, 926, 931, 936, 941, 946, 951, 956};
+ 0, 246, 246, 252, 253, 261, 261, 264, 264, 264, 264, 264, 264, 267, 277, 283,
+ 293, 293, 293, 293, 297, 302, 307, 313, 316, 323, 326, 332, 333, 336, 339, 342,
+ 345, 348, 351, 354, 357, 360, 363, 367, 367, 367, 367, 371, 379, 382, 385, 388,
+ 391, 394, 403, 406, 409, 412, 415, 418, 421, 429, 432, 435, 438, 441, 444, 447,
+ 450, 453, 456, 459, 462, 465, 468, 471, 474, 477, 480, 483, 486, 489, 492, 495,
+ 498, 501, 504, 507, 510, 513, 516, 519, 522, 525, 528, 531, 534, 537, 540, 543,
+ 550, 556, 562, 568, 574, 580, 586, 592, 598, 604, 610, 616, 622, 628, 634, 637,
+ 643, 646, 652, 655, 661, 664, 670, 673, 679, 680, 681, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 704, 705, 712, 712, 716,
+ 721, 721, 721, 721, 721, 721, 722, 728, 736, 742, 745, 752, 759, 759, 759, 759,
+ 763, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 770, 770,
+ 770, 770, 774, 784, 790, 795, 800, 806, 811, 816, 821, 827, 832, 838, 847, 853,
+ 859, 864, 870, 876, 876, 876, 880, 890, 900, 907, 907, 911, 918, 925, 925, 929,
+ 929, 933, 939, 940, 947, 953, 956, 963, 970, 971, 972, 973, 974, 977, 977, 977,
+ 977, 977, 977, 977, 979, 984, 989, 994, 999, 1004, 1009, 1015, 1016, 1017, 1018, 1019,
+ 1020, 1021, 1022, 1023, 1024, 1030, 1030, 1030, 1030, 1030, 1034, 1037, 1044, 1047, 1053, 1062,
+ 1067, 1072, 1077, 1082, 1087, 1092, 1097, 1102};
void PipelineParserGen::yy_stack_print_() const {
*yycdebug_ << "Stack now";
@@ -3721,8 +4259,8 @@ void PipelineParserGen::yy_reduce_print_(int yyrule) const {
#endif // YYDEBUG
-#line 58 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 58 "pipeline_grammar.yy"
} // namespace mongo
-#line 3582 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 4075 "pipeline_parser_gen.cpp"
-#line 960 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 1106 "pipeline_grammar.yy"
diff --git a/src/mongo/db/cst/pipeline_parser_gen.hpp b/src/mongo/db/cst/pipeline_parser_gen.hpp
index 0894f742cb9..806dba9ea30 100644
--- a/src/mongo/db/cst/pipeline_parser_gen.hpp
+++ b/src/mongo/db/cst/pipeline_parser_gen.hpp
@@ -1,4 +1,4 @@
-// A Bison parser, made by GNU Bison 3.6.
+// A Bison parser, made by GNU Bison 3.6.3.
// Skeleton interface for Bison LALR(1) parsers in C++
@@ -32,7 +32,7 @@
/**
- ** \file src/mongo/db/cst/pipeline_parser_gen.hpp
+ ** \file pipeline_parser_gen.hpp
** Define the mongo::parser class.
*/
@@ -42,10 +42,10 @@
// especially those whose name start with YY_ or yy_. They are
// private implementation details that can be changed or removed.
-#ifndef YY_YY_SRC_MONGO_DB_CST_PIPELINE_PARSER_GEN_HPP_INCLUDED
-#define YY_YY_SRC_MONGO_DB_CST_PIPELINE_PARSER_GEN_HPP_INCLUDED
+#ifndef YY_YY_PIPELINE_PARSER_GEN_HPP_INCLUDED
+#define YY_YY_PIPELINE_PARSER_GEN_HPP_INCLUDED
// "%code requires" blocks.
-#line 66 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 66 "pipeline_grammar.yy"
#include "mongo/db/cst/c_node.h"
#include "mongo/db/cst/key_fieldname.h"
@@ -61,7 +61,7 @@ class BSONLexer;
#pragma warning(disable : 4065)
#endif
-#line 65 "src/mongo/db/cst/pipeline_parser_gen.hpp"
+#line 65 "pipeline_parser_gen.hpp"
#include <cassert>
#include <cstdlib> // std::abort
@@ -190,9 +190,9 @@ class BSONLexer;
#define YYDEBUG 0
#endif
-#line 58 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 58 "pipeline_grammar.yy"
namespace mongo {
-#line 200 "src/mongo/db/cst/pipeline_parser_gen.hpp"
+#line 200 "pipeline_parser_gen.hpp"
/// A Bison parser.
@@ -457,6 +457,21 @@ public:
// toObjectId
// toString
// type
+ // abs
+ // ceil
+ // divide
+ // exponent
+ // floor
+ // ln
+ // log
+ // logten
+ // mod
+ // multiply
+ // pow
+ // round
+ // sqrt
+ // subtract
+ // trunc
char dummy7[sizeof(CNode)];
// projectionFieldname
@@ -602,29 +617,44 @@ public:
TO_OBJECT_ID = 44, // TO_OBJECT_ID
TO_STRING = 45, // TO_STRING
TYPE = 46, // TYPE
- INPUT_ARG = 47, // INPUT_ARG
- TO_ARG = 48, // TO_ARG
- ON_ERROR_ARG = 49, // ON_ERROR_ARG
- ON_NULL_ARG = 50, // ON_NULL_ARG
- FIELDNAME = 51, // FIELDNAME
- STRING = 52, // STRING
- BINARY = 53, // BINARY
- UNDEFINED = 54, // UNDEFINED
- OBJECT_ID = 55, // OBJECT_ID
- DATE_LITERAL = 56, // DATE_LITERAL
- JSNULL = 57, // JSNULL
- REGEX = 58, // REGEX
- DB_POINTER = 59, // DB_POINTER
- JAVASCRIPT = 60, // JAVASCRIPT
- SYMBOL = 61, // SYMBOL
- JAVASCRIPT_W_SCOPE = 62, // JAVASCRIPT_W_SCOPE
- INT_NON_ZERO = 63, // INT_NON_ZERO
- TIMESTAMP = 64, // TIMESTAMP
- LONG_NON_ZERO = 65, // LONG_NON_ZERO
- DOUBLE_NON_ZERO = 66, // DOUBLE_NON_ZERO
- DECIMAL_NON_ZERO = 67, // DECIMAL_NON_ZERO
- MIN_KEY = 68, // MIN_KEY
- MAX_KEY = 69 // MAX_KEY
+ ABS = 47, // ABS
+ CEIL = 48, // CEIL
+ DIVIDE = 49, // DIVIDE
+ EXPONENT = 50, // EXPONENT
+ FLOOR = 51, // FLOOR
+ LN = 52, // LN
+ LOG = 53, // LOG
+ LOGTEN = 54, // LOGTEN
+ MOD = 55, // MOD
+ MULTIPLY = 56, // MULTIPLY
+ POW = 57, // POW
+ ROUND = 58, // ROUND
+ SQRT = 59, // SQRT
+ SUBTRACT = 60, // SUBTRACT
+ TRUNC = 61, // TRUNC
+ INPUT_ARG = 62, // INPUT_ARG
+ TO_ARG = 63, // TO_ARG
+ ON_ERROR_ARG = 64, // ON_ERROR_ARG
+ ON_NULL_ARG = 65, // ON_NULL_ARG
+ FIELDNAME = 66, // FIELDNAME
+ STRING = 67, // STRING
+ BINARY = 68, // BINARY
+ UNDEFINED = 69, // UNDEFINED
+ OBJECT_ID = 70, // OBJECT_ID
+ DATE_LITERAL = 71, // DATE_LITERAL
+ JSNULL = 72, // JSNULL
+ REGEX = 73, // REGEX
+ DB_POINTER = 74, // DB_POINTER
+ JAVASCRIPT = 75, // JAVASCRIPT
+ SYMBOL = 76, // SYMBOL
+ JAVASCRIPT_W_SCOPE = 77, // JAVASCRIPT_W_SCOPE
+ INT_NON_ZERO = 78, // INT_NON_ZERO
+ TIMESTAMP = 79, // TIMESTAMP
+ LONG_NON_ZERO = 80, // LONG_NON_ZERO
+ DOUBLE_NON_ZERO = 81, // DOUBLE_NON_ZERO
+ DECIMAL_NON_ZERO = 82, // DECIMAL_NON_ZERO
+ MIN_KEY = 83, // MIN_KEY
+ MAX_KEY = 84 // MAX_KEY
};
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type yytokentype;
@@ -639,7 +669,7 @@ public:
/// Symbol kinds.
struct symbol_kind {
enum symbol_kind_type {
- YYNTOKENS = 70, ///< Number of tokens.
+ YYNTOKENS = 85, ///< Number of tokens.
S_YYEMPTY = -2,
S_YYEOF = 0, // "EOF"
S_YYerror = 1, // error
@@ -688,120 +718,150 @@ public:
S_TO_OBJECT_ID = 44, // TO_OBJECT_ID
S_TO_STRING = 45, // TO_STRING
S_TYPE = 46, // TYPE
- S_INPUT_ARG = 47, // INPUT_ARG
- S_TO_ARG = 48, // TO_ARG
- S_ON_ERROR_ARG = 49, // ON_ERROR_ARG
- S_ON_NULL_ARG = 50, // ON_NULL_ARG
- S_FIELDNAME = 51, // FIELDNAME
- S_STRING = 52, // STRING
- S_BINARY = 53, // BINARY
- S_UNDEFINED = 54, // UNDEFINED
- S_OBJECT_ID = 55, // OBJECT_ID
- S_DATE_LITERAL = 56, // DATE_LITERAL
- S_JSNULL = 57, // JSNULL
- S_REGEX = 58, // REGEX
- S_DB_POINTER = 59, // DB_POINTER
- S_JAVASCRIPT = 60, // JAVASCRIPT
- S_SYMBOL = 61, // SYMBOL
- S_JAVASCRIPT_W_SCOPE = 62, // JAVASCRIPT_W_SCOPE
- S_INT_NON_ZERO = 63, // INT_NON_ZERO
- S_TIMESTAMP = 64, // TIMESTAMP
- S_LONG_NON_ZERO = 65, // LONG_NON_ZERO
- S_DOUBLE_NON_ZERO = 66, // DOUBLE_NON_ZERO
- S_DECIMAL_NON_ZERO = 67, // DECIMAL_NON_ZERO
- S_MIN_KEY = 68, // MIN_KEY
- S_MAX_KEY = 69, // MAX_KEY
- S_YYACCEPT = 70, // $accept
- S_projectionFieldname = 71, // projectionFieldname
- S_expressionFieldname = 72, // expressionFieldname
- S_stageAsUserFieldname = 73, // stageAsUserFieldname
- S_argAsUserFieldname = 74, // argAsUserFieldname
- S_aggExprAsUserFieldname = 75, // aggExprAsUserFieldname
- S_invariableUserFieldname = 76, // invariableUserFieldname
- S_idAsUserFieldname = 77, // idAsUserFieldname
- S_valueFieldname = 78, // valueFieldname
- S_projectField = 79, // projectField
- S_expressionField = 80, // expressionField
- S_valueField = 81, // valueField
- S_dbPointer = 82, // dbPointer
- S_javascript = 83, // javascript
- S_symbol = 84, // symbol
- S_javascriptWScope = 85, // javascriptWScope
- S_int = 86, // int
- S_timestamp = 87, // timestamp
- S_long = 88, // long
- S_double = 89, // double
- S_decimal = 90, // decimal
- S_minKey = 91, // minKey
- S_maxKey = 92, // maxKey
- S_value = 93, // value
- S_string = 94, // string
- S_binary = 95, // binary
- S_undefined = 96, // undefined
- S_objectId = 97, // objectId
- S_bool = 98, // bool
- S_date = 99, // date
- S_null = 100, // null
- S_regex = 101, // regex
- S_simpleValue = 102, // simpleValue
- S_compoundValue = 103, // compoundValue
- S_valueArray = 104, // valueArray
- S_valueObject = 105, // valueObject
- S_valueFields = 106, // valueFields
- S_stageList = 107, // stageList
- S_stage = 108, // stage
- S_inhibitOptimization = 109, // inhibitOptimization
- S_unionWith = 110, // unionWith
- S_skip = 111, // skip
- S_limit = 112, // limit
- S_project = 113, // project
- S_sample = 114, // sample
- S_projectFields = 115, // projectFields
- S_projection = 116, // projection
- S_num = 117, // num
- S_expression = 118, // expression
- S_compoundExpression = 119, // compoundExpression
- S_exprFixedTwoArg = 120, // exprFixedTwoArg
- S_expressionArray = 121, // expressionArray
- S_expressionObject = 122, // expressionObject
- S_expressionFields = 123, // expressionFields
- S_maths = 124, // maths
- S_add = 125, // add
- S_atan2 = 126, // atan2
- S_boolExps = 127, // boolExps
- S_and = 128, // and
- S_or = 129, // or
- S_not = 130, // not
- S_literalEscapes = 131, // literalEscapes
- S_const = 132, // const
- S_literal = 133, // literal
- S_compExprs = 134, // compExprs
- S_cmp = 135, // cmp
- S_eq = 136, // eq
- S_gt = 137, // gt
- S_gte = 138, // gte
- S_lt = 139, // lt
- S_lte = 140, // lte
- S_ne = 141, // ne
- S_typeExpression = 142, // typeExpression
- S_typeValue = 143, // typeValue
- S_convert = 144, // convert
- S_toBool = 145, // toBool
- S_toDate = 146, // toDate
- S_toDecimal = 147, // toDecimal
- S_toDouble = 148, // toDouble
- S_toInt = 149, // toInt
- S_toLong = 150, // toLong
- S_toObjectId = 151, // toObjectId
- S_toString = 152, // toString
- S_type = 153, // type
- S_onErrorArg = 154, // onErrorArg
- S_onNullArg = 155, // onNullArg
- S_expressions = 156, // expressions
- S_values = 157, // values
- S_pipeline = 158, // pipeline
- S_START_ORDERED_OBJECT = 159, // START_ORDERED_OBJECT
- S_160_1 = 160 // $@1
+ S_ABS = 47, // ABS
+ S_CEIL = 48, // CEIL
+ S_DIVIDE = 49, // DIVIDE
+ S_EXPONENT = 50, // EXPONENT
+ S_FLOOR = 51, // FLOOR
+ S_LN = 52, // LN
+ S_LOG = 53, // LOG
+ S_LOGTEN = 54, // LOGTEN
+ S_MOD = 55, // MOD
+ S_MULTIPLY = 56, // MULTIPLY
+ S_POW = 57, // POW
+ S_ROUND = 58, // ROUND
+ S_SQRT = 59, // SQRT
+ S_SUBTRACT = 60, // SUBTRACT
+ S_TRUNC = 61, // TRUNC
+ S_INPUT_ARG = 62, // INPUT_ARG
+ S_TO_ARG = 63, // TO_ARG
+ S_ON_ERROR_ARG = 64, // ON_ERROR_ARG
+ S_ON_NULL_ARG = 65, // ON_NULL_ARG
+ S_FIELDNAME = 66, // FIELDNAME
+ S_STRING = 67, // STRING
+ S_BINARY = 68, // BINARY
+ S_UNDEFINED = 69, // UNDEFINED
+ S_OBJECT_ID = 70, // OBJECT_ID
+ S_DATE_LITERAL = 71, // DATE_LITERAL
+ S_JSNULL = 72, // JSNULL
+ S_REGEX = 73, // REGEX
+ S_DB_POINTER = 74, // DB_POINTER
+ S_JAVASCRIPT = 75, // JAVASCRIPT
+ S_SYMBOL = 76, // SYMBOL
+ S_JAVASCRIPT_W_SCOPE = 77, // JAVASCRIPT_W_SCOPE
+ S_INT_NON_ZERO = 78, // INT_NON_ZERO
+ S_TIMESTAMP = 79, // TIMESTAMP
+ S_LONG_NON_ZERO = 80, // LONG_NON_ZERO
+ S_DOUBLE_NON_ZERO = 81, // DOUBLE_NON_ZERO
+ S_DECIMAL_NON_ZERO = 82, // DECIMAL_NON_ZERO
+ S_MIN_KEY = 83, // MIN_KEY
+ S_MAX_KEY = 84, // MAX_KEY
+ S_YYACCEPT = 85, // $accept
+ S_projectionFieldname = 86, // projectionFieldname
+ S_expressionFieldname = 87, // expressionFieldname
+ S_stageAsUserFieldname = 88, // stageAsUserFieldname
+ S_argAsUserFieldname = 89, // argAsUserFieldname
+ S_aggExprAsUserFieldname = 90, // aggExprAsUserFieldname
+ S_invariableUserFieldname = 91, // invariableUserFieldname
+ S_idAsUserFieldname = 92, // idAsUserFieldname
+ S_valueFieldname = 93, // valueFieldname
+ S_projectField = 94, // projectField
+ S_expressionField = 95, // expressionField
+ S_valueField = 96, // valueField
+ S_dbPointer = 97, // dbPointer
+ S_javascript = 98, // javascript
+ S_symbol = 99, // symbol
+ S_javascriptWScope = 100, // javascriptWScope
+ S_int = 101, // int
+ S_timestamp = 102, // timestamp
+ S_long = 103, // long
+ S_double = 104, // double
+ S_decimal = 105, // decimal
+ S_minKey = 106, // minKey
+ S_maxKey = 107, // maxKey
+ S_value = 108, // value
+ S_string = 109, // string
+ S_binary = 110, // binary
+ S_undefined = 111, // undefined
+ S_objectId = 112, // objectId
+ S_bool = 113, // bool
+ S_date = 114, // date
+ S_null = 115, // null
+ S_regex = 116, // regex
+ S_simpleValue = 117, // simpleValue
+ S_compoundValue = 118, // compoundValue
+ S_valueArray = 119, // valueArray
+ S_valueObject = 120, // valueObject
+ S_valueFields = 121, // valueFields
+ S_stageList = 122, // stageList
+ S_stage = 123, // stage
+ S_inhibitOptimization = 124, // inhibitOptimization
+ S_unionWith = 125, // unionWith
+ S_skip = 126, // skip
+ S_limit = 127, // limit
+ S_project = 128, // project
+ S_sample = 129, // sample
+ S_projectFields = 130, // projectFields
+ S_projection = 131, // projection
+ S_num = 132, // num
+ S_expression = 133, // expression
+ S_compoundExpression = 134, // compoundExpression
+ S_exprFixedTwoArg = 135, // exprFixedTwoArg
+ S_expressionArray = 136, // expressionArray
+ S_expressionObject = 137, // expressionObject
+ S_expressionFields = 138, // expressionFields
+ S_maths = 139, // maths
+ S_add = 140, // add
+ S_atan2 = 141, // atan2
+ S_boolExps = 142, // boolExps
+ S_and = 143, // and
+ S_or = 144, // or
+ S_not = 145, // not
+ S_literalEscapes = 146, // literalEscapes
+ S_const = 147, // const
+ S_literal = 148, // literal
+ S_compExprs = 149, // compExprs
+ S_cmp = 150, // cmp
+ S_eq = 151, // eq
+ S_gt = 152, // gt
+ S_gte = 153, // gte
+ S_lt = 154, // lt
+ S_lte = 155, // lte
+ S_ne = 156, // ne
+ S_typeExpression = 157, // typeExpression
+ S_typeValue = 158, // typeValue
+ S_convert = 159, // convert
+ S_toBool = 160, // toBool
+ S_toDate = 161, // toDate
+ S_toDecimal = 162, // toDecimal
+ S_toDouble = 163, // toDouble
+ S_toInt = 164, // toInt
+ S_toLong = 165, // toLong
+ S_toObjectId = 166, // toObjectId
+ S_toString = 167, // toString
+ S_type = 168, // type
+ S_abs = 169, // abs
+ S_ceil = 170, // ceil
+ S_divide = 171, // divide
+ S_exponent = 172, // exponent
+ S_floor = 173, // floor
+ S_ln = 174, // ln
+ S_log = 175, // log
+ S_logten = 176, // logten
+ S_mod = 177, // mod
+ S_multiply = 178, // multiply
+ S_pow = 179, // pow
+ S_round = 180, // round
+ S_sqrt = 181, // sqrt
+ S_subtract = 182, // subtract
+ S_trunc = 183, // trunc
+ S_onErrorArg = 184, // onErrorArg
+ S_onNullArg = 185, // onNullArg
+ S_expressions = 186, // expressions
+ S_values = 187, // values
+ S_pipeline = 188, // pipeline
+ S_START_ORDERED_OBJECT = 189, // START_ORDERED_OBJECT
+ S_190_1 = 190 // $@1
};
};
@@ -830,175 +890,190 @@ public:
basic_symbol(basic_symbol&& that)
: Base(std::move(that)), value(), location(std::move(that.location)) {
switch (this->kind()) {
- case 53: // BINARY
+ case 68: // BINARY
value.move<BSONBinData>(std::move(that.value));
break;
- case 60: // JAVASCRIPT
+ case 75: // JAVASCRIPT
value.move<BSONCode>(std::move(that.value));
break;
- case 62: // JAVASCRIPT_W_SCOPE
+ case 77: // JAVASCRIPT_W_SCOPE
value.move<BSONCodeWScope>(std::move(that.value));
break;
- case 59: // DB_POINTER
+ case 74: // DB_POINTER
value.move<BSONDBRef>(std::move(that.value));
break;
- case 58: // REGEX
+ case 73: // REGEX
value.move<BSONRegEx>(std::move(that.value));
break;
- case 61: // SYMBOL
+ case 76: // SYMBOL
value.move<BSONSymbol>(std::move(that.value));
break;
- case 82: // dbPointer
- case 83: // javascript
- case 84: // symbol
- case 85: // javascriptWScope
- case 86: // int
- case 87: // timestamp
- case 88: // long
- case 89: // double
- case 90: // decimal
- case 91: // minKey
- case 92: // maxKey
- case 93: // value
- case 94: // string
- case 95: // binary
- case 96: // undefined
- case 97: // objectId
- case 98: // bool
- case 99: // date
- case 100: // null
- case 101: // regex
- case 102: // simpleValue
- case 103: // compoundValue
- case 104: // valueArray
- case 105: // valueObject
- case 106: // valueFields
- case 107: // stageList
- case 108: // stage
- case 109: // inhibitOptimization
- case 110: // unionWith
- case 111: // skip
- case 112: // limit
- case 113: // project
- case 114: // sample
- case 115: // projectFields
- case 116: // projection
- case 117: // num
- case 118: // expression
- case 119: // compoundExpression
- case 120: // exprFixedTwoArg
- case 121: // expressionArray
- case 122: // expressionObject
- case 123: // expressionFields
- case 124: // maths
- case 125: // add
- case 126: // atan2
- case 127: // boolExps
- case 128: // and
- case 129: // or
- case 130: // not
- case 131: // literalEscapes
- case 132: // const
- case 133: // literal
- case 134: // compExprs
- case 135: // cmp
- case 136: // eq
- case 137: // gt
- case 138: // gte
- case 139: // lt
- case 140: // lte
- case 141: // ne
- case 142: // typeExpression
- case 143: // typeValue
- case 144: // convert
- case 145: // toBool
- case 146: // toDate
- case 147: // toDecimal
- case 148: // toDouble
- case 149: // toInt
- case 150: // toLong
- case 151: // toObjectId
- case 152: // toString
- case 153: // type
+ case 97: // dbPointer
+ case 98: // javascript
+ case 99: // symbol
+ case 100: // javascriptWScope
+ case 101: // int
+ case 102: // timestamp
+ case 103: // long
+ case 104: // double
+ case 105: // decimal
+ case 106: // minKey
+ case 107: // maxKey
+ case 108: // value
+ case 109: // string
+ case 110: // binary
+ case 111: // undefined
+ case 112: // objectId
+ case 113: // bool
+ case 114: // date
+ case 115: // null
+ case 116: // regex
+ case 117: // simpleValue
+ case 118: // compoundValue
+ case 119: // valueArray
+ case 120: // valueObject
+ case 121: // valueFields
+ case 122: // stageList
+ case 123: // stage
+ case 124: // inhibitOptimization
+ case 125: // unionWith
+ case 126: // skip
+ case 127: // limit
+ case 128: // project
+ case 129: // sample
+ case 130: // projectFields
+ case 131: // projection
+ case 132: // num
+ case 133: // expression
+ case 134: // compoundExpression
+ case 135: // exprFixedTwoArg
+ case 136: // expressionArray
+ case 137: // expressionObject
+ case 138: // expressionFields
+ case 139: // maths
+ case 140: // add
+ case 141: // atan2
+ case 142: // boolExps
+ case 143: // and
+ case 144: // or
+ case 145: // not
+ case 146: // literalEscapes
+ case 147: // const
+ case 148: // literal
+ case 149: // compExprs
+ case 150: // cmp
+ case 151: // eq
+ case 152: // gt
+ case 153: // gte
+ case 154: // lt
+ case 155: // lte
+ case 156: // ne
+ case 157: // typeExpression
+ case 158: // typeValue
+ case 159: // convert
+ case 160: // toBool
+ case 161: // toDate
+ case 162: // toDecimal
+ case 163: // toDouble
+ case 164: // toInt
+ case 165: // toLong
+ case 166: // toObjectId
+ case 167: // toString
+ case 168: // type
+ case 169: // abs
+ case 170: // ceil
+ case 171: // divide
+ case 172: // exponent
+ case 173: // floor
+ case 174: // ln
+ case 175: // log
+ case 176: // logten
+ case 177: // mod
+ case 178: // multiply
+ case 179: // pow
+ case 180: // round
+ case 181: // sqrt
+ case 182: // subtract
+ case 183: // trunc
value.move<CNode>(std::move(that.value));
break;
- case 71: // projectionFieldname
- case 72: // expressionFieldname
- case 73: // stageAsUserFieldname
- case 74: // argAsUserFieldname
- case 75: // aggExprAsUserFieldname
- case 76: // invariableUserFieldname
- case 77: // idAsUserFieldname
- case 78: // valueFieldname
+ case 86: // projectionFieldname
+ case 87: // expressionFieldname
+ case 88: // stageAsUserFieldname
+ case 89: // argAsUserFieldname
+ case 90: // aggExprAsUserFieldname
+ case 91: // invariableUserFieldname
+ case 92: // idAsUserFieldname
+ case 93: // valueFieldname
value.move<CNode::Fieldname>(std::move(that.value));
break;
- case 56: // DATE_LITERAL
+ case 71: // DATE_LITERAL
value.move<Date_t>(std::move(that.value));
break;
- case 67: // DECIMAL_NON_ZERO
+ case 82: // DECIMAL_NON_ZERO
value.move<Decimal128>(std::move(that.value));
break;
- case 55: // OBJECT_ID
+ case 70: // OBJECT_ID
value.move<OID>(std::move(that.value));
break;
- case 64: // TIMESTAMP
+ case 79: // TIMESTAMP
value.move<Timestamp>(std::move(that.value));
break;
- case 69: // MAX_KEY
+ case 84: // MAX_KEY
value.move<UserMaxKey>(std::move(that.value));
break;
- case 68: // MIN_KEY
+ case 83: // MIN_KEY
value.move<UserMinKey>(std::move(that.value));
break;
- case 57: // JSNULL
+ case 72: // JSNULL
value.move<UserNull>(std::move(that.value));
break;
- case 54: // UNDEFINED
+ case 69: // UNDEFINED
value.move<UserUndefined>(std::move(that.value));
break;
- case 66: // DOUBLE_NON_ZERO
+ case 81: // DOUBLE_NON_ZERO
value.move<double>(std::move(that.value));
break;
- case 63: // INT_NON_ZERO
+ case 78: // INT_NON_ZERO
value.move<int>(std::move(that.value));
break;
- case 65: // LONG_NON_ZERO
+ case 80: // LONG_NON_ZERO
value.move<long long>(std::move(that.value));
break;
- case 79: // projectField
- case 80: // expressionField
- case 81: // valueField
- case 154: // onErrorArg
- case 155: // onNullArg
+ case 94: // projectField
+ case 95: // expressionField
+ case 96: // valueField
+ case 184: // onErrorArg
+ case 185: // onNullArg
value.move<std::pair<CNode::Fieldname, CNode>>(std::move(that.value));
break;
- case 51: // FIELDNAME
- case 52: // STRING
+ case 66: // FIELDNAME
+ case 67: // STRING
value.move<std::string>(std::move(that.value));
break;
- case 156: // expressions
- case 157: // values
+ case 186: // expressions
+ case 187: // values
value.move<std::vector<CNode>>(std::move(that.value));
break;
@@ -1197,175 +1272,190 @@ public:
// Value type destructor.
switch (yykind) {
- case 53: // BINARY
+ case 68: // BINARY
value.template destroy<BSONBinData>();
break;
- case 60: // JAVASCRIPT
+ case 75: // JAVASCRIPT
value.template destroy<BSONCode>();
break;
- case 62: // JAVASCRIPT_W_SCOPE
+ case 77: // JAVASCRIPT_W_SCOPE
value.template destroy<BSONCodeWScope>();
break;
- case 59: // DB_POINTER
+ case 74: // DB_POINTER
value.template destroy<BSONDBRef>();
break;
- case 58: // REGEX
+ case 73: // REGEX
value.template destroy<BSONRegEx>();
break;
- case 61: // SYMBOL
+ case 76: // SYMBOL
value.template destroy<BSONSymbol>();
break;
- case 82: // dbPointer
- case 83: // javascript
- case 84: // symbol
- case 85: // javascriptWScope
- case 86: // int
- case 87: // timestamp
- case 88: // long
- case 89: // double
- case 90: // decimal
- case 91: // minKey
- case 92: // maxKey
- case 93: // value
- case 94: // string
- case 95: // binary
- case 96: // undefined
- case 97: // objectId
- case 98: // bool
- case 99: // date
- case 100: // null
- case 101: // regex
- case 102: // simpleValue
- case 103: // compoundValue
- case 104: // valueArray
- case 105: // valueObject
- case 106: // valueFields
- case 107: // stageList
- case 108: // stage
- case 109: // inhibitOptimization
- case 110: // unionWith
- case 111: // skip
- case 112: // limit
- case 113: // project
- case 114: // sample
- case 115: // projectFields
- case 116: // projection
- case 117: // num
- case 118: // expression
- case 119: // compoundExpression
- case 120: // exprFixedTwoArg
- case 121: // expressionArray
- case 122: // expressionObject
- case 123: // expressionFields
- case 124: // maths
- case 125: // add
- case 126: // atan2
- case 127: // boolExps
- case 128: // and
- case 129: // or
- case 130: // not
- case 131: // literalEscapes
- case 132: // const
- case 133: // literal
- case 134: // compExprs
- case 135: // cmp
- case 136: // eq
- case 137: // gt
- case 138: // gte
- case 139: // lt
- case 140: // lte
- case 141: // ne
- case 142: // typeExpression
- case 143: // typeValue
- case 144: // convert
- case 145: // toBool
- case 146: // toDate
- case 147: // toDecimal
- case 148: // toDouble
- case 149: // toInt
- case 150: // toLong
- case 151: // toObjectId
- case 152: // toString
- case 153: // type
+ case 97: // dbPointer
+ case 98: // javascript
+ case 99: // symbol
+ case 100: // javascriptWScope
+ case 101: // int
+ case 102: // timestamp
+ case 103: // long
+ case 104: // double
+ case 105: // decimal
+ case 106: // minKey
+ case 107: // maxKey
+ case 108: // value
+ case 109: // string
+ case 110: // binary
+ case 111: // undefined
+ case 112: // objectId
+ case 113: // bool
+ case 114: // date
+ case 115: // null
+ case 116: // regex
+ case 117: // simpleValue
+ case 118: // compoundValue
+ case 119: // valueArray
+ case 120: // valueObject
+ case 121: // valueFields
+ case 122: // stageList
+ case 123: // stage
+ case 124: // inhibitOptimization
+ case 125: // unionWith
+ case 126: // skip
+ case 127: // limit
+ case 128: // project
+ case 129: // sample
+ case 130: // projectFields
+ case 131: // projection
+ case 132: // num
+ case 133: // expression
+ case 134: // compoundExpression
+ case 135: // exprFixedTwoArg
+ case 136: // expressionArray
+ case 137: // expressionObject
+ case 138: // expressionFields
+ case 139: // maths
+ case 140: // add
+ case 141: // atan2
+ case 142: // boolExps
+ case 143: // and
+ case 144: // or
+ case 145: // not
+ case 146: // literalEscapes
+ case 147: // const
+ case 148: // literal
+ case 149: // compExprs
+ case 150: // cmp
+ case 151: // eq
+ case 152: // gt
+ case 153: // gte
+ case 154: // lt
+ case 155: // lte
+ case 156: // ne
+ case 157: // typeExpression
+ case 158: // typeValue
+ case 159: // convert
+ case 160: // toBool
+ case 161: // toDate
+ case 162: // toDecimal
+ case 163: // toDouble
+ case 164: // toInt
+ case 165: // toLong
+ case 166: // toObjectId
+ case 167: // toString
+ case 168: // type
+ case 169: // abs
+ case 170: // ceil
+ case 171: // divide
+ case 172: // exponent
+ case 173: // floor
+ case 174: // ln
+ case 175: // log
+ case 176: // logten
+ case 177: // mod
+ case 178: // multiply
+ case 179: // pow
+ case 180: // round
+ case 181: // sqrt
+ case 182: // subtract
+ case 183: // trunc
value.template destroy<CNode>();
break;
- case 71: // projectionFieldname
- case 72: // expressionFieldname
- case 73: // stageAsUserFieldname
- case 74: // argAsUserFieldname
- case 75: // aggExprAsUserFieldname
- case 76: // invariableUserFieldname
- case 77: // idAsUserFieldname
- case 78: // valueFieldname
+ case 86: // projectionFieldname
+ case 87: // expressionFieldname
+ case 88: // stageAsUserFieldname
+ case 89: // argAsUserFieldname
+ case 90: // aggExprAsUserFieldname
+ case 91: // invariableUserFieldname
+ case 92: // idAsUserFieldname
+ case 93: // valueFieldname
value.template destroy<CNode::Fieldname>();
break;
- case 56: // DATE_LITERAL
+ case 71: // DATE_LITERAL
value.template destroy<Date_t>();
break;
- case 67: // DECIMAL_NON_ZERO
+ case 82: // DECIMAL_NON_ZERO
value.template destroy<Decimal128>();
break;
- case 55: // OBJECT_ID
+ case 70: // OBJECT_ID
value.template destroy<OID>();
break;
- case 64: // TIMESTAMP
+ case 79: // TIMESTAMP
value.template destroy<Timestamp>();
break;
- case 69: // MAX_KEY
+ case 84: // MAX_KEY
value.template destroy<UserMaxKey>();
break;
- case 68: // MIN_KEY
+ case 83: // MIN_KEY
value.template destroy<UserMinKey>();
break;
- case 57: // JSNULL
+ case 72: // JSNULL
value.template destroy<UserNull>();
break;
- case 54: // UNDEFINED
+ case 69: // UNDEFINED
value.template destroy<UserUndefined>();
break;
- case 66: // DOUBLE_NON_ZERO
+ case 81: // DOUBLE_NON_ZERO
value.template destroy<double>();
break;
- case 63: // INT_NON_ZERO
+ case 78: // INT_NON_ZERO
value.template destroy<int>();
break;
- case 65: // LONG_NON_ZERO
+ case 80: // LONG_NON_ZERO
value.template destroy<long long>();
break;
- case 79: // projectField
- case 80: // expressionField
- case 81: // valueField
- case 154: // onErrorArg
- case 155: // onNullArg
+ case 94: // projectField
+ case 95: // expressionField
+ case 96: // valueField
+ case 184: // onErrorArg
+ case 185: // onNullArg
value.template destroy<std::pair<CNode::Fieldname, CNode>>();
break;
- case 51: // FIELDNAME
- case 52: // STRING
+ case 66: // FIELDNAME
+ case 67: // STRING
value.template destroy<std::string>();
break;
- case 156: // expressions
- case 157: // values
+ case 186: // expressions
+ case 187: // values
value.template destroy<std::vector<CNode>>();
break;
@@ -1376,6 +1466,14 @@ public:
Base::clear();
}
+#if YYDEBUG || 0
+ /// The user-facing name of this symbol.
+ const char* name() const YY_NOEXCEPT {
+ return PipelineParserGen::symbol_name(this->kind());
+ }
+#endif // #if YYDEBUG || 0
+
+
/// Backward compatibility (Bison 3.6).
symbol_kind_type type_get() const YY_NOEXCEPT;
@@ -1466,7 +1564,12 @@ public:
tok == token::CONVERT || tok == token::TO_BOOL || tok == token::TO_DATE ||
tok == token::TO_DECIMAL || tok == token::TO_DOUBLE || tok == token::TO_INT ||
tok == token::TO_LONG || tok == token::TO_OBJECT_ID || tok == token::TO_STRING ||
- tok == token::TYPE || tok == token::INPUT_ARG || tok == token::TO_ARG ||
+ tok == token::TYPE || tok == token::ABS || tok == token::CEIL ||
+ tok == token::DIVIDE || tok == token::EXPONENT || tok == token::FLOOR ||
+ tok == token::LN || tok == token::LOG || tok == token::LOGTEN ||
+ tok == token::MOD || tok == token::MULTIPLY || tok == token::POW ||
+ tok == token::ROUND || tok == token::SQRT || tok == token::SUBTRACT ||
+ tok == token::TRUNC || tok == token::INPUT_ARG || tok == token::TO_ARG ||
tok == token::ON_ERROR_ARG || tok == token::ON_NULL_ARG);
}
#else
@@ -1488,7 +1591,12 @@ public:
tok == token::CONVERT || tok == token::TO_BOOL || tok == token::TO_DATE ||
tok == token::TO_DECIMAL || tok == token::TO_DOUBLE || tok == token::TO_INT ||
tok == token::TO_LONG || tok == token::TO_OBJECT_ID || tok == token::TO_STRING ||
- tok == token::TYPE || tok == token::INPUT_ARG || tok == token::TO_ARG ||
+ tok == token::TYPE || tok == token::ABS || tok == token::CEIL ||
+ tok == token::DIVIDE || tok == token::EXPONENT || tok == token::FLOOR ||
+ tok == token::LN || tok == token::LOG || tok == token::LOGTEN ||
+ tok == token::MOD || tok == token::MULTIPLY || tok == token::POW ||
+ tok == token::ROUND || tok == token::SQRT || tok == token::SUBTRACT ||
+ tok == token::TRUNC || tok == token::INPUT_ARG || tok == token::TO_ARG ||
tok == token::ON_ERROR_ARG || tok == token::ON_NULL_ARG);
}
#endif
@@ -1733,6 +1841,13 @@ public:
/// Report a syntax error.
void error(const syntax_error& err);
+#if YYDEBUG || 0
+ /// The user-facing name of the symbol whose (internal) number is
+ /// YYSYMBOL. No bounds checking.
+ static const char* symbol_name(symbol_kind_type yysymbol);
+#endif // #if YYDEBUG || 0
+
+
// Implementation of make_symbol for each symbol type.
#if 201103L <= YY_CPLUSPLUS
static symbol_type make_END_OF_FILE(location_type l) {
@@ -2158,6 +2273,141 @@ public:
}
#endif
#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_ABS(location_type l) {
+ return symbol_type(token::ABS, std::move(l));
+ }
+#else
+ static symbol_type make_ABS(const location_type& l) {
+ return symbol_type(token::ABS, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_CEIL(location_type l) {
+ return symbol_type(token::CEIL, std::move(l));
+ }
+#else
+ static symbol_type make_CEIL(const location_type& l) {
+ return symbol_type(token::CEIL, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_DIVIDE(location_type l) {
+ return symbol_type(token::DIVIDE, std::move(l));
+ }
+#else
+ static symbol_type make_DIVIDE(const location_type& l) {
+ return symbol_type(token::DIVIDE, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_EXPONENT(location_type l) {
+ return symbol_type(token::EXPONENT, std::move(l));
+ }
+#else
+ static symbol_type make_EXPONENT(const location_type& l) {
+ return symbol_type(token::EXPONENT, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_FLOOR(location_type l) {
+ return symbol_type(token::FLOOR, std::move(l));
+ }
+#else
+ static symbol_type make_FLOOR(const location_type& l) {
+ return symbol_type(token::FLOOR, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_LN(location_type l) {
+ return symbol_type(token::LN, std::move(l));
+ }
+#else
+ static symbol_type make_LN(const location_type& l) {
+ return symbol_type(token::LN, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_LOG(location_type l) {
+ return symbol_type(token::LOG, std::move(l));
+ }
+#else
+ static symbol_type make_LOG(const location_type& l) {
+ return symbol_type(token::LOG, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_LOGTEN(location_type l) {
+ return symbol_type(token::LOGTEN, std::move(l));
+ }
+#else
+ static symbol_type make_LOGTEN(const location_type& l) {
+ return symbol_type(token::LOGTEN, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_MOD(location_type l) {
+ return symbol_type(token::MOD, std::move(l));
+ }
+#else
+ static symbol_type make_MOD(const location_type& l) {
+ return symbol_type(token::MOD, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_MULTIPLY(location_type l) {
+ return symbol_type(token::MULTIPLY, std::move(l));
+ }
+#else
+ static symbol_type make_MULTIPLY(const location_type& l) {
+ return symbol_type(token::MULTIPLY, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_POW(location_type l) {
+ return symbol_type(token::POW, std::move(l));
+ }
+#else
+ static symbol_type make_POW(const location_type& l) {
+ return symbol_type(token::POW, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_ROUND(location_type l) {
+ return symbol_type(token::ROUND, std::move(l));
+ }
+#else
+ static symbol_type make_ROUND(const location_type& l) {
+ return symbol_type(token::ROUND, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_SQRT(location_type l) {
+ return symbol_type(token::SQRT, std::move(l));
+ }
+#else
+ static symbol_type make_SQRT(const location_type& l) {
+ return symbol_type(token::SQRT, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_SUBTRACT(location_type l) {
+ return symbol_type(token::SUBTRACT, std::move(l));
+ }
+#else
+ static symbol_type make_SUBTRACT(const location_type& l) {
+ return symbol_type(token::SUBTRACT, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_TRUNC(location_type l) {
+ return symbol_type(token::TRUNC, std::move(l));
+ }
+#else
+ static symbol_type make_TRUNC(const location_type& l) {
+ return symbol_type(token::TRUNC, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
static symbol_type make_INPUT_ARG(location_type l) {
return symbol_type(token::INPUT_ARG, std::move(l));
}
@@ -2400,10 +2650,6 @@ private:
static symbol_kind_type yytranslate_(int t);
#if YYDEBUG || 0
- /// The user-facing name of the symbol whose (internal) number is
- /// YYSYMBOL. No bounds checking.
- static const char* symbol_name(symbol_kind_type yysymbol);
-
/// For a symbol, its name in clear.
static const char* const yytname_[];
#endif // #if YYDEBUG || 0
@@ -2417,7 +2663,7 @@ private:
// YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
// Performed when YYTABLE does not specify something else to do. Zero
// means the default is an error.
- static const unsigned char yydefact_[];
+ static const short yydefact_[];
// YYPGOTO[NTERM-NUM].
static const short yypgoto_[];
@@ -2644,8 +2890,8 @@ private:
/// Constants.
enum {
- yylast_ = 420, ///< Last index in yytable_.
- yynnts_ = 91, ///< Number of nonterminal symbols.
+ yylast_ = 548, ///< Last index in yytable_.
+ yynnts_ = 106, ///< Number of nonterminal symbols.
yyfinal_ = 5 ///< Termination state number.
};
@@ -2664,175 +2910,190 @@ template <typename Base>
PipelineParserGen::basic_symbol<Base>::basic_symbol(const basic_symbol& that)
: Base(that), value(), location(that.location) {
switch (this->kind()) {
- case 53: // BINARY
+ case 68: // BINARY
value.copy<BSONBinData>(YY_MOVE(that.value));
break;
- case 60: // JAVASCRIPT
+ case 75: // JAVASCRIPT
value.copy<BSONCode>(YY_MOVE(that.value));
break;
- case 62: // JAVASCRIPT_W_SCOPE
+ case 77: // JAVASCRIPT_W_SCOPE
value.copy<BSONCodeWScope>(YY_MOVE(that.value));
break;
- case 59: // DB_POINTER
+ case 74: // DB_POINTER
value.copy<BSONDBRef>(YY_MOVE(that.value));
break;
- case 58: // REGEX
+ case 73: // REGEX
value.copy<BSONRegEx>(YY_MOVE(that.value));
break;
- case 61: // SYMBOL
+ case 76: // SYMBOL
value.copy<BSONSymbol>(YY_MOVE(that.value));
break;
- case 82: // dbPointer
- case 83: // javascript
- case 84: // symbol
- case 85: // javascriptWScope
- case 86: // int
- case 87: // timestamp
- case 88: // long
- case 89: // double
- case 90: // decimal
- case 91: // minKey
- case 92: // maxKey
- case 93: // value
- case 94: // string
- case 95: // binary
- case 96: // undefined
- case 97: // objectId
- case 98: // bool
- case 99: // date
- case 100: // null
- case 101: // regex
- case 102: // simpleValue
- case 103: // compoundValue
- case 104: // valueArray
- case 105: // valueObject
- case 106: // valueFields
- case 107: // stageList
- case 108: // stage
- case 109: // inhibitOptimization
- case 110: // unionWith
- case 111: // skip
- case 112: // limit
- case 113: // project
- case 114: // sample
- case 115: // projectFields
- case 116: // projection
- case 117: // num
- case 118: // expression
- case 119: // compoundExpression
- case 120: // exprFixedTwoArg
- case 121: // expressionArray
- case 122: // expressionObject
- case 123: // expressionFields
- case 124: // maths
- case 125: // add
- case 126: // atan2
- case 127: // boolExps
- case 128: // and
- case 129: // or
- case 130: // not
- case 131: // literalEscapes
- case 132: // const
- case 133: // literal
- case 134: // compExprs
- case 135: // cmp
- case 136: // eq
- case 137: // gt
- case 138: // gte
- case 139: // lt
- case 140: // lte
- case 141: // ne
- case 142: // typeExpression
- case 143: // typeValue
- case 144: // convert
- case 145: // toBool
- case 146: // toDate
- case 147: // toDecimal
- case 148: // toDouble
- case 149: // toInt
- case 150: // toLong
- case 151: // toObjectId
- case 152: // toString
- case 153: // type
+ case 97: // dbPointer
+ case 98: // javascript
+ case 99: // symbol
+ case 100: // javascriptWScope
+ case 101: // int
+ case 102: // timestamp
+ case 103: // long
+ case 104: // double
+ case 105: // decimal
+ case 106: // minKey
+ case 107: // maxKey
+ case 108: // value
+ case 109: // string
+ case 110: // binary
+ case 111: // undefined
+ case 112: // objectId
+ case 113: // bool
+ case 114: // date
+ case 115: // null
+ case 116: // regex
+ case 117: // simpleValue
+ case 118: // compoundValue
+ case 119: // valueArray
+ case 120: // valueObject
+ case 121: // valueFields
+ case 122: // stageList
+ case 123: // stage
+ case 124: // inhibitOptimization
+ case 125: // unionWith
+ case 126: // skip
+ case 127: // limit
+ case 128: // project
+ case 129: // sample
+ case 130: // projectFields
+ case 131: // projection
+ case 132: // num
+ case 133: // expression
+ case 134: // compoundExpression
+ case 135: // exprFixedTwoArg
+ case 136: // expressionArray
+ case 137: // expressionObject
+ case 138: // expressionFields
+ case 139: // maths
+ case 140: // add
+ case 141: // atan2
+ case 142: // boolExps
+ case 143: // and
+ case 144: // or
+ case 145: // not
+ case 146: // literalEscapes
+ case 147: // const
+ case 148: // literal
+ case 149: // compExprs
+ case 150: // cmp
+ case 151: // eq
+ case 152: // gt
+ case 153: // gte
+ case 154: // lt
+ case 155: // lte
+ case 156: // ne
+ case 157: // typeExpression
+ case 158: // typeValue
+ case 159: // convert
+ case 160: // toBool
+ case 161: // toDate
+ case 162: // toDecimal
+ case 163: // toDouble
+ case 164: // toInt
+ case 165: // toLong
+ case 166: // toObjectId
+ case 167: // toString
+ case 168: // type
+ case 169: // abs
+ case 170: // ceil
+ case 171: // divide
+ case 172: // exponent
+ case 173: // floor
+ case 174: // ln
+ case 175: // log
+ case 176: // logten
+ case 177: // mod
+ case 178: // multiply
+ case 179: // pow
+ case 180: // round
+ case 181: // sqrt
+ case 182: // subtract
+ case 183: // trunc
value.copy<CNode>(YY_MOVE(that.value));
break;
- case 71: // projectionFieldname
- case 72: // expressionFieldname
- case 73: // stageAsUserFieldname
- case 74: // argAsUserFieldname
- case 75: // aggExprAsUserFieldname
- case 76: // invariableUserFieldname
- case 77: // idAsUserFieldname
- case 78: // valueFieldname
+ case 86: // projectionFieldname
+ case 87: // expressionFieldname
+ case 88: // stageAsUserFieldname
+ case 89: // argAsUserFieldname
+ case 90: // aggExprAsUserFieldname
+ case 91: // invariableUserFieldname
+ case 92: // idAsUserFieldname
+ case 93: // valueFieldname
value.copy<CNode::Fieldname>(YY_MOVE(that.value));
break;
- case 56: // DATE_LITERAL
+ case 71: // DATE_LITERAL
value.copy<Date_t>(YY_MOVE(that.value));
break;
- case 67: // DECIMAL_NON_ZERO
+ case 82: // DECIMAL_NON_ZERO
value.copy<Decimal128>(YY_MOVE(that.value));
break;
- case 55: // OBJECT_ID
+ case 70: // OBJECT_ID
value.copy<OID>(YY_MOVE(that.value));
break;
- case 64: // TIMESTAMP
+ case 79: // TIMESTAMP
value.copy<Timestamp>(YY_MOVE(that.value));
break;
- case 69: // MAX_KEY
+ case 84: // MAX_KEY
value.copy<UserMaxKey>(YY_MOVE(that.value));
break;
- case 68: // MIN_KEY
+ case 83: // MIN_KEY
value.copy<UserMinKey>(YY_MOVE(that.value));
break;
- case 57: // JSNULL
+ case 72: // JSNULL
value.copy<UserNull>(YY_MOVE(that.value));
break;
- case 54: // UNDEFINED
+ case 69: // UNDEFINED
value.copy<UserUndefined>(YY_MOVE(that.value));
break;
- case 66: // DOUBLE_NON_ZERO
+ case 81: // DOUBLE_NON_ZERO
value.copy<double>(YY_MOVE(that.value));
break;
- case 63: // INT_NON_ZERO
+ case 78: // INT_NON_ZERO
value.copy<int>(YY_MOVE(that.value));
break;
- case 65: // LONG_NON_ZERO
+ case 80: // LONG_NON_ZERO
value.copy<long long>(YY_MOVE(that.value));
break;
- case 79: // projectField
- case 80: // expressionField
- case 81: // valueField
- case 154: // onErrorArg
- case 155: // onNullArg
+ case 94: // projectField
+ case 95: // expressionField
+ case 96: // valueField
+ case 184: // onErrorArg
+ case 185: // onNullArg
value.copy<std::pair<CNode::Fieldname, CNode>>(YY_MOVE(that.value));
break;
- case 51: // FIELDNAME
- case 52: // STRING
+ case 66: // FIELDNAME
+ case 67: // STRING
value.copy<std::string>(YY_MOVE(that.value));
break;
- case 156: // expressions
- case 157: // values
+ case 186: // expressions
+ case 187: // values
value.copy<std::vector<CNode>>(YY_MOVE(that.value));
break;
@@ -2857,175 +3118,190 @@ template <typename Base>
void PipelineParserGen::basic_symbol<Base>::move(basic_symbol& s) {
super_type::move(s);
switch (this->kind()) {
- case 53: // BINARY
+ case 68: // BINARY
value.move<BSONBinData>(YY_MOVE(s.value));
break;
- case 60: // JAVASCRIPT
+ case 75: // JAVASCRIPT
value.move<BSONCode>(YY_MOVE(s.value));
break;
- case 62: // JAVASCRIPT_W_SCOPE
+ case 77: // JAVASCRIPT_W_SCOPE
value.move<BSONCodeWScope>(YY_MOVE(s.value));
break;
- case 59: // DB_POINTER
+ case 74: // DB_POINTER
value.move<BSONDBRef>(YY_MOVE(s.value));
break;
- case 58: // REGEX
+ case 73: // REGEX
value.move<BSONRegEx>(YY_MOVE(s.value));
break;
- case 61: // SYMBOL
+ case 76: // SYMBOL
value.move<BSONSymbol>(YY_MOVE(s.value));
break;
- case 82: // dbPointer
- case 83: // javascript
- case 84: // symbol
- case 85: // javascriptWScope
- case 86: // int
- case 87: // timestamp
- case 88: // long
- case 89: // double
- case 90: // decimal
- case 91: // minKey
- case 92: // maxKey
- case 93: // value
- case 94: // string
- case 95: // binary
- case 96: // undefined
- case 97: // objectId
- case 98: // bool
- case 99: // date
- case 100: // null
- case 101: // regex
- case 102: // simpleValue
- case 103: // compoundValue
- case 104: // valueArray
- case 105: // valueObject
- case 106: // valueFields
- case 107: // stageList
- case 108: // stage
- case 109: // inhibitOptimization
- case 110: // unionWith
- case 111: // skip
- case 112: // limit
- case 113: // project
- case 114: // sample
- case 115: // projectFields
- case 116: // projection
- case 117: // num
- case 118: // expression
- case 119: // compoundExpression
- case 120: // exprFixedTwoArg
- case 121: // expressionArray
- case 122: // expressionObject
- case 123: // expressionFields
- case 124: // maths
- case 125: // add
- case 126: // atan2
- case 127: // boolExps
- case 128: // and
- case 129: // or
- case 130: // not
- case 131: // literalEscapes
- case 132: // const
- case 133: // literal
- case 134: // compExprs
- case 135: // cmp
- case 136: // eq
- case 137: // gt
- case 138: // gte
- case 139: // lt
- case 140: // lte
- case 141: // ne
- case 142: // typeExpression
- case 143: // typeValue
- case 144: // convert
- case 145: // toBool
- case 146: // toDate
- case 147: // toDecimal
- case 148: // toDouble
- case 149: // toInt
- case 150: // toLong
- case 151: // toObjectId
- case 152: // toString
- case 153: // type
+ case 97: // dbPointer
+ case 98: // javascript
+ case 99: // symbol
+ case 100: // javascriptWScope
+ case 101: // int
+ case 102: // timestamp
+ case 103: // long
+ case 104: // double
+ case 105: // decimal
+ case 106: // minKey
+ case 107: // maxKey
+ case 108: // value
+ case 109: // string
+ case 110: // binary
+ case 111: // undefined
+ case 112: // objectId
+ case 113: // bool
+ case 114: // date
+ case 115: // null
+ case 116: // regex
+ case 117: // simpleValue
+ case 118: // compoundValue
+ case 119: // valueArray
+ case 120: // valueObject
+ case 121: // valueFields
+ case 122: // stageList
+ case 123: // stage
+ case 124: // inhibitOptimization
+ case 125: // unionWith
+ case 126: // skip
+ case 127: // limit
+ case 128: // project
+ case 129: // sample
+ case 130: // projectFields
+ case 131: // projection
+ case 132: // num
+ case 133: // expression
+ case 134: // compoundExpression
+ case 135: // exprFixedTwoArg
+ case 136: // expressionArray
+ case 137: // expressionObject
+ case 138: // expressionFields
+ case 139: // maths
+ case 140: // add
+ case 141: // atan2
+ case 142: // boolExps
+ case 143: // and
+ case 144: // or
+ case 145: // not
+ case 146: // literalEscapes
+ case 147: // const
+ case 148: // literal
+ case 149: // compExprs
+ case 150: // cmp
+ case 151: // eq
+ case 152: // gt
+ case 153: // gte
+ case 154: // lt
+ case 155: // lte
+ case 156: // ne
+ case 157: // typeExpression
+ case 158: // typeValue
+ case 159: // convert
+ case 160: // toBool
+ case 161: // toDate
+ case 162: // toDecimal
+ case 163: // toDouble
+ case 164: // toInt
+ case 165: // toLong
+ case 166: // toObjectId
+ case 167: // toString
+ case 168: // type
+ case 169: // abs
+ case 170: // ceil
+ case 171: // divide
+ case 172: // exponent
+ case 173: // floor
+ case 174: // ln
+ case 175: // log
+ case 176: // logten
+ case 177: // mod
+ case 178: // multiply
+ case 179: // pow
+ case 180: // round
+ case 181: // sqrt
+ case 182: // subtract
+ case 183: // trunc
value.move<CNode>(YY_MOVE(s.value));
break;
- case 71: // projectionFieldname
- case 72: // expressionFieldname
- case 73: // stageAsUserFieldname
- case 74: // argAsUserFieldname
- case 75: // aggExprAsUserFieldname
- case 76: // invariableUserFieldname
- case 77: // idAsUserFieldname
- case 78: // valueFieldname
+ case 86: // projectionFieldname
+ case 87: // expressionFieldname
+ case 88: // stageAsUserFieldname
+ case 89: // argAsUserFieldname
+ case 90: // aggExprAsUserFieldname
+ case 91: // invariableUserFieldname
+ case 92: // idAsUserFieldname
+ case 93: // valueFieldname
value.move<CNode::Fieldname>(YY_MOVE(s.value));
break;
- case 56: // DATE_LITERAL
+ case 71: // DATE_LITERAL
value.move<Date_t>(YY_MOVE(s.value));
break;
- case 67: // DECIMAL_NON_ZERO
+ case 82: // DECIMAL_NON_ZERO
value.move<Decimal128>(YY_MOVE(s.value));
break;
- case 55: // OBJECT_ID
+ case 70: // OBJECT_ID
value.move<OID>(YY_MOVE(s.value));
break;
- case 64: // TIMESTAMP
+ case 79: // TIMESTAMP
value.move<Timestamp>(YY_MOVE(s.value));
break;
- case 69: // MAX_KEY
+ case 84: // MAX_KEY
value.move<UserMaxKey>(YY_MOVE(s.value));
break;
- case 68: // MIN_KEY
+ case 83: // MIN_KEY
value.move<UserMinKey>(YY_MOVE(s.value));
break;
- case 57: // JSNULL
+ case 72: // JSNULL
value.move<UserNull>(YY_MOVE(s.value));
break;
- case 54: // UNDEFINED
+ case 69: // UNDEFINED
value.move<UserUndefined>(YY_MOVE(s.value));
break;
- case 66: // DOUBLE_NON_ZERO
+ case 81: // DOUBLE_NON_ZERO
value.move<double>(YY_MOVE(s.value));
break;
- case 63: // INT_NON_ZERO
+ case 78: // INT_NON_ZERO
value.move<int>(YY_MOVE(s.value));
break;
- case 65: // LONG_NON_ZERO
+ case 80: // LONG_NON_ZERO
value.move<long long>(YY_MOVE(s.value));
break;
- case 79: // projectField
- case 80: // expressionField
- case 81: // valueField
- case 154: // onErrorArg
- case 155: // onNullArg
+ case 94: // projectField
+ case 95: // expressionField
+ case 96: // valueField
+ case 184: // onErrorArg
+ case 185: // onNullArg
value.move<std::pair<CNode::Fieldname, CNode>>(YY_MOVE(s.value));
break;
- case 51: // FIELDNAME
- case 52: // STRING
+ case 66: // FIELDNAME
+ case 67: // STRING
value.move<std::string>(YY_MOVE(s.value));
break;
- case 156: // expressions
- case 157: // values
+ case 186: // expressions
+ case 187: // values
value.move<std::vector<CNode>>(YY_MOVE(s.value));
break;
@@ -3067,9 +3343,9 @@ inline PipelineParserGen::symbol_kind_type PipelineParserGen::by_kind::type_get(
return this->kind();
}
-#line 58 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 58 "pipeline_grammar.yy"
} // namespace mongo
-#line 3763 "src/mongo/db/cst/pipeline_parser_gen.hpp"
+#line 4121 "pipeline_parser_gen.hpp"
-#endif // !YY_YY_SRC_MONGO_DB_CST_PIPELINE_PARSER_GEN_HPP_INCLUDED
+#endif // !YY_YY_PIPELINE_PARSER_GEN_HPP_INCLUDED
diff --git a/src/mongo/db/pipeline/expression.h b/src/mongo/db/pipeline/expression.h
index 32b47f4562a..4d34994f6b5 100644
--- a/src/mongo/db/pipeline/expression.h
+++ b/src/mongo/db/pipeline/expression.h
@@ -370,6 +370,8 @@ class ExpressionRangedArity : public ExpressionNaryBase<SubClass> {
public:
explicit ExpressionRangedArity(ExpressionContext* const expCtx)
: ExpressionNaryBase<SubClass>(expCtx) {}
+ ExpressionRangedArity(ExpressionContext* const expCtx, Expression::ExpressionVector&& children)
+ : ExpressionNaryBase<SubClass>(expCtx, std::move(children)) {}
void validateArguments(const Expression::ExpressionVector& args) const override {
uassert(28667,
@@ -461,6 +463,9 @@ class ExpressionSingleNumericArg : public ExpressionFixedArity<SubClass, 1> {
public:
explicit ExpressionSingleNumericArg(ExpressionContext* const expCtx)
: ExpressionFixedArity<SubClass, 1>(expCtx) {}
+ explicit ExpressionSingleNumericArg(ExpressionContext* const expCtx,
+ Expression::ExpressionVector&& children)
+ : ExpressionFixedArity<SubClass, 1>(expCtx, std::move(children)) {}
virtual ~ExpressionSingleNumericArg() = default;
@@ -743,6 +748,8 @@ class ExpressionAbs final : public ExpressionSingleNumericArg<ExpressionAbs> {
public:
explicit ExpressionAbs(ExpressionContext* const expCtx)
: ExpressionSingleNumericArg<ExpressionAbs>(expCtx) {}
+ explicit ExpressionAbs(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionSingleNumericArg<ExpressionAbs>(expCtx, std::move(children)) {}
Value evaluateNumericArg(const Value& numericArg) const final;
const char* getOpName() const final;
@@ -943,6 +950,8 @@ class ExpressionCeil final : public ExpressionSingleNumericArg<ExpressionCeil> {
public:
explicit ExpressionCeil(ExpressionContext* const expCtx)
: ExpressionSingleNumericArg<ExpressionCeil>(expCtx) {}
+ explicit ExpressionCeil(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionSingleNumericArg<ExpressionCeil>(expCtx, std::move(children)) {}
Value evaluateNumericArg(const Value& numericArg) const final;
const char* getOpName() const final;
@@ -1314,6 +1323,8 @@ class ExpressionDivide final : public ExpressionFixedArity<ExpressionDivide, 2>
public:
explicit ExpressionDivide(ExpressionContext* const expCtx)
: ExpressionFixedArity<ExpressionDivide, 2>(expCtx) {}
+ explicit ExpressionDivide(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionFixedArity<ExpressionDivide, 2>(expCtx, std::move(children)) {}
Value evaluate(const Document& root, Variables* variables) const final;
const char* getOpName() const final;
@@ -1328,6 +1339,8 @@ class ExpressionExp final : public ExpressionSingleNumericArg<ExpressionExp> {
public:
explicit ExpressionExp(ExpressionContext* const expCtx)
: ExpressionSingleNumericArg<ExpressionExp>(expCtx) {}
+ explicit ExpressionExp(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionSingleNumericArg<ExpressionExp>(expCtx, std::move(children)) {}
Value evaluateNumericArg(const Value& numericArg) const final;
const char* getOpName() const final;
@@ -1464,6 +1477,8 @@ class ExpressionFloor final : public ExpressionSingleNumericArg<ExpressionFloor>
public:
explicit ExpressionFloor(ExpressionContext* const expCtx)
: ExpressionSingleNumericArg<ExpressionFloor>(expCtx) {}
+ explicit ExpressionFloor(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionSingleNumericArg<ExpressionFloor>(expCtx, std::move(children)) {}
Value evaluateNumericArg(const Value& numericArg) const final;
const char* getOpName() const final;
@@ -1643,6 +1658,8 @@ class ExpressionLn final : public ExpressionSingleNumericArg<ExpressionLn> {
public:
explicit ExpressionLn(ExpressionContext* const expCtx)
: ExpressionSingleNumericArg<ExpressionLn>(expCtx) {}
+ explicit ExpressionLn(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionSingleNumericArg<ExpressionLn>(expCtx, std::move(children)) {}
Value evaluateNumericArg(const Value& numericArg) const final;
const char* getOpName() const final;
@@ -1656,6 +1673,8 @@ class ExpressionLog final : public ExpressionFixedArity<ExpressionLog, 2> {
public:
explicit ExpressionLog(ExpressionContext* const expCtx)
: ExpressionFixedArity<ExpressionLog, 2>(expCtx) {}
+ explicit ExpressionLog(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionFixedArity<ExpressionLog, 2>(expCtx, std::move(children)) {}
Value evaluate(const Document& root, Variables* variables) const final;
const char* getOpName() const final;
@@ -1669,6 +1688,8 @@ class ExpressionLog10 final : public ExpressionSingleNumericArg<ExpressionLog10>
public:
explicit ExpressionLog10(ExpressionContext* const expCtx)
: ExpressionSingleNumericArg<ExpressionLog10>(expCtx) {}
+ explicit ExpressionLog10(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionSingleNumericArg<ExpressionLog10>(expCtx, std::move(children)) {}
Value evaluateNumericArg(const Value& numericArg) const final;
const char* getOpName() const final;
@@ -1778,6 +1799,8 @@ class ExpressionMod final : public ExpressionFixedArity<ExpressionMod, 2> {
public:
explicit ExpressionMod(ExpressionContext* const expCtx)
: ExpressionFixedArity<ExpressionMod, 2>(expCtx) {}
+ explicit ExpressionMod(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionFixedArity<ExpressionMod, 2>(expCtx, std::move(children)) {}
Value evaluate(const Document& root, Variables* variables) const final;
const char* getOpName() const final;
@@ -1792,6 +1815,8 @@ class ExpressionMultiply final : public ExpressionVariadic<ExpressionMultiply> {
public:
explicit ExpressionMultiply(ExpressionContext* const expCtx)
: ExpressionVariadic<ExpressionMultiply>(expCtx) {}
+ explicit ExpressionMultiply(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionVariadic<ExpressionMultiply>(expCtx, std::move(children)) {}
Value evaluate(const Document& root, Variables* variables) const final;
const char* getOpName() const final;
@@ -1929,6 +1954,8 @@ class ExpressionPow final : public ExpressionFixedArity<ExpressionPow, 2> {
public:
explicit ExpressionPow(ExpressionContext* const expCtx)
: ExpressionFixedArity<ExpressionPow, 2>(expCtx) {}
+ explicit ExpressionPow(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionFixedArity<ExpressionPow, 2>(expCtx, std::move(children)) {}
static boost::intrusive_ptr<Expression> create(ExpressionContext* const expCtx,
Value base,
@@ -2237,6 +2264,8 @@ class ExpressionRound final : public ExpressionRangedArity<ExpressionRound, 1, 2
public:
explicit ExpressionRound(ExpressionContext* const expCtx)
: ExpressionRangedArity<ExpressionRound, 1, 2>(expCtx) {}
+ explicit ExpressionRound(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionRangedArity<ExpressionRound, 1, 2>(expCtx, std::move(children)) {}
Value evaluate(const Document& root, Variables* variables) const final;
const char* getOpName() const final;
@@ -2264,6 +2293,8 @@ class ExpressionSqrt final : public ExpressionSingleNumericArg<ExpressionSqrt> {
public:
explicit ExpressionSqrt(ExpressionContext* const expCtx)
: ExpressionSingleNumericArg<ExpressionSqrt>(expCtx) {}
+ explicit ExpressionSqrt(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionSingleNumericArg<ExpressionSqrt>(expCtx, std::move(children)) {}
Value evaluateNumericArg(const Value& numericArg) const final;
const char* getOpName() const final;
@@ -2362,6 +2393,8 @@ class ExpressionSubtract final : public ExpressionFixedArity<ExpressionSubtract,
public:
explicit ExpressionSubtract(ExpressionContext* const expCtx)
: ExpressionFixedArity<ExpressionSubtract, 2>(expCtx) {}
+ explicit ExpressionSubtract(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionFixedArity<ExpressionSubtract, 2>(expCtx, std::move(children)) {}
Value evaluate(const Document& root, Variables* variables) const final;
const char* getOpName() const final;
@@ -2507,6 +2540,8 @@ class ExpressionTrunc final : public ExpressionRangedArity<ExpressionTrunc, 1, 2
public:
explicit ExpressionTrunc(ExpressionContext* const expCtx)
: ExpressionRangedArity<ExpressionTrunc, 1, 2>(expCtx) {}
+ explicit ExpressionTrunc(ExpressionContext* const expCtx, ExpressionVector&& children)
+ : ExpressionRangedArity<ExpressionTrunc, 1, 2>(expCtx, std::move(children)) {}
static boost::intrusive_ptr<Expression> parse(ExpressionContext* const expCtx,
BSONElement elem,