summaryrefslogtreecommitdiff
path: root/src/mongo/db/cst
diff options
context:
space:
mode:
authorNick Zolnierz <nicholas.zolnierz@mongodb.com>2020-07-23 13:11:25 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-07-29 19:31:31 +0000
commit1dfde3f7a6ada7440c90301843e8b60335fb800c (patch)
tree148d0979e6081fd427366ff186db15c57e5058a5 /src/mongo/db/cst
parent58283ca178782c4d1c4a4d2acd4313f6f6f86fd5 (diff)
downloadmongo-1dfde3f7a6ada7440c90301843e8b60335fb800c.tar.gz
SERVER-48848 Add support for $sample aggregation stage in grammar and CST
Diffstat (limited to 'src/mongo/db/cst')
-rw-r--r--src/mongo/db/cst/bson_lexer.cpp8
-rw-r--r--src/mongo/db/cst/cst_pipeline_translation.cpp10
-rw-r--r--src/mongo/db/cst/cst_pipeline_translation_test.cpp72
-rw-r--r--src/mongo/db/cst/cst_test.cpp79
-rw-r--r--src/mongo/db/cst/key_fieldname.h2
-rw-r--r--src/mongo/db/cst/pipeline_grammar.yy55
-rw-r--r--src/mongo/db/cst/pipeline_parser_gen.cpp2247
-rw-r--r--src/mongo/db/cst/pipeline_parser_gen.hpp983
8 files changed, 1861 insertions, 1595 deletions
diff --git a/src/mongo/db/cst/bson_lexer.cpp b/src/mongo/db/cst/bson_lexer.cpp
index 5dda8edc643..3bf0c3a47c5 100644
--- a/src/mongo/db/cst/bson_lexer.cpp
+++ b/src/mongo/db/cst/bson_lexer.cpp
@@ -41,13 +41,17 @@ namespace {
// to be a user field name and is treated as a terminal by the parser.
const StringMap<PipelineParserGen::token_type> reservedKeyLookup = {
{"_id", PipelineParserGen::token::ID},
+ // Stages and their arguments.
{"$_internalInhibitOptimization", PipelineParserGen::token::STAGE_INHIBIT_OPTIMIZATION},
- {"$unionWith", PipelineParserGen::token::STAGE_UNION_WITH},
+ {"$limit", PipelineParserGen::token::STAGE_LIMIT},
{"$project", PipelineParserGen::token::STAGE_PROJECT},
+ {"$sample", PipelineParserGen::token::STAGE_SAMPLE},
+ {"size", PipelineParserGen::token::SIZE_ARG},
{"$skip", PipelineParserGen::token::STAGE_SKIP},
- {"$limit", PipelineParserGen::token::STAGE_LIMIT},
+ {"$unionWith", PipelineParserGen::token::STAGE_UNION_WITH},
{"coll", PipelineParserGen::token::COLL_ARG},
{"pipeline", PipelineParserGen::token::PIPELINE_ARG},
+ // Expressions
{"$add", PipelineParserGen::token::ADD},
{"$atan2", PipelineParserGen::token::ATAN2},
{"$and", PipelineParserGen::token::AND},
diff --git a/src/mongo/db/cst/cst_pipeline_translation.cpp b/src/mongo/db/cst/cst_pipeline_translation.cpp
index e7df23e2af0..17c07d2be75 100644
--- a/src/mongo/db/cst/cst_pipeline_translation.cpp
+++ b/src/mongo/db/cst/cst_pipeline_translation.cpp
@@ -45,6 +45,7 @@
#include "mongo/db/pipeline/document_source.h"
#include "mongo/db/pipeline/document_source_limit.h"
#include "mongo/db/pipeline/document_source_project.h"
+#include "mongo/db/pipeline/document_source_sample.h"
#include "mongo/db/pipeline/document_source_skip.h"
#include "mongo/db/pipeline/expression.h"
#include "mongo/db/pipeline/expression_context.h"
@@ -341,6 +342,13 @@ auto translateLimit(const CNode& cst, const boost::intrusive_ptr<ExpressionConte
}
/**
+ * Unwrap a sample stage CNode and produce a DocumentSourceSample.
+ */
+auto translateSample(const CNode& cst, const boost::intrusive_ptr<ExpressionContext>& expCtx) {
+ return DocumentSourceSample::create(expCtx, translateNumToLong(cst.objectChildren()[0].second));
+}
+
+/**
* Walk an aggregation pipeline stage object CNode and produce a DocumentSource.
*/
boost::intrusive_ptr<DocumentSource> translateSource(
@@ -352,6 +360,8 @@ boost::intrusive_ptr<DocumentSource> translateSource(
return translateSkip(cst.objectChildren()[0].second, expCtx);
case KeyFieldname::limit:
return translateLimit(cst.objectChildren()[0].second, expCtx);
+ case KeyFieldname::sample:
+ return translateSample(cst.objectChildren()[0].second, expCtx);
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 bd182725d20..f223425f9f9 100644
--- a/src/mongo/db/cst/cst_pipeline_translation_test.cpp
+++ b/src/mongo/db/cst/cst_pipeline_translation_test.cpp
@@ -41,6 +41,7 @@
#include "mongo/db/exec/document_value/document.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/pipeline/document_source_limit.h"
+#include "mongo/db/pipeline/document_source_sample.h"
#include "mongo/db/pipeline/document_source_single_document_transformation.h"
#include "mongo/db/pipeline/document_source_skip.h"
#include "mongo/db/pipeline/expression_context_for_test.h"
@@ -446,15 +447,22 @@ TEST(CstPipelineTranslationTest, TranslatesSkipWithLong) {
ASSERT_EQ((dynamic_cast<DocumentSourceSkip&>(**iter).getSkip()), 8223372036854775807);
}
+TEST(CstPipelineTranslationTest, FailsToTranslateSkipWithNegativeValue) {
+ const auto cst = CNode{CNode::ArrayChildren{
+ CNode{CNode::ObjectChildren{{KeyFieldname::skip, CNode{UserInt{-1}}}}}}};
+ ASSERT_THROWS_CODE(
+ cst_pipeline_translation::translatePipeline(cst, getExpCtx()), DBException, 15956);
+}
+
TEST(CstPipelineTranslationTest, TranslatesLimitWithInt) {
const auto cst = CNode{CNode::ArrayChildren{
- CNode{CNode::ObjectChildren{{KeyFieldname::limit, CNode{UserInt{10}}}}}}};
+ CNode{CNode::ObjectChildren{{KeyFieldname::skip, CNode{UserInt{0}}}}}}};
auto pipeline = cst_pipeline_translation::translatePipeline(cst, getExpCtx());
auto& sources = pipeline->getSources();
ASSERT_EQ(1u, sources.size());
auto iter = sources.begin();
- ASSERT(typeid(DocumentSourceLimit) == typeid(**iter));
- ASSERT_EQ(10ll, dynamic_cast<DocumentSourceLimit&>(**iter).getLimit());
+ ASSERT(typeid(DocumentSourceSkip) == typeid(**iter));
+ ASSERT_EQ(0ll, dynamic_cast<DocumentSourceSkip&>(**iter).getSkip());
}
TEST(CstPipelineTranslationTest, TranslatesLimitWithDouble) {
@@ -479,6 +487,64 @@ TEST(CstPipelineTranslationTest, TranslatesLimitWithLong) {
ASSERT_EQ(123123123123, dynamic_cast<DocumentSourceLimit&>(**iter).getLimit());
}
+TEST(CstPipelineTranslationTest, FailsToTranslateLimitWithZeroKey) {
+ const auto cst = CNode{CNode::ArrayChildren{
+ CNode{CNode::ObjectChildren{{KeyFieldname::limit, CNode{UserInt{0}}}}}}};
+ ASSERT_THROWS_CODE(
+ cst_pipeline_translation::translatePipeline(cst, getExpCtx()), DBException, 15958);
+}
+
+TEST(CstPipelineTranslationTest, FailsToTranslateLimitWithNegativeValue) {
+ const auto cst = CNode{CNode::ArrayChildren{
+ CNode{CNode::ObjectChildren{{KeyFieldname::limit, CNode{UserInt{-1}}}}}}};
+ ASSERT_THROWS_CODE(
+ cst_pipeline_translation::translatePipeline(cst, getExpCtx()), DBException, 15958);
+}
+
+TEST(CstPipelineTranslationTest, TranslatesSampleWithValidSize) {
+ {
+ const auto cst = CNode{CNode::ArrayChildren{CNode{CNode::ObjectChildren{
+ {KeyFieldname::sample,
+ CNode{CNode::ObjectChildren{{KeyFieldname::sizeArg, CNode{UserLong{5}}}}}}}}}};
+ auto pipeline = cst_pipeline_translation::translatePipeline(cst, getExpCtx());
+ auto& sources = pipeline->getSources();
+ ASSERT_EQ(1u, sources.size());
+ auto iter = sources.begin();
+ ASSERT(typeid(DocumentSourceSample) == typeid(**iter));
+ ASSERT_EQ(5ll, dynamic_cast<DocumentSourceSample&>(**iter).getSampleSize());
+ }
+ {
+ const auto cst = CNode{CNode::ArrayChildren{CNode{CNode::ObjectChildren{
+ {KeyFieldname::sample,
+ CNode{CNode::ObjectChildren{{KeyFieldname::sizeArg, CNode{UserDouble{5.8}}}}}}}}}};
+ auto pipeline = cst_pipeline_translation::translatePipeline(cst, getExpCtx());
+ auto& sources = pipeline->getSources();
+ ASSERT_EQ(1u, sources.size());
+ auto iter = sources.begin();
+ ASSERT(typeid(DocumentSourceSample) == typeid(**iter));
+ ASSERT_EQ(5ll, dynamic_cast<DocumentSourceSample&>(**iter).getSampleSize());
+ }
+ {
+ const auto cst = CNode{CNode::ArrayChildren{CNode{CNode::ObjectChildren{
+ {KeyFieldname::sample,
+ CNode{CNode::ObjectChildren{{KeyFieldname::sizeArg, CNode{UserLong{0}}}}}}}}}};
+ auto pipeline = cst_pipeline_translation::translatePipeline(cst, getExpCtx());
+ auto& sources = pipeline->getSources();
+ ASSERT_EQ(1u, sources.size());
+ auto iter = sources.begin();
+ ASSERT(typeid(DocumentSourceSample) == typeid(**iter));
+ ASSERT_EQ(0ll, dynamic_cast<DocumentSourceSample&>(**iter).getSampleSize());
+ }
+}
+
+TEST(CstPipelineTranslationTest, FailsToTranslateSampleWithNegativeSize) {
+ const auto cst = CNode{CNode::ArrayChildren{CNode{CNode::ObjectChildren{
+ {KeyFieldname::sample,
+ CNode{CNode::ObjectChildren{{KeyFieldname::sizeArg, CNode{UserInt{-1}}}}}}}}}};
+ ASSERT_THROWS_CODE(
+ cst_pipeline_translation::translatePipeline(cst, getExpCtx()), DBException, 28747);
+}
+
TEST(CstPipelineTranslationTest, TranslatesCmpExpression) {
const auto cst = CNode{CNode::ObjectChildren{
{KeyFieldname::cmp,
diff --git a/src/mongo/db/cst/cst_test.cpp b/src/mongo/db/cst/cst_test.cpp
index 5d20e7fdb79..4a570d0a575 100644
--- a/src/mongo/db/cst/cst_test.cpp
+++ b/src/mongo/db/cst/cst_test.cpp
@@ -402,5 +402,84 @@ TEST(CstTest, BuildsAndPrintsNot) {
}
}
+TEST(CstGrammarTest, ParsesSampleWithNumericSizeArgument) {
+ {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$sample: {size: NumberInt(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_EQ(stages[0].toBson().toString(), "{ sample: { sizeArg: \"<UserInt 1>\" } }");
+ }
+ {
+ // Although negative numbers are not valid, this is enforced at translation time.
+ CNode output;
+ auto input = fromjson("{pipeline: [{$sample: {size: NumberInt(-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_EQ(stages[0].toBson().toString(), "{ sample: { sizeArg: \"<UserInt -1>\" } }");
+ }
+ {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$sample: {size: NumberLong(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_EQ(stages[0].toBson().toString(), "{ sample: { sizeArg: \"<UserLong 5>\" } }");
+ }
+ {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$sample: {size: 10.0}}]}");
+ 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_EQ(stages[0].toBson().toString(),
+ "{ sample: { sizeArg: \"<UserDouble 10.000000>\" } }");
+ }
+ {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$sample: {size: 0}}]}");
+ 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_EQ(stages[0].toBson().toString(), "{ sample: { sizeArg: \"<UserInt 0>\" } }");
+ }
+}
+
+TEST(CstGrammarTest, InvalidParseSample) {
+ {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$sample: 2}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_THROWS_CODE(parseTree.parse(), AssertionException, ErrorCodes::FailedToParse);
+ }
+ {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$sample: {notSize: 2}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_THROWS_CODE(parseTree.parse(), AssertionException, ErrorCodes::FailedToParse);
+ }
+ {
+ CNode output;
+ auto input = fromjson("{pipeline: [{$sample: {size: 'gots ta be a number'}}]}");
+ BSONLexer lexer(input["pipeline"].Array());
+ auto parseTree = PipelineParserGen(lexer, &output);
+ ASSERT_THROWS_CODE(parseTree.parse(), AssertionException, ErrorCodes::FailedToParse);
+ }
+}
+
} // namespace
} // namespace mongo
diff --git a/src/mongo/db/cst/key_fieldname.h b/src/mongo/db/cst/key_fieldname.h
index 999c7cd0db2..4627bb3c5d7 100644
--- a/src/mongo/db/cst/key_fieldname.h
+++ b/src/mongo/db/cst/key_fieldname.h
@@ -52,6 +52,8 @@
ENUMIFY(unionWith) \
ENUMIFY(collArg) \
ENUMIFY(pipelineArg) \
+ ENUMIFY(sample) \
+ ENUMIFY(sizeArg) \
ENUMIFY(skip) \
ENUMIFY(limit) \
ENUMIFY(constExpr) \
diff --git a/src/mongo/db/cst/pipeline_grammar.yy b/src/mongo/db/cst/pipeline_grammar.yy
index 76168169f33..9cfac8ec0e1 100644
--- a/src/mongo/db/cst/pipeline_grammar.yy
+++ b/src/mongo/db/cst/pipeline_grammar.yy
@@ -124,15 +124,19 @@
// Reserve pipeline stage names.
STAGE_INHIBIT_OPTIMIZATION
- STAGE_UNION_WITH
- STAGE_SKIP
STAGE_LIMIT
STAGE_PROJECT
+ STAGE_SAMPLE
+ STAGE_SKIP
+ STAGE_UNION_WITH
// $unionWith arguments.
COLL_ARG
PIPELINE_ARG
+ // $sample arguments.
+ SIZE_ARG
+
// Expressions
ADD
ATAN2
@@ -175,17 +179,26 @@
//
// Semantic values (aka the C++ types produced by the actions).
//
-%nterm <CNode> stageList stage inhibitOptimization unionWith num skip limit project projectFields
-%nterm <CNode> projection compoundExpression expressionArray expressionObject expressionFields exprFixedTwoArg
-%nterm <CNode> expression maths add atan2 string binary undefined objectId bool date null regex
-%nterm <CNode> dbPointer javascript symbol javascriptWScope int timestamp long double decimal minKey
-%nterm <CNode> maxKey simpleValue boolExps and or not literalEscapes const literal value
-%nterm <CNode> compoundValue valueArray valueObject valueFields
-%nterm <CNode> compExprs cmp eq gt gte lt lte ne
+
+// Possible user fieldnames.
%nterm <CNode::Fieldname> projectionFieldname expressionFieldname stageAsUserFieldname
%nterm <CNode::Fieldname> argAsUserFieldname aggExprAsUserFieldname invariableUserFieldname
%nterm <CNode::Fieldname> idAsUserFieldname valueFieldname
%nterm <std::pair<CNode::Fieldname, CNode>> projectField expressionField valueField
+
+// Literals.
+%nterm <CNode> dbPointer javascript symbol javascriptWScope int timestamp long double decimal
+%nterm <CNode> minKey maxKey value string binary undefined objectId bool date null regex
+%nterm <CNode> simpleValue compoundValue valueArray valueObject valueFields
+
+// Pipeline stages and related non-terminals.
+%nterm <CNode> stageList stage inhibitOptimization unionWith skip limit project sample
+%nterm <CNode> projectFields projection num
+
+// Aggregate expressions
+%nterm <CNode> expression compoundExpression exprFixedTwoArg expressionArray expressionObject
+%nterm <CNode> expressionFields maths add atan2 boolExps and or not literalEscapes const literal
+%nterm <CNode> compExprs cmp eq gt gte lt lte ne
%nterm <std::vector<CNode>> expressions values
//
@@ -213,7 +226,16 @@ stageList:
START_ORDERED_OBJECT: { lexer.sortObjTokens(); } START_OBJECT;
stage:
- inhibitOptimization | unionWith | skip | limit | project
+ inhibitOptimization | unionWith | skip | limit | project | sample
+;
+
+sample: STAGE_SAMPLE START_OBJECT SIZE_ARG num END_OBJECT {
+ $$ = CNode{CNode::ObjectChildren{std::pair{KeyFieldname::sample,
+ CNode{CNode::ObjectChildren{
+ {KeyFieldname::sizeArg, $num},
+ }}
+ }}};
+ }
;
inhibitOptimization:
@@ -238,12 +260,12 @@ num:
skip:
STAGE_SKIP num {
- $skip = CNode{CNode::ObjectChildren{std::pair{KeyFieldname::skip, $num}}};
+ $$ = CNode{CNode::ObjectChildren{std::pair{KeyFieldname::skip, $num}}};
};
limit:
STAGE_LIMIT num {
- $limit = CNode{CNode::ObjectChildren{std::pair{KeyFieldname::limit, $num}}};
+ $$ = CNode{CNode::ObjectChildren{std::pair{KeyFieldname::limit, $num}}};
};
project:
@@ -334,6 +356,9 @@ stageAsUserFieldname:
| STAGE_PROJECT {
$$ = UserFieldname{"$project"};
}
+ | STAGE_SAMPLE {
+ $$ = UserFieldname{"$sample"};
+ }
;
argAsUserFieldname:
@@ -346,6 +371,9 @@ argAsUserFieldname:
| PIPELINE_ARG {
$$ = UserFieldname{"pipeline"};
}
+ | SIZE_ARG {
+ $$ = UserFieldname{"size"};
+ }
;
aggExprAsUserFieldname:
@@ -395,6 +423,7 @@ aggExprAsUserFieldname:
}
;
+// Rules for literal non-terminals.
string:
STRING {
$$ = CNode{UserString{$1}};
@@ -484,7 +513,7 @@ int:
$$ = CNode{UserInt{$1}};
}
| INT_ZERO {
- $$ = CNode{UserLong{0}};
+ $$ = CNode{UserInt{0}};
}
;
diff --git a/src/mongo/db/cst/pipeline_parser_gen.cpp b/src/mongo/db/cst/pipeline_parser_gen.cpp
index fd928865fdc..45f5e868c28 100644
--- a/src/mongo/db/cst/pipeline_parser_gen.cpp
+++ b/src/mongo/db/cst/pipeline_parser_gen.cpp
@@ -197,160 +197,161 @@ 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.type_get()) {
- case 37: // BINARY
+ case 39: // BINARY
value.YY_MOVE_OR_COPY<BSONBinData>(YY_MOVE(that.value));
break;
- case 44: // JAVASCRIPT
+ case 46: // JAVASCRIPT
value.YY_MOVE_OR_COPY<BSONCode>(YY_MOVE(that.value));
break;
- case 46: // JAVASCRIPT_W_SCOPE
+ case 48: // JAVASCRIPT_W_SCOPE
value.YY_MOVE_OR_COPY<BSONCodeWScope>(YY_MOVE(that.value));
break;
- case 43: // DB_POINTER
+ case 45: // DB_POINTER
value.YY_MOVE_OR_COPY<BSONDBRef>(YY_MOVE(that.value));
break;
- case 42: // REGEX
+ case 44: // REGEX
value.YY_MOVE_OR_COPY<BSONRegEx>(YY_MOVE(that.value));
break;
- case 45: // SYMBOL
+ case 47: // SYMBOL
value.YY_MOVE_OR_COPY<BSONSymbol>(YY_MOVE(that.value));
break;
- case 55: // stageList
- case 56: // stage
- case 57: // inhibitOptimization
- case 58: // unionWith
- case 59: // num
- case 60: // skip
- case 61: // limit
- case 62: // project
- case 63: // projectFields
- case 64: // projection
- case 65: // compoundExpression
- case 66: // expressionArray
- case 67: // expressionObject
- case 68: // expressionFields
- case 69: // exprFixedTwoArg
- case 70: // expression
- case 71: // maths
- case 72: // add
- case 73: // atan2
- case 74: // string
- case 75: // binary
- case 76: // undefined
- case 77: // objectId
- case 78: // bool
- case 79: // date
- case 80: // null
- case 81: // regex
- 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: // simpleValue
- case 94: // boolExps
- case 95: // and
- case 96: // or
- case 97: // not
- case 98: // literalEscapes
- case 99: // const
- case 100: // literal
- case 101: // value
- case 102: // compoundValue
- case 103: // valueArray
- case 104: // valueObject
- case 105: // valueFields
- case 106: // compExprs
- case 107: // cmp
- case 108: // eq
- case 109: // gt
- case 110: // gte
- case 111: // lt
- case 112: // lte
- case 113: // ne
+ case 68: // dbPointer
+ case 69: // javascript
+ case 70: // symbol
+ case 71: // javascriptWScope
+ case 72: // int
+ case 73: // timestamp
+ case 74: // long
+ case 75: // double
+ case 76: // decimal
+ case 77: // minKey
+ case 78: // maxKey
+ case 79: // value
+ case 80: // string
+ case 81: // binary
+ case 82: // undefined
+ case 83: // objectId
+ case 84: // bool
+ case 85: // date
+ case 86: // null
+ case 87: // regex
+ case 88: // simpleValue
+ case 89: // compoundValue
+ case 90: // valueArray
+ case 91: // valueObject
+ case 92: // valueFields
+ case 93: // stageList
+ case 94: // stage
+ case 95: // inhibitOptimization
+ case 96: // unionWith
+ case 97: // skip
+ case 98: // limit
+ case 99: // project
+ case 100: // sample
+ case 101: // projectFields
+ case 102: // projection
+ case 103: // num
+ case 104: // expression
+ case 105: // compoundExpression
+ case 106: // exprFixedTwoArg
+ case 107: // expressionArray
+ case 108: // expressionObject
+ case 109: // expressionFields
+ case 110: // maths
+ case 111: // add
+ case 112: // atan2
+ case 113: // boolExps
+ case 114: // and
+ case 115: // or
+ case 116: // not
+ case 117: // literalEscapes
+ case 118: // const
+ case 119: // literal
+ case 120: // compExprs
+ case 121: // cmp
+ case 122: // eq
+ case 123: // gt
+ case 124: // gte
+ case 125: // lt
+ case 126: // lte
+ case 127: // ne
value.YY_MOVE_OR_COPY<CNode>(YY_MOVE(that.value));
break;
- case 114: // projectionFieldname
- case 115: // expressionFieldname
- case 116: // stageAsUserFieldname
- case 117: // argAsUserFieldname
- case 118: // aggExprAsUserFieldname
- case 119: // invariableUserFieldname
- case 120: // idAsUserFieldname
- case 121: // valueFieldname
+ case 57: // projectionFieldname
+ case 58: // expressionFieldname
+ case 59: // stageAsUserFieldname
+ case 60: // argAsUserFieldname
+ case 61: // aggExprAsUserFieldname
+ case 62: // invariableUserFieldname
+ case 63: // idAsUserFieldname
+ case 64: // valueFieldname
value.YY_MOVE_OR_COPY<CNode::Fieldname>(YY_MOVE(that.value));
break;
- case 40: // DATE_LITERAL
+ case 42: // DATE_LITERAL
value.YY_MOVE_OR_COPY<Date_t>(YY_MOVE(that.value));
break;
- case 51: // DECIMAL_NON_ZERO
+ case 53: // DECIMAL_NON_ZERO
value.YY_MOVE_OR_COPY<Decimal128>(YY_MOVE(that.value));
break;
- case 39: // OBJECT_ID
+ case 41: // OBJECT_ID
value.YY_MOVE_OR_COPY<OID>(YY_MOVE(that.value));
break;
- case 48: // TIMESTAMP
+ case 50: // TIMESTAMP
value.YY_MOVE_OR_COPY<Timestamp>(YY_MOVE(that.value));
break;
- case 53: // MAX_KEY
+ case 55: // MAX_KEY
value.YY_MOVE_OR_COPY<UserMaxKey>(YY_MOVE(that.value));
break;
- case 52: // MIN_KEY
+ case 54: // MIN_KEY
value.YY_MOVE_OR_COPY<UserMinKey>(YY_MOVE(that.value));
break;
- case 41: // JSNULL
+ case 43: // JSNULL
value.YY_MOVE_OR_COPY<UserNull>(YY_MOVE(that.value));
break;
- case 38: // UNDEFINED
+ case 40: // UNDEFINED
value.YY_MOVE_OR_COPY<UserUndefined>(YY_MOVE(that.value));
break;
- case 50: // DOUBLE_NON_ZERO
+ case 52: // DOUBLE_NON_ZERO
value.YY_MOVE_OR_COPY<double>(YY_MOVE(that.value));
break;
- case 47: // INT_NON_ZERO
+ case 49: // INT_NON_ZERO
value.YY_MOVE_OR_COPY<int>(YY_MOVE(that.value));
break;
- case 49: // LONG_NON_ZERO
+ case 51: // LONG_NON_ZERO
value.YY_MOVE_OR_COPY<long long>(YY_MOVE(that.value));
break;
- case 122: // projectField
- case 123: // expressionField
- case 124: // valueField
+ case 65: // projectField
+ case 66: // expressionField
+ case 67: // valueField
value.YY_MOVE_OR_COPY<std::pair<CNode::Fieldname, CNode>>(YY_MOVE(that.value));
break;
- case 35: // FIELDNAME
- case 36: // STRING
+ case 37: // FIELDNAME
+ case 38: // STRING
value.YY_MOVE_OR_COPY<std::string>(YY_MOVE(that.value));
break;
- case 125: // expressions
- case 126: // values
+ case 128: // expressions
+ case 129: // values
value.YY_MOVE_OR_COPY<std::vector<CNode>>(YY_MOVE(that.value));
break;
@@ -367,160 +368,161 @@ 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.type_get()) {
- case 37: // BINARY
+ case 39: // BINARY
value.move<BSONBinData>(YY_MOVE(that.value));
break;
- case 44: // JAVASCRIPT
+ case 46: // JAVASCRIPT
value.move<BSONCode>(YY_MOVE(that.value));
break;
- case 46: // JAVASCRIPT_W_SCOPE
+ case 48: // JAVASCRIPT_W_SCOPE
value.move<BSONCodeWScope>(YY_MOVE(that.value));
break;
- case 43: // DB_POINTER
+ case 45: // DB_POINTER
value.move<BSONDBRef>(YY_MOVE(that.value));
break;
- case 42: // REGEX
+ case 44: // REGEX
value.move<BSONRegEx>(YY_MOVE(that.value));
break;
- case 45: // SYMBOL
+ case 47: // SYMBOL
value.move<BSONSymbol>(YY_MOVE(that.value));
break;
- case 55: // stageList
- case 56: // stage
- case 57: // inhibitOptimization
- case 58: // unionWith
- case 59: // num
- case 60: // skip
- case 61: // limit
- case 62: // project
- case 63: // projectFields
- case 64: // projection
- case 65: // compoundExpression
- case 66: // expressionArray
- case 67: // expressionObject
- case 68: // expressionFields
- case 69: // exprFixedTwoArg
- case 70: // expression
- case 71: // maths
- case 72: // add
- case 73: // atan2
- case 74: // string
- case 75: // binary
- case 76: // undefined
- case 77: // objectId
- case 78: // bool
- case 79: // date
- case 80: // null
- case 81: // regex
- 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: // simpleValue
- case 94: // boolExps
- case 95: // and
- case 96: // or
- case 97: // not
- case 98: // literalEscapes
- case 99: // const
- case 100: // literal
- case 101: // value
- case 102: // compoundValue
- case 103: // valueArray
- case 104: // valueObject
- case 105: // valueFields
- case 106: // compExprs
- case 107: // cmp
- case 108: // eq
- case 109: // gt
- case 110: // gte
- case 111: // lt
- case 112: // lte
- case 113: // ne
+ case 68: // dbPointer
+ case 69: // javascript
+ case 70: // symbol
+ case 71: // javascriptWScope
+ case 72: // int
+ case 73: // timestamp
+ case 74: // long
+ case 75: // double
+ case 76: // decimal
+ case 77: // minKey
+ case 78: // maxKey
+ case 79: // value
+ case 80: // string
+ case 81: // binary
+ case 82: // undefined
+ case 83: // objectId
+ case 84: // bool
+ case 85: // date
+ case 86: // null
+ case 87: // regex
+ case 88: // simpleValue
+ case 89: // compoundValue
+ case 90: // valueArray
+ case 91: // valueObject
+ case 92: // valueFields
+ case 93: // stageList
+ case 94: // stage
+ case 95: // inhibitOptimization
+ case 96: // unionWith
+ case 97: // skip
+ case 98: // limit
+ case 99: // project
+ case 100: // sample
+ case 101: // projectFields
+ case 102: // projection
+ case 103: // num
+ case 104: // expression
+ case 105: // compoundExpression
+ case 106: // exprFixedTwoArg
+ case 107: // expressionArray
+ case 108: // expressionObject
+ case 109: // expressionFields
+ case 110: // maths
+ case 111: // add
+ case 112: // atan2
+ case 113: // boolExps
+ case 114: // and
+ case 115: // or
+ case 116: // not
+ case 117: // literalEscapes
+ case 118: // const
+ case 119: // literal
+ case 120: // compExprs
+ case 121: // cmp
+ case 122: // eq
+ case 123: // gt
+ case 124: // gte
+ case 125: // lt
+ case 126: // lte
+ case 127: // ne
value.move<CNode>(YY_MOVE(that.value));
break;
- case 114: // projectionFieldname
- case 115: // expressionFieldname
- case 116: // stageAsUserFieldname
- case 117: // argAsUserFieldname
- case 118: // aggExprAsUserFieldname
- case 119: // invariableUserFieldname
- case 120: // idAsUserFieldname
- case 121: // valueFieldname
+ case 57: // projectionFieldname
+ case 58: // expressionFieldname
+ case 59: // stageAsUserFieldname
+ case 60: // argAsUserFieldname
+ case 61: // aggExprAsUserFieldname
+ case 62: // invariableUserFieldname
+ case 63: // idAsUserFieldname
+ case 64: // valueFieldname
value.move<CNode::Fieldname>(YY_MOVE(that.value));
break;
- case 40: // DATE_LITERAL
+ case 42: // DATE_LITERAL
value.move<Date_t>(YY_MOVE(that.value));
break;
- case 51: // DECIMAL_NON_ZERO
+ case 53: // DECIMAL_NON_ZERO
value.move<Decimal128>(YY_MOVE(that.value));
break;
- case 39: // OBJECT_ID
+ case 41: // OBJECT_ID
value.move<OID>(YY_MOVE(that.value));
break;
- case 48: // TIMESTAMP
+ case 50: // TIMESTAMP
value.move<Timestamp>(YY_MOVE(that.value));
break;
- case 53: // MAX_KEY
+ case 55: // MAX_KEY
value.move<UserMaxKey>(YY_MOVE(that.value));
break;
- case 52: // MIN_KEY
+ case 54: // MIN_KEY
value.move<UserMinKey>(YY_MOVE(that.value));
break;
- case 41: // JSNULL
+ case 43: // JSNULL
value.move<UserNull>(YY_MOVE(that.value));
break;
- case 38: // UNDEFINED
+ case 40: // UNDEFINED
value.move<UserUndefined>(YY_MOVE(that.value));
break;
- case 50: // DOUBLE_NON_ZERO
+ case 52: // DOUBLE_NON_ZERO
value.move<double>(YY_MOVE(that.value));
break;
- case 47: // INT_NON_ZERO
+ case 49: // INT_NON_ZERO
value.move<int>(YY_MOVE(that.value));
break;
- case 49: // LONG_NON_ZERO
+ case 51: // LONG_NON_ZERO
value.move<long long>(YY_MOVE(that.value));
break;
- case 122: // projectField
- case 123: // expressionField
- case 124: // valueField
+ case 65: // projectField
+ case 66: // expressionField
+ case 67: // valueField
value.move<std::pair<CNode::Fieldname, CNode>>(YY_MOVE(that.value));
break;
- case 35: // FIELDNAME
- case 36: // STRING
+ case 37: // FIELDNAME
+ case 38: // STRING
value.move<std::string>(YY_MOVE(that.value));
break;
- case 125: // expressions
- case 126: // values
+ case 128: // expressions
+ case 129: // values
value.move<std::vector<CNode>>(YY_MOVE(that.value));
break;
@@ -537,160 +539,161 @@ PipelineParserGen::stack_symbol_type& PipelineParserGen::stack_symbol_type::oper
const stack_symbol_type& that) {
state = that.state;
switch (that.type_get()) {
- case 37: // BINARY
+ case 39: // BINARY
value.copy<BSONBinData>(that.value);
break;
- case 44: // JAVASCRIPT
+ case 46: // JAVASCRIPT
value.copy<BSONCode>(that.value);
break;
- case 46: // JAVASCRIPT_W_SCOPE
+ case 48: // JAVASCRIPT_W_SCOPE
value.copy<BSONCodeWScope>(that.value);
break;
- case 43: // DB_POINTER
+ case 45: // DB_POINTER
value.copy<BSONDBRef>(that.value);
break;
- case 42: // REGEX
+ case 44: // REGEX
value.copy<BSONRegEx>(that.value);
break;
- case 45: // SYMBOL
+ case 47: // SYMBOL
value.copy<BSONSymbol>(that.value);
break;
- case 55: // stageList
- case 56: // stage
- case 57: // inhibitOptimization
- case 58: // unionWith
- case 59: // num
- case 60: // skip
- case 61: // limit
- case 62: // project
- case 63: // projectFields
- case 64: // projection
- case 65: // compoundExpression
- case 66: // expressionArray
- case 67: // expressionObject
- case 68: // expressionFields
- case 69: // exprFixedTwoArg
- case 70: // expression
- case 71: // maths
- case 72: // add
- case 73: // atan2
- case 74: // string
- case 75: // binary
- case 76: // undefined
- case 77: // objectId
- case 78: // bool
- case 79: // date
- case 80: // null
- case 81: // regex
- 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: // simpleValue
- case 94: // boolExps
- case 95: // and
- case 96: // or
- case 97: // not
- case 98: // literalEscapes
- case 99: // const
- case 100: // literal
- case 101: // value
- case 102: // compoundValue
- case 103: // valueArray
- case 104: // valueObject
- case 105: // valueFields
- case 106: // compExprs
- case 107: // cmp
- case 108: // eq
- case 109: // gt
- case 110: // gte
- case 111: // lt
- case 112: // lte
- case 113: // ne
+ case 68: // dbPointer
+ case 69: // javascript
+ case 70: // symbol
+ case 71: // javascriptWScope
+ case 72: // int
+ case 73: // timestamp
+ case 74: // long
+ case 75: // double
+ case 76: // decimal
+ case 77: // minKey
+ case 78: // maxKey
+ case 79: // value
+ case 80: // string
+ case 81: // binary
+ case 82: // undefined
+ case 83: // objectId
+ case 84: // bool
+ case 85: // date
+ case 86: // null
+ case 87: // regex
+ case 88: // simpleValue
+ case 89: // compoundValue
+ case 90: // valueArray
+ case 91: // valueObject
+ case 92: // valueFields
+ case 93: // stageList
+ case 94: // stage
+ case 95: // inhibitOptimization
+ case 96: // unionWith
+ case 97: // skip
+ case 98: // limit
+ case 99: // project
+ case 100: // sample
+ case 101: // projectFields
+ case 102: // projection
+ case 103: // num
+ case 104: // expression
+ case 105: // compoundExpression
+ case 106: // exprFixedTwoArg
+ case 107: // expressionArray
+ case 108: // expressionObject
+ case 109: // expressionFields
+ case 110: // maths
+ case 111: // add
+ case 112: // atan2
+ case 113: // boolExps
+ case 114: // and
+ case 115: // or
+ case 116: // not
+ case 117: // literalEscapes
+ case 118: // const
+ case 119: // literal
+ case 120: // compExprs
+ case 121: // cmp
+ case 122: // eq
+ case 123: // gt
+ case 124: // gte
+ case 125: // lt
+ case 126: // lte
+ case 127: // ne
value.copy<CNode>(that.value);
break;
- case 114: // projectionFieldname
- case 115: // expressionFieldname
- case 116: // stageAsUserFieldname
- case 117: // argAsUserFieldname
- case 118: // aggExprAsUserFieldname
- case 119: // invariableUserFieldname
- case 120: // idAsUserFieldname
- case 121: // valueFieldname
+ case 57: // projectionFieldname
+ case 58: // expressionFieldname
+ case 59: // stageAsUserFieldname
+ case 60: // argAsUserFieldname
+ case 61: // aggExprAsUserFieldname
+ case 62: // invariableUserFieldname
+ case 63: // idAsUserFieldname
+ case 64: // valueFieldname
value.copy<CNode::Fieldname>(that.value);
break;
- case 40: // DATE_LITERAL
+ case 42: // DATE_LITERAL
value.copy<Date_t>(that.value);
break;
- case 51: // DECIMAL_NON_ZERO
+ case 53: // DECIMAL_NON_ZERO
value.copy<Decimal128>(that.value);
break;
- case 39: // OBJECT_ID
+ case 41: // OBJECT_ID
value.copy<OID>(that.value);
break;
- case 48: // TIMESTAMP
+ case 50: // TIMESTAMP
value.copy<Timestamp>(that.value);
break;
- case 53: // MAX_KEY
+ case 55: // MAX_KEY
value.copy<UserMaxKey>(that.value);
break;
- case 52: // MIN_KEY
+ case 54: // MIN_KEY
value.copy<UserMinKey>(that.value);
break;
- case 41: // JSNULL
+ case 43: // JSNULL
value.copy<UserNull>(that.value);
break;
- case 38: // UNDEFINED
+ case 40: // UNDEFINED
value.copy<UserUndefined>(that.value);
break;
- case 50: // DOUBLE_NON_ZERO
+ case 52: // DOUBLE_NON_ZERO
value.copy<double>(that.value);
break;
- case 47: // INT_NON_ZERO
+ case 49: // INT_NON_ZERO
value.copy<int>(that.value);
break;
- case 49: // LONG_NON_ZERO
+ case 51: // LONG_NON_ZERO
value.copy<long long>(that.value);
break;
- case 122: // projectField
- case 123: // expressionField
- case 124: // valueField
+ case 65: // projectField
+ case 66: // expressionField
+ case 67: // valueField
value.copy<std::pair<CNode::Fieldname, CNode>>(that.value);
break;
- case 35: // FIELDNAME
- case 36: // STRING
+ case 37: // FIELDNAME
+ case 38: // STRING
value.copy<std::string>(that.value);
break;
- case 125: // expressions
- case 126: // values
+ case 128: // expressions
+ case 129: // values
value.copy<std::vector<CNode>>(that.value);
break;
@@ -706,160 +709,161 @@ PipelineParserGen::stack_symbol_type& PipelineParserGen::stack_symbol_type::oper
stack_symbol_type& that) {
state = that.state;
switch (that.type_get()) {
- case 37: // BINARY
+ case 39: // BINARY
value.move<BSONBinData>(that.value);
break;
- case 44: // JAVASCRIPT
+ case 46: // JAVASCRIPT
value.move<BSONCode>(that.value);
break;
- case 46: // JAVASCRIPT_W_SCOPE
+ case 48: // JAVASCRIPT_W_SCOPE
value.move<BSONCodeWScope>(that.value);
break;
- case 43: // DB_POINTER
+ case 45: // DB_POINTER
value.move<BSONDBRef>(that.value);
break;
- case 42: // REGEX
+ case 44: // REGEX
value.move<BSONRegEx>(that.value);
break;
- case 45: // SYMBOL
+ case 47: // SYMBOL
value.move<BSONSymbol>(that.value);
break;
- case 55: // stageList
- case 56: // stage
- case 57: // inhibitOptimization
- case 58: // unionWith
- case 59: // num
- case 60: // skip
- case 61: // limit
- case 62: // project
- case 63: // projectFields
- case 64: // projection
- case 65: // compoundExpression
- case 66: // expressionArray
- case 67: // expressionObject
- case 68: // expressionFields
- case 69: // exprFixedTwoArg
- case 70: // expression
- case 71: // maths
- case 72: // add
- case 73: // atan2
- case 74: // string
- case 75: // binary
- case 76: // undefined
- case 77: // objectId
- case 78: // bool
- case 79: // date
- case 80: // null
- case 81: // regex
- 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: // simpleValue
- case 94: // boolExps
- case 95: // and
- case 96: // or
- case 97: // not
- case 98: // literalEscapes
- case 99: // const
- case 100: // literal
- case 101: // value
- case 102: // compoundValue
- case 103: // valueArray
- case 104: // valueObject
- case 105: // valueFields
- case 106: // compExprs
- case 107: // cmp
- case 108: // eq
- case 109: // gt
- case 110: // gte
- case 111: // lt
- case 112: // lte
- case 113: // ne
+ case 68: // dbPointer
+ case 69: // javascript
+ case 70: // symbol
+ case 71: // javascriptWScope
+ case 72: // int
+ case 73: // timestamp
+ case 74: // long
+ case 75: // double
+ case 76: // decimal
+ case 77: // minKey
+ case 78: // maxKey
+ case 79: // value
+ case 80: // string
+ case 81: // binary
+ case 82: // undefined
+ case 83: // objectId
+ case 84: // bool
+ case 85: // date
+ case 86: // null
+ case 87: // regex
+ case 88: // simpleValue
+ case 89: // compoundValue
+ case 90: // valueArray
+ case 91: // valueObject
+ case 92: // valueFields
+ case 93: // stageList
+ case 94: // stage
+ case 95: // inhibitOptimization
+ case 96: // unionWith
+ case 97: // skip
+ case 98: // limit
+ case 99: // project
+ case 100: // sample
+ case 101: // projectFields
+ case 102: // projection
+ case 103: // num
+ case 104: // expression
+ case 105: // compoundExpression
+ case 106: // exprFixedTwoArg
+ case 107: // expressionArray
+ case 108: // expressionObject
+ case 109: // expressionFields
+ case 110: // maths
+ case 111: // add
+ case 112: // atan2
+ case 113: // boolExps
+ case 114: // and
+ case 115: // or
+ case 116: // not
+ case 117: // literalEscapes
+ case 118: // const
+ case 119: // literal
+ case 120: // compExprs
+ case 121: // cmp
+ case 122: // eq
+ case 123: // gt
+ case 124: // gte
+ case 125: // lt
+ case 126: // lte
+ case 127: // ne
value.move<CNode>(that.value);
break;
- case 114: // projectionFieldname
- case 115: // expressionFieldname
- case 116: // stageAsUserFieldname
- case 117: // argAsUserFieldname
- case 118: // aggExprAsUserFieldname
- case 119: // invariableUserFieldname
- case 120: // idAsUserFieldname
- case 121: // valueFieldname
+ case 57: // projectionFieldname
+ case 58: // expressionFieldname
+ case 59: // stageAsUserFieldname
+ case 60: // argAsUserFieldname
+ case 61: // aggExprAsUserFieldname
+ case 62: // invariableUserFieldname
+ case 63: // idAsUserFieldname
+ case 64: // valueFieldname
value.move<CNode::Fieldname>(that.value);
break;
- case 40: // DATE_LITERAL
+ case 42: // DATE_LITERAL
value.move<Date_t>(that.value);
break;
- case 51: // DECIMAL_NON_ZERO
+ case 53: // DECIMAL_NON_ZERO
value.move<Decimal128>(that.value);
break;
- case 39: // OBJECT_ID
+ case 41: // OBJECT_ID
value.move<OID>(that.value);
break;
- case 48: // TIMESTAMP
+ case 50: // TIMESTAMP
value.move<Timestamp>(that.value);
break;
- case 53: // MAX_KEY
+ case 55: // MAX_KEY
value.move<UserMaxKey>(that.value);
break;
- case 52: // MIN_KEY
+ case 54: // MIN_KEY
value.move<UserMinKey>(that.value);
break;
- case 41: // JSNULL
+ case 43: // JSNULL
value.move<UserNull>(that.value);
break;
- case 38: // UNDEFINED
+ case 40: // UNDEFINED
value.move<UserUndefined>(that.value);
break;
- case 50: // DOUBLE_NON_ZERO
+ case 52: // DOUBLE_NON_ZERO
value.move<double>(that.value);
break;
- case 47: // INT_NON_ZERO
+ case 49: // INT_NON_ZERO
value.move<int>(that.value);
break;
- case 49: // LONG_NON_ZERO
+ case 51: // LONG_NON_ZERO
value.move<long long>(that.value);
break;
- case 122: // projectField
- case 123: // expressionField
- case 124: // valueField
+ case 65: // projectField
+ case 66: // expressionField
+ case 67: // valueField
value.move<std::pair<CNode::Fieldname, CNode>>(that.value);
break;
- case 35: // FIELDNAME
- case 36: // STRING
+ case 37: // FIELDNAME
+ case 38: // STRING
value.move<std::string>(that.value);
break;
- case 125: // expressions
- case 126: // values
+ case 128: // expressions
+ case 129: // values
value.move<std::vector<CNode>>(that.value);
break;
@@ -1079,160 +1083,161 @@ int PipelineParserGen::parse() {
correct type. The default '$$ = $1' action is NOT applied
when using variants. */
switch (yyr1_[yyn]) {
- case 37: // BINARY
+ case 39: // BINARY
yylhs.value.emplace<BSONBinData>();
break;
- case 44: // JAVASCRIPT
+ case 46: // JAVASCRIPT
yylhs.value.emplace<BSONCode>();
break;
- case 46: // JAVASCRIPT_W_SCOPE
+ case 48: // JAVASCRIPT_W_SCOPE
yylhs.value.emplace<BSONCodeWScope>();
break;
- case 43: // DB_POINTER
+ case 45: // DB_POINTER
yylhs.value.emplace<BSONDBRef>();
break;
- case 42: // REGEX
+ case 44: // REGEX
yylhs.value.emplace<BSONRegEx>();
break;
- case 45: // SYMBOL
+ case 47: // SYMBOL
yylhs.value.emplace<BSONSymbol>();
break;
- case 55: // stageList
- case 56: // stage
- case 57: // inhibitOptimization
- case 58: // unionWith
- case 59: // num
- case 60: // skip
- case 61: // limit
- case 62: // project
- case 63: // projectFields
- case 64: // projection
- case 65: // compoundExpression
- case 66: // expressionArray
- case 67: // expressionObject
- case 68: // expressionFields
- case 69: // exprFixedTwoArg
- case 70: // expression
- case 71: // maths
- case 72: // add
- case 73: // atan2
- case 74: // string
- case 75: // binary
- case 76: // undefined
- case 77: // objectId
- case 78: // bool
- case 79: // date
- case 80: // null
- case 81: // regex
- 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: // simpleValue
- case 94: // boolExps
- case 95: // and
- case 96: // or
- case 97: // not
- case 98: // literalEscapes
- case 99: // const
- case 100: // literal
- case 101: // value
- case 102: // compoundValue
- case 103: // valueArray
- case 104: // valueObject
- case 105: // valueFields
- case 106: // compExprs
- case 107: // cmp
- case 108: // eq
- case 109: // gt
- case 110: // gte
- case 111: // lt
- case 112: // lte
- case 113: // ne
+ case 68: // dbPointer
+ case 69: // javascript
+ case 70: // symbol
+ case 71: // javascriptWScope
+ case 72: // int
+ case 73: // timestamp
+ case 74: // long
+ case 75: // double
+ case 76: // decimal
+ case 77: // minKey
+ case 78: // maxKey
+ case 79: // value
+ case 80: // string
+ case 81: // binary
+ case 82: // undefined
+ case 83: // objectId
+ case 84: // bool
+ case 85: // date
+ case 86: // null
+ case 87: // regex
+ case 88: // simpleValue
+ case 89: // compoundValue
+ case 90: // valueArray
+ case 91: // valueObject
+ case 92: // valueFields
+ case 93: // stageList
+ case 94: // stage
+ case 95: // inhibitOptimization
+ case 96: // unionWith
+ case 97: // skip
+ case 98: // limit
+ case 99: // project
+ case 100: // sample
+ case 101: // projectFields
+ case 102: // projection
+ case 103: // num
+ case 104: // expression
+ case 105: // compoundExpression
+ case 106: // exprFixedTwoArg
+ case 107: // expressionArray
+ case 108: // expressionObject
+ case 109: // expressionFields
+ case 110: // maths
+ case 111: // add
+ case 112: // atan2
+ case 113: // boolExps
+ case 114: // and
+ case 115: // or
+ case 116: // not
+ case 117: // literalEscapes
+ case 118: // const
+ case 119: // literal
+ case 120: // compExprs
+ case 121: // cmp
+ case 122: // eq
+ case 123: // gt
+ case 124: // gte
+ case 125: // lt
+ case 126: // lte
+ case 127: // ne
yylhs.value.emplace<CNode>();
break;
- case 114: // projectionFieldname
- case 115: // expressionFieldname
- case 116: // stageAsUserFieldname
- case 117: // argAsUserFieldname
- case 118: // aggExprAsUserFieldname
- case 119: // invariableUserFieldname
- case 120: // idAsUserFieldname
- case 121: // valueFieldname
+ case 57: // projectionFieldname
+ case 58: // expressionFieldname
+ case 59: // stageAsUserFieldname
+ case 60: // argAsUserFieldname
+ case 61: // aggExprAsUserFieldname
+ case 62: // invariableUserFieldname
+ case 63: // idAsUserFieldname
+ case 64: // valueFieldname
yylhs.value.emplace<CNode::Fieldname>();
break;
- case 40: // DATE_LITERAL
+ case 42: // DATE_LITERAL
yylhs.value.emplace<Date_t>();
break;
- case 51: // DECIMAL_NON_ZERO
+ case 53: // DECIMAL_NON_ZERO
yylhs.value.emplace<Decimal128>();
break;
- case 39: // OBJECT_ID
+ case 41: // OBJECT_ID
yylhs.value.emplace<OID>();
break;
- case 48: // TIMESTAMP
+ case 50: // TIMESTAMP
yylhs.value.emplace<Timestamp>();
break;
- case 53: // MAX_KEY
+ case 55: // MAX_KEY
yylhs.value.emplace<UserMaxKey>();
break;
- case 52: // MIN_KEY
+ case 54: // MIN_KEY
yylhs.value.emplace<UserMinKey>();
break;
- case 41: // JSNULL
+ case 43: // JSNULL
yylhs.value.emplace<UserNull>();
break;
- case 38: // UNDEFINED
+ case 40: // UNDEFINED
yylhs.value.emplace<UserUndefined>();
break;
- case 50: // DOUBLE_NON_ZERO
+ case 52: // DOUBLE_NON_ZERO
yylhs.value.emplace<double>();
break;
- case 47: // INT_NON_ZERO
+ case 49: // INT_NON_ZERO
yylhs.value.emplace<int>();
break;
- case 49: // LONG_NON_ZERO
+ case 51: // LONG_NON_ZERO
yylhs.value.emplace<long long>();
break;
- case 122: // projectField
- case 123: // expressionField
- case 124: // valueField
+ case 65: // projectField
+ case 66: // expressionField
+ case 67: // valueField
yylhs.value.emplace<std::pair<CNode::Fieldname, CNode>>();
break;
- case 35: // FIELDNAME
- case 36: // STRING
+ case 37: // FIELDNAME
+ case 38: // STRING
yylhs.value.emplace<std::string>();
break;
- case 125: // expressions
- case 126: // values
+ case 128: // expressions
+ case 129: // values
yylhs.value.emplace<std::vector<CNode>>();
break;
@@ -1256,88 +1261,108 @@ int PipelineParserGen::parse() {
{
switch (yyn) {
case 2:
-#line 198 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 211 "src/mongo/db/cst/pipeline_grammar.yy"
{
*cst = YY_MOVE(yystack_[1].value.as<CNode>());
}
-#line 1328 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1333 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 3:
-#line 204 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 217 "src/mongo/db/cst/pipeline_grammar.yy"
{
}
-#line 1334 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1339 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 4:
-#line 205 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 218 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>())}};
}
-#line 1342 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1347 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 5:
-#line 213 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 226 "src/mongo/db/cst/pipeline_grammar.yy"
{
lexer.sortObjTokens();
}
-#line 1348 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1353 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 7:
-#line 216 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 229 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1354 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1359 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 8:
-#line 216 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 229 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1360 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1365 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 9:
-#line 216 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 229 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1366 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1371 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 10:
-#line 216 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 229 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1372 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1377 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 11:
-#line 216 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 229 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1378 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1383 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 12:
-#line 220 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 229 "src/mongo/db/cst/pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 1389 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+ break;
+
+ case 13:
+#line 232 "src/mongo/db/cst/pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{std::pair{
+ KeyFieldname::sample,
+ CNode{CNode::ObjectChildren{
+ {KeyFieldname::sizeArg, YY_MOVE(yystack_[1].value.as<CNode>())},
+ }}}}};
+ }
+#line 1401 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+ break;
+
+ case 14:
+#line 242 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
std::pair{KeyFieldname::inhibitOptimization, CNode::noopLeaf()}}};
}
-#line 1386 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1409 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 13:
-#line 226 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 15:
+#line 248 "src/mongo/db/cst/pipeline_grammar.yy"
{
auto pipeline = YY_MOVE(yystack_[1].value.as<CNode>());
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{std::pair{
@@ -1346,977 +1371,993 @@ int PipelineParserGen::parse() {
{KeyFieldname::collArg, YY_MOVE(yystack_[3].value.as<CNode>())},
{KeyFieldname::pipelineArg, std::move(pipeline)}}}}}};
}
-#line 1399 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1422 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 14:
-#line 236 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 16:
+#line 258 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1405 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1428 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 15:
-#line 236 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 17:
+#line 258 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1411 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1434 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 16:
-#line 236 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 18:
+#line 258 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1417 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1440 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 17:
-#line 236 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 19:
+#line 258 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1423 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1446 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 18:
-#line 240 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 20:
+#line 262 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
std::pair{KeyFieldname::skip, YY_MOVE(yystack_[0].value.as<CNode>())}}};
}
-#line 1431 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1454 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 19:
-#line 245 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 21:
+#line 267 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::limit, YY_MOVE(yystack_[0].value.as<CNode>())}}};
}
-#line 1439 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1462 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 20:
-#line 250 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 22:
+#line 272 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::project, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 1447 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1470 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 21:
-#line 256 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 23:
+#line 278 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode::noopLeaf();
}
-#line 1455 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1478 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 22:
-#line 259 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 24:
+#line 281 "src/mongo/db/cst/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 1464 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1487 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 23:
-#line 266 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 25:
+#line 288 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<std::pair<CNode::Fieldname, CNode>>() = {
KeyFieldname::id, YY_MOVE(yystack_[0].value.as<CNode>())};
}
-#line 1472 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1495 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 24:
-#line 269 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 26:
+#line 291 "src/mongo/db/cst/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 1480 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1503 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 25:
-#line 275 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 27:
+#line 297 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1486 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1509 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 26:
-#line 276 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 28:
+#line 298 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as<int>())}};
}
-#line 1494 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1517 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 27:
-#line 279 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 29:
+#line 301 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{KeyValue::intZeroKey};
}
-#line 1502 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1525 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 28:
-#line 282 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 30:
+#line 304 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as<long long>())}};
}
-#line 1510 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1533 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 29:
-#line 285 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 31:
+#line 307 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{KeyValue::longZeroKey};
}
-#line 1518 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1541 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 30:
-#line 288 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 32:
+#line 310 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as<double>())}};
}
-#line 1526 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1549 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 31:
-#line 291 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 33:
+#line 313 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{KeyValue::doubleZeroKey};
}
-#line 1534 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1557 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 32:
-#line 294 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 34:
+#line 316 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as<Decimal128>())}};
}
-#line 1542 "src/mongo/db/cst/pipeline_parser_gen.cpp"
- break;
-
- case 33:
-#line 297 "src/mongo/db/cst/pipeline_grammar.yy"
- {
- yylhs.value.as<CNode>() = CNode{KeyValue::decimalZeroKey};
- }
-#line 1550 "src/mongo/db/cst/pipeline_parser_gen.cpp"
- break;
-
- case 34:
-#line 300 "src/mongo/db/cst/pipeline_grammar.yy"
- {
- yylhs.value.as<CNode>() = CNode{KeyValue::trueKey};
- }
-#line 1558 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1565 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 35:
-#line 303 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 319 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{KeyValue::falseKey};
+ yylhs.value.as<CNode>() = CNode{KeyValue::decimalZeroKey};
}
-#line 1566 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1573 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 36:
-#line 306 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 322 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ yylhs.value.as<CNode>() = CNode{KeyValue::trueKey};
}
-#line 1572 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1581 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 37:
-#line 310 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 325 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() =
- YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
+ yylhs.value.as<CNode>() = CNode{KeyValue::falseKey};
}
-#line 1578 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1589 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 38:
-#line 310 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 328 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() =
- YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1584 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1595 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 39:
-#line 310 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 332 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 1590 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1601 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 40:
-#line 310 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 332 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 1596 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1607 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 41:
-#line 314 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 332 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
- UserFieldname{YY_MOVE(yystack_[0].value.as<std::string>())};
+ YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 1604 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1613 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 42:
-#line 322 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 332 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
- UserFieldname{"$_internalInhibitOptimization"};
+ YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 1612 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1619 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 43:
-#line 325 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 336 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$unionWith"};
+ yylhs.value.as<CNode::Fieldname>() =
+ UserFieldname{YY_MOVE(yystack_[0].value.as<std::string>())};
}
-#line 1620 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1627 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 44:
-#line 328 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 344 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$skip"};
+ yylhs.value.as<CNode::Fieldname>() =
+ UserFieldname{"$_internalInhibitOptimization"};
}
-#line 1628 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1635 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 45:
-#line 331 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 347 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$limit"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$unionWith"};
}
-#line 1636 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1643 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 46:
-#line 334 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 350 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$project"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$skip"};
}
-#line 1644 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1651 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 47:
-#line 343 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 353 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"coll"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$limit"};
}
-#line 1652 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1659 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 48:
-#line 346 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 356 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"pipeline"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$project"};
}
-#line 1660 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1667 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 49:
-#line 354 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 359 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$add"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$sample"};
}
-#line 1668 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1675 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 50:
-#line 357 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 368 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$atan2"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"coll"};
}
-#line 1676 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1683 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 51:
-#line 360 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 371 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$and"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"pipeline"};
}
-#line 1684 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1691 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 52:
-#line 363 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 374 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$const"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"size"};
}
-#line 1692 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1699 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 53:
-#line 366 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 382 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$literal"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$add"};
}
-#line 1700 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1707 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 54:
-#line 369 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 385 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$or"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$atan2"};
}
-#line 1708 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1715 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 55:
-#line 372 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 388 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$not"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$and"};
}
-#line 1716 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1723 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 56:
-#line 375 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 391 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$cmp"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$const"};
}
-#line 1724 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1731 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 57:
-#line 378 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 394 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$eq"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$literal"};
}
-#line 1732 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1739 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 58:
-#line 381 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 397 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$gt"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$or"};
}
-#line 1740 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1747 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 59:
-#line 384 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 400 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$gte"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$not"};
}
-#line 1748 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1755 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 60:
-#line 387 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 403 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$lt"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$cmp"};
}
-#line 1756 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1763 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 61:
-#line 390 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 406 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$lte"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$eq"};
}
-#line 1764 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1771 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 62:
-#line 393 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 409 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$ne"};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$gt"};
}
-#line 1772 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1779 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 63:
-#line 399 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 412 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() =
- CNode{UserString{YY_MOVE(yystack_[0].value.as<std::string>())}};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$gte"};
}
-#line 1780 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1787 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 64:
-#line 405 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 415 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() =
- CNode{UserBinary{YY_MOVE(yystack_[0].value.as<BSONBinData>())}};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$lt"};
}
-#line 1788 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1795 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 65:
-#line 411 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 418 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserUndefined{}};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$lte"};
}
-#line 1796 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1803 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 66:
-#line 417 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 421 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserObjectId{}};
+ yylhs.value.as<CNode::Fieldname>() = UserFieldname{"$ne"};
}
-#line 1804 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1811 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 67:
-#line 423 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 428 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
- CNode{UserDate{YY_MOVE(yystack_[0].value.as<Date_t>())}};
+ CNode{UserString{YY_MOVE(yystack_[0].value.as<std::string>())}};
}
-#line 1812 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1819 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 68:
-#line 429 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 434 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserNull{}};
+ yylhs.value.as<CNode>() =
+ CNode{UserBinary{YY_MOVE(yystack_[0].value.as<BSONBinData>())}};
}
-#line 1820 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1827 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 69:
-#line 435 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 440 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() =
- CNode{UserRegex{YY_MOVE(yystack_[0].value.as<BSONRegEx>())}};
+ yylhs.value.as<CNode>() = CNode{UserUndefined{}};
}
-#line 1828 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1835 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 70:
-#line 441 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 446 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() =
- CNode{UserDBPointer{YY_MOVE(yystack_[0].value.as<BSONDBRef>())}};
+ yylhs.value.as<CNode>() = CNode{UserObjectId{}};
}
-#line 1836 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1843 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 71:
-#line 447 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 452 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
- CNode{UserJavascript{YY_MOVE(yystack_[0].value.as<BSONCode>())}};
+ CNode{UserDate{YY_MOVE(yystack_[0].value.as<Date_t>())}};
}
-#line 1844 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1851 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 72:
-#line 453 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 458 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() =
- CNode{UserSymbol{YY_MOVE(yystack_[0].value.as<BSONSymbol>())}};
+ yylhs.value.as<CNode>() = CNode{UserNull{}};
}
-#line 1852 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1859 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 73:
-#line 459 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 464 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserJavascriptWithScope{
- YY_MOVE(yystack_[0].value.as<BSONCodeWScope>())}};
+ yylhs.value.as<CNode>() =
+ CNode{UserRegex{YY_MOVE(yystack_[0].value.as<BSONRegEx>())}};
}
-#line 1860 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1867 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 74:
-#line 465 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 470 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
- CNode{UserTimestamp{YY_MOVE(yystack_[0].value.as<Timestamp>())}};
+ CNode{UserDBPointer{YY_MOVE(yystack_[0].value.as<BSONDBRef>())}};
}
-#line 1868 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1875 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 75:
-#line 471 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 476 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
- CNode{UserMinKey{YY_MOVE(yystack_[0].value.as<UserMinKey>())}};
+ CNode{UserJavascript{YY_MOVE(yystack_[0].value.as<BSONCode>())}};
}
-#line 1876 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1883 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 76:
-#line 477 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 482 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
- CNode{UserMaxKey{YY_MOVE(yystack_[0].value.as<UserMaxKey>())}};
+ CNode{UserSymbol{YY_MOVE(yystack_[0].value.as<BSONSymbol>())}};
}
-#line 1884 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1891 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 77:
-#line 483 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 488 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() =
- CNode{UserInt{YY_MOVE(yystack_[0].value.as<int>())}};
+ yylhs.value.as<CNode>() = CNode{UserJavascriptWithScope{
+ YY_MOVE(yystack_[0].value.as<BSONCodeWScope>())}};
}
-#line 1892 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1899 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 78:
-#line 486 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 494 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserLong{0}};
+ yylhs.value.as<CNode>() =
+ CNode{UserTimestamp{YY_MOVE(yystack_[0].value.as<Timestamp>())}};
}
-#line 1900 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1907 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 79:
-#line 492 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 500 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
- CNode{UserLong{YY_MOVE(yystack_[0].value.as<long long>())}};
+ CNode{UserMinKey{YY_MOVE(yystack_[0].value.as<UserMinKey>())}};
}
-#line 1908 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1915 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 80:
-#line 495 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 506 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserLong{0ll}};
+ yylhs.value.as<CNode>() =
+ CNode{UserMaxKey{YY_MOVE(yystack_[0].value.as<UserMaxKey>())}};
}
-#line 1916 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1923 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 81:
-#line 501 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 512 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
- CNode{UserDouble{YY_MOVE(yystack_[0].value.as<double>())}};
+ CNode{UserInt{YY_MOVE(yystack_[0].value.as<int>())}};
}
-#line 1924 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1931 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 82:
-#line 504 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 515 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserDouble{0.0}};
+ yylhs.value.as<CNode>() = CNode{UserInt{0}};
}
-#line 1932 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1939 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 83:
-#line 510 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 521 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
- CNode{UserDecimal{YY_MOVE(yystack_[0].value.as<Decimal128>())}};
+ CNode{UserLong{YY_MOVE(yystack_[0].value.as<long long>())}};
}
-#line 1940 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1947 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 84:
-#line 513 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 524 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserDecimal{0.0}};
+ yylhs.value.as<CNode>() = CNode{UserLong{0ll}};
}
-#line 1948 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1955 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 85:
-#line 519 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 530 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserBoolean{true}};
+ yylhs.value.as<CNode>() =
+ CNode{UserDouble{YY_MOVE(yystack_[0].value.as<double>())}};
}
-#line 1956 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1963 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 86:
-#line 522 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 533 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = CNode{UserBoolean{false}};
+ yylhs.value.as<CNode>() = CNode{UserDouble{0.0}};
}
-#line 1964 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1971 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 87:
-#line 528 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 539 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ yylhs.value.as<CNode>() =
+ CNode{UserDecimal{YY_MOVE(yystack_[0].value.as<Decimal128>())}};
}
-#line 1970 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1979 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 88:
-#line 529 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 542 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ yylhs.value.as<CNode>() = CNode{UserDecimal{0.0}};
}
-#line 1976 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1987 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 89:
-#line 530 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 548 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ yylhs.value.as<CNode>() = CNode{UserBoolean{true}};
}
-#line 1982 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 1995 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 90:
-#line 531 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 551 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ yylhs.value.as<CNode>() = CNode{UserBoolean{false}};
}
-#line 1988 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2003 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 91:
-#line 532 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 557 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 1994 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2009 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 92:
-#line 533 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 558 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2000 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2015 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 93:
-#line 534 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 559 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2006 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2021 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 94:
-#line 535 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 560 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2012 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2027 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 95:
-#line 536 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 561 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2018 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2033 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 96:
-#line 537 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 562 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2024 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2039 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 97:
-#line 538 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 563 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2030 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2045 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 98:
-#line 539 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 564 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2036 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2051 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 99:
-#line 540 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 565 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2042 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2057 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 100:
-#line 541 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 566 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2048 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2063 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 101:
-#line 542 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 567 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2054 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2069 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 102:
-#line 543 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 568 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2060 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2075 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 103:
-#line 544 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 569 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2066 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2081 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 104:
-#line 545 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 570 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2072 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2087 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 105:
-#line 546 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 571 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2078 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2093 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 106:
-#line 553 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 572 "src/mongo/db/cst/pipeline_grammar.yy"
{
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2084 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2099 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 107:
-#line 554 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 573 "src/mongo/db/cst/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>()));
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2093 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2105 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 108:
-#line 561 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 574 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2099 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2111 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 109:
-#line 561 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 575 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2105 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2117 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 110:
-#line 565 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 582 "src/mongo/db/cst/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 2113 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2123 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 111:
-#line 570 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 583 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ 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 2119 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2132 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 112:
-#line 570 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 590 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2125 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2138 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 113:
-#line 570 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 590 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2131 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2144 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 114:
-#line 570 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 594 "src/mongo/db/cst/pipeline_grammar.yy"
{
- yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ yylhs.value.as<CNode>() =
+ CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>()),
+ YY_MOVE(yystack_[1].value.as<CNode>())}};
}
-#line 2137 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2152 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 115:
-#line 570 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 599 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2143 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2158 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 116:
-#line 570 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 599 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2149 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2164 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 117:
-#line 576 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 599 "src/mongo/db/cst/pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2170 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+ break;
+
+ case 118:
+#line 599 "src/mongo/db/cst/pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2176 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+ break;
+
+ case 119:
+#line 599 "src/mongo/db/cst/pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2182 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+ break;
+
+ case 120:
+#line 599 "src/mongo/db/cst/pipeline_grammar.yy"
+ {
+ yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
+ }
+#line 2188 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+ break;
+
+ case 121:
+#line 605 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{YY_MOVE(yystack_[1].value.as<std::vector<CNode>>())};
}
-#line 2157 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2196 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 118:
-#line 584 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 122:
+#line 613 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[1].value.as<CNode>());
}
-#line 2165 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2204 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 119:
-#line 590 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 123:
+#line 619 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode::noopLeaf();
}
-#line 2173 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2212 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 120:
-#line 593 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 124:
+#line 622 "src/mongo/db/cst/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 2182 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2221 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 121:
-#line 600 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 125:
+#line 629 "src/mongo/db/cst/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 2190 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2229 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 122:
-#line 607 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 126:
+#line 636 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2196 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2235 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 123:
-#line 607 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 127:
+#line 636 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2202 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2241 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 124:
-#line 607 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 128:
+#line 636 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2208 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2247 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 125:
-#line 607 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 129:
+#line 636 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2214 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2253 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 126:
-#line 611 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 130:
+#line 640 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() = UserFieldname{"_id"};
}
-#line 2222 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2261 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 127:
-#line 617 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 131:
+#line 646 "src/mongo/db/cst/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 2267 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 128:
-#line 618 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 132:
+#line 647 "src/mongo/db/cst/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 2273 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 129:
-#line 622 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 133:
+#line 651 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::add,
@@ -2327,44 +2368,44 @@ int PipelineParserGen::parse() {
yylhs.value.as<CNode>().objectChildren()[0].second.arrayChildren();
array.insert(array.end(), others.begin(), others.end());
}
-#line 2246 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2285 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 130:
-#line 632 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 134:
+#line 661 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::atan2, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2255 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2294 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 131:
-#line 639 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 135:
+#line 668 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2261 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2300 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 132:
-#line 639 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 136:
+#line 668 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2267 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2306 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 133:
-#line 639 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 137:
+#line 668 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2273 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2312 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 134:
-#line 643 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 138:
+#line 672 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::andExpr,
@@ -2375,11 +2416,11 @@ int PipelineParserGen::parse() {
yylhs.value.as<CNode>().objectChildren()[0].second.arrayChildren();
array.insert(array.end(), others.begin(), others.end());
}
-#line 2285 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2324 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 135:
-#line 653 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 139:
+#line 682 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::orExpr,
@@ -2390,316 +2431,316 @@ int PipelineParserGen::parse() {
yylhs.value.as<CNode>().objectChildren()[0].second.arrayChildren();
array.insert(array.end(), others.begin(), others.end());
}
-#line 2297 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2336 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 136:
-#line 663 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 140:
+#line 692 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::notExpr,
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
}
-#line 2306 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2345 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 137:
-#line 670 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 141:
+#line 699 "src/mongo/db/cst/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 2351 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 138:
-#line 670 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 142:
+#line 699 "src/mongo/db/cst/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 2357 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 139:
-#line 674 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 143:
+#line 703 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::constExpr,
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
}
-#line 2327 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2366 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 140:
-#line 681 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 144:
+#line 710 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::literal,
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as<CNode>())}}}}};
}
-#line 2336 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2375 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 141:
-#line 688 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 145:
+#line 717 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2342 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2381 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 142:
-#line 688 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 146:
+#line 717 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2348 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2387 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 143:
-#line 692 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 147:
+#line 721 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2354 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2393 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 144:
-#line 692 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 148:
+#line 721 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2360 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2399 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 145:
-#line 696 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 149:
+#line 725 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() =
CNode{YY_MOVE(yystack_[1].value.as<std::vector<CNode>>())};
}
-#line 2368 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2407 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 146:
-#line 702 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 150:
+#line 731 "src/mongo/db/cst/pipeline_grammar.yy"
{
}
-#line 2374 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2413 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 147:
-#line 703 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 151:
+#line 732 "src/mongo/db/cst/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 2383 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2422 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 148:
-#line 710 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 152:
+#line 739 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[1].value.as<CNode>());
}
-#line 2391 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2430 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 149:
-#line 716 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 153:
+#line 745 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode::noopLeaf();
}
-#line 2399 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2438 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 150:
-#line 719 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 154:
+#line 748 "src/mongo/db/cst/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 2408 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2447 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 151:
-#line 726 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 155:
+#line 755 "src/mongo/db/cst/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 2416 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2455 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 152:
-#line 733 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 156:
+#line 762 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2422 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2461 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 153:
-#line 734 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 157:
+#line 763 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2428 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2467 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 154:
-#line 735 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 158:
+#line 764 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2434 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2473 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 155:
-#line 736 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 159:
+#line 765 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2440 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2479 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 156:
-#line 737 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 160:
+#line 766 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode::Fieldname>() =
YY_MOVE(yystack_[0].value.as<CNode::Fieldname>());
}
-#line 2446 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2485 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 157:
-#line 740 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 161:
+#line 769 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2452 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2491 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 158:
-#line 740 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 162:
+#line 769 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2458 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2497 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 159:
-#line 740 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 163:
+#line 769 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2464 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2503 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 160:
-#line 740 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 164:
+#line 769 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2470 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2509 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 161:
-#line 740 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 165:
+#line 769 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2476 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2515 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 162:
-#line 740 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 166:
+#line 769 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2482 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2521 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 163:
-#line 740 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 167:
+#line 769 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = YY_MOVE(yystack_[0].value.as<CNode>());
}
-#line 2488 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2527 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 164:
-#line 742 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 168:
+#line 771 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::cmp, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2497 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2536 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 165:
-#line 747 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 169:
+#line 776 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::eq, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2506 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2545 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 166:
-#line 752 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 170:
+#line 781 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::gt, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2515 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2554 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 167:
-#line 757 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 171:
+#line 786 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::gte, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2524 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2563 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 168:
-#line 762 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 172:
+#line 791 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::lt, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2533 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2572 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 169:
-#line 767 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 173:
+#line 796 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::lte, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2542 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2581 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
- case 170:
-#line 772 "src/mongo/db/cst/pipeline_grammar.yy"
+ case 174:
+#line 801 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as<CNode>() = CNode{CNode::ObjectChildren{
{KeyFieldname::ne, YY_MOVE(yystack_[1].value.as<CNode>())}}};
}
-#line 2551 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2590 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
-#line 2555 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 2594 "src/mongo/db/cst/pipeline_parser_gen.cpp"
default:
break;
@@ -2866,123 +2907,129 @@ std::string PipelineParserGen::yysyntax_error_(state_type, const symbol_type&) c
}
-const short PipelineParserGen::yypact_ninf_ = -165;
+const short PipelineParserGen::yypact_ninf_ = -173;
const signed char PipelineParserGen::yytable_ninf_ = -1;
const short PipelineParserGen::yypact_[] = {
- 29, 40, 47, 13, 45, -165, 49, -165, 14, 14, 51, 56, -165, -165, -165, -165,
- -165, -165, 58, 48, 63, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
- -165, -165, -165, -165, 40, -165, 33, -165, 171, -165, -165, 52, -165, 8, -165, -165,
- -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
- -165, -165, -165, -165, 8, -165, -165, -165, -165, -165, -2, 250, 74, -165, -165, -165,
- -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
- -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 70,
- 71, 73, 75, 83, 84, 88, 89, 73, 73, 73, 73, 73, 73, 73, 235, -165,
- -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 74,
- -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
- -165, -165, -165, -165, 90, -165, 74, 74, 94, 74, 92, 92, 74, 74, 95, 102,
- 103, 104, 105, 144, 146, -165, -165, 74, -165, -165, -165, -165, -165, -165, -165, 74,
- 74, -165, 74, -165, 92, -165, 145, -165, -165, -165, 148, 74, 149, -165, -165, -165,
- -165, -165, -165, -165, -165, 74, 150, 74, 203, 92, 151, 154, 155, 74, 156, 158,
- -165, 159, -165, -165, -165, -165, -165, -165, 92, -165, -165, -165, -165, -165, 160, -165,
- 157, 163, -165, 164, -165, -165, -165};
+ 14, 17, 10, 151, 21, -173, 25, 3, 27, 28, 3, -173, 35, -173, -173, -173,
+ -173, -173, -173, -173, 36, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173,
+ -173, -173, -173, 15, -173, 40, 44, 17, -173, 173, 3, 12, -173, -173, -173, 13,
+ -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173,
+ -173, -173, -173, -173, -173, -173, -173, -173, 13, -173, -173, -173, -173, -173, 63, -173,
+ 68, 256, 33, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173,
+ -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173,
+ -173, -173, -173, -173, -173, -173, 5, 43, 85, 86, 92, 93, 100, 101, 85, 85,
+ 85, 85, 85, 85, 85, 241, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173,
+ -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173,
+ -173, -173, -173, -173, -173, -173, -173, -173, -173, 33, -173, 102, 103, 33, 33, 105,
+ 33, 91, 91, 33, 33, 106, 108, 111, 114, 117, 118, 120, -173, -173, 33, -173,
+ -173, -173, -173, -173, -173, -173, -173, 33, 33, -173, 33, -173, 91, 119, -173, -173,
+ -173, -173, 121, 33, 122, -173, -173, -173, -173, -173, -173, -173, -173, 33, 146, 33,
+ 207, 91, 157, 167, 168, 33, 171, 172, -173, 175, -173, -173, -173, -173, -173, -173,
+ 91, -173, -173, -173, -173, -173, 176, -173, 179, 180, -173, 182, -173, -173, -173};
const unsigned char PipelineParserGen::yydefact_[] = {
- 0, 3, 0, 0, 0, 1, 0, 5, 0, 0, 0, 0, 7, 8, 9, 10, 11, 2, 0,
- 0, 0, 78, 80, 82, 84, 77, 79, 81, 83, 18, 14, 15, 16, 17, 19, 21, 3, 12,
- 0, 6, 0, 4, 63, 0, 20, 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 41, 0, 38, 39, 40, 37, 22, 0, 119,
- 106, 27, 29, 31, 33, 34, 35, 26, 28, 30, 32, 23, 36, 111, 112, 113, 127, 128, 25,
- 114, 131, 132, 133, 115, 137, 138, 116, 157, 158, 159, 160, 161, 162, 163, 24, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 86, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 109, 106, 87, 88, 89, 90, 102, 91, 92, 93,
- 94, 95, 96, 97, 98, 103, 99, 100, 101, 104, 105, 108, 0, 13, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 126, 0, 123, 124, 122, 125, 120, 107,
- 117, 0, 0, 130, 0, 149, 146, 141, 0, 142, 143, 144, 0, 0, 0, 164, 165, 166, 167,
- 168, 169, 170, 121, 106, 0, 106, 0, 146, 0, 0, 0, 106, 0, 0, 110, 0, 148, 153,
- 154, 155, 152, 156, 0, 150, 147, 145, 139, 140, 0, 136, 0, 0, 151, 0, 129, 134, 135};
+ 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 5, 0, 7, 8, 9, 10, 11, 12,
+ 2, 0, 82, 84, 86, 88, 81, 83, 85, 87, 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,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 43, 0, 40, 41, 42,
+ 39, 24, 0, 67, 0, 123, 110, 29, 31, 33, 35, 36, 37, 28, 30, 32, 34, 27, 25,
+ 38, 115, 116, 117, 131, 132, 118, 135, 136, 137, 119, 141, 142, 120, 161, 162, 163, 164, 165,
+ 166, 167, 26, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 89, 90, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 98, 99, 100,
+ 101, 102, 107, 103, 104, 105, 108, 109, 91, 92, 93, 94, 106, 95, 96, 97, 112, 110, 113,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 130,
+ 0, 127, 128, 126, 129, 124, 111, 121, 15, 0, 0, 134, 0, 153, 150, 0, 145, 146, 147,
+ 148, 0, 0, 0, 168, 169, 170, 171, 172, 173, 174, 125, 110, 0, 110, 0, 150, 0, 0,
+ 0, 110, 0, 0, 114, 0, 152, 157, 158, 159, 156, 160, 0, 154, 151, 149, 143, 144, 0,
+ 140, 0, 0, 155, 0, 133, 138, 139};
const short PipelineParserGen::yypgoto_[] = {
- -165, 126, -165, -165, -165, 161, -165, -165, -165, -165, 101, -33, -165, -165, -165, -83,
- -20, -165, -165, -165, -12, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
- 6, -165, 37, -4, 41, -165, -165, -164, -165, -165, -165, -165, -165, -165, -165, -161,
- -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -126, -125,
- -43, -124, -40, -165, -165, -165, -165, -140, -38, -165, -165, -165};
+ -173, -173, -173, -132, -131, -111, -129, -98, -173, -173, -173, -173, -173, -173, -173, -173,
+ 107, -173, 109, -7, 113, -173, -173, -170, -14, -173, -173, -173, -173, -173, -173, -173,
+ -172, -173, -173, -173, -173, 140, -173, -173, -173, -173, -173, -173, -173, -173, 141, 7,
+ -26, -13, 30, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173,
+ -173, -173, -173, -173, -173, -173, -173, -173, -160, -10, -173, -173, -173};
const short PipelineParserGen::yydefgoto_[] = {
- -1, 4, 11, 12, 13, 29, 14, 15, 16, 40, 87, 142, 89, 90, 126, 168, 143, 91, 92,
- 93, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
- 162, 163, 95, 96, 97, 98, 99, 100, 101, 217, 199, 200, 201, 216, 102, 103, 104, 105, 106,
- 107, 108, 109, 68, 183, 69, 70, 71, 72, 187, 232, 73, 188, 233, 164, 218, 2, 19, 20};
+ -1, 72, 190, 73, 74, 75, 76, 194, 240, 77, 195, 241, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 225, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 207, 208, 209, 224, 4, 12, 13, 14, 15, 16, 17, 18, 41, 94, 33,
+ 169, 170, 175, 96, 97, 133, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 114, 115, 171, 226, 2, 37, 38};
const unsigned char PipelineParserGen::yytable_[] = {
- 184, 185, 186, 189, 32, 32, 197, 197, 23, 198, 202, 75, 88, 76, 30, 30, 77, 78, 79,
- 80, 81, 82, 21, 22, 23, 24, 43, 6, 7, 8, 9, 10, 197, 94, 1, 88, 174, 175,
- 176, 177, 178, 179, 180, 3, 42, 31, 31, 5, 27, 33, 33, 17, 18, 197, 35, 83, 94,
- 84, 85, 86, 36, 25, 37, 26, 27, 28, 39, 38, 197, 42, 111, 242, 74, 223, 165, 225,
- 166, 75, 167, 76, 169, 238, 21, 22, 23, 24, 127, 128, 170, 171, 227, 228, 230, 172, 173,
- 195, 190, 196, 193, 205, 21, 22, 23, 24, 127, 128, 206, 207, 208, 209, 42, 129, 130, 131,
- 132, 133, 134, 135, 136, 137, 138, 25, 139, 26, 27, 28, 140, 141, 42, 129, 130, 131, 132,
- 133, 134, 135, 136, 137, 138, 25, 139, 26, 27, 28, 140, 141, 191, 192, 210, 194, 211, 219,
- 203, 204, 220, 222, 224, 235, 236, 237, 239, 244, 41, 212, 240, 241, 243, 245, 246, 110, 34,
- 213, 214, 229, 215, 44, 231, 0, 45, 234, 0, 0, 0, 221, 0, 46, 47, 48, 49, 50,
- 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 226, 0,
- 0, 182, 0, 0, 0, 0, 0, 0, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 181, 0, 0, 182, 0, 0, 0, 0,
- 0, 0, 46, 47, 48, 49, 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 67, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125};
+ 31, 191, 192, 31, 193, 206, 206, 205, 210, 196, 5, 21, 22, 23, 24, 23, 81, 36, 82,
+ 1, 3, 83, 84, 85, 86, 87, 88, 19, 20, 80, 34, 35, 206, 93, 95, 31, 81, 42,
+ 82, 39, 40, 21, 22, 23, 24, 134, 135, 44, 173, 78, 79, 79, 25, 206, 26, 27, 28,
+ 27, 93, 95, 43, 231, 89, 233, 90, 91, 92, 117, 206, 246, 250, 79, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 25, 146, 26, 27, 28, 147, 148, 118, 174, 176, 235, 236, 203,
+ 238, 204, 177, 178, 21, 22, 23, 24, 134, 135, 179, 180, 198, 197, 201, 213, 172, 214, 237,
+ 29, 215, 30, 29, 216, 30, 32, 217, 218, 32, 219, 227, 239, 228, 230, 79, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 25, 146, 26, 27, 28, 147, 148, 199, 200, 29, 202, 30,
+ 232, 211, 212, 32, 181, 182, 183, 184, 185, 186, 187, 243, 220, 6, 7, 8, 9, 10, 11,
+ 244, 245, 221, 222, 247, 223, 46, 248, 45, 47, 249, 251, 252, 253, 229, 254, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 234, 0, 116, 189, 242, 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, 188, 0,
+ 0, 189, 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, 71, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132};
const short PipelineParserGen::yycheck_[] = {
- 126, 126, 126, 143, 8, 9, 170, 171, 10, 170, 171, 3, 45, 5, 8, 9, 8, 9, 10,
- 11, 12, 13, 8, 9, 10, 11, 38, 14, 15, 16, 17, 18, 196, 45, 5, 68, 119, 120,
- 121, 122, 123, 124, 125, 3, 36, 8, 9, 0, 50, 8, 9, 6, 3, 217, 3, 47, 68,
- 49, 50, 51, 4, 47, 4, 49, 50, 51, 3, 19, 232, 36, 74, 232, 20, 213, 4, 215,
- 5, 3, 5, 5, 5, 221, 8, 9, 10, 11, 12, 13, 5, 5, 216, 216, 216, 5, 5,
- 3, 6, 5, 4, 4, 8, 9, 10, 11, 12, 13, 4, 4, 4, 4, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 166, 167, 4, 169, 4, 6,
- 172, 173, 6, 6, 6, 6, 4, 4, 4, 4, 36, 183, 6, 6, 6, 4, 4, 68, 9,
- 191, 192, 216, 194, 4, 216, -1, 7, 217, -1, -1, -1, 203, -1, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 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, 4, -1, -1, 7, -1, -1, -1, -1,
- -1, -1, 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 35, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34};
+ 7, 133, 133, 10, 133, 177, 178, 177, 178, 169, 0, 8, 9, 10, 11, 10, 3, 10, 5,
+ 5, 3, 8, 9, 10, 11, 12, 13, 6, 3, 43, 3, 3, 204, 47, 47, 42, 3, 22,
+ 5, 4, 4, 8, 9, 10, 11, 12, 13, 3, 5, 42, 38, 38, 49, 225, 51, 52, 53,
+ 52, 72, 72, 20, 221, 49, 223, 51, 52, 53, 4, 240, 229, 240, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 21, 5, 5, 224, 224, 3,
+ 224, 5, 5, 5, 8, 9, 10, 11, 12, 13, 5, 5, 4, 6, 4, 4, 118, 4, 224,
+ 7, 4, 7, 10, 4, 10, 7, 4, 4, 10, 4, 6, 224, 6, 6, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 173, 174, 42, 176, 42,
+ 6, 179, 180, 42, 126, 127, 128, 129, 130, 131, 132, 6, 190, 14, 15, 16, 17, 18, 19,
+ 4, 4, 199, 200, 4, 202, 4, 6, 39, 7, 6, 6, 4, 4, 211, 4, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 4, -1, 72, 7, 225, -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, 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, 37, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36};
const unsigned char PipelineParserGen::yystos_[] = {
- 0, 5, 127, 3, 55, 0, 14, 15, 16, 17, 18, 56, 57, 58, 60, 61, 62, 6, 3,
- 128, 129, 8, 9, 10, 11, 47, 49, 50, 51, 59, 86, 88, 89, 90, 59, 3, 4, 4,
- 19, 3, 63, 55, 36, 74, 4, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 114, 116, 117, 118, 119, 122, 20, 3,
- 5, 8, 9, 10, 11, 12, 13, 47, 49, 50, 51, 64, 65, 66, 67, 71, 72, 73, 74,
- 94, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 64, 89, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 68, 12, 13, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 48, 52, 53, 65, 70, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 125, 4, 5, 5, 69, 5, 5,
- 5, 5, 5, 69, 69, 69, 69, 69, 69, 69, 4, 7, 115, 116, 117, 119, 120, 123, 125,
- 6, 70, 70, 4, 70, 3, 5, 93, 101, 102, 103, 104, 101, 70, 70, 4, 4, 4, 4,
- 4, 4, 4, 70, 70, 70, 70, 105, 101, 126, 6, 6, 70, 6, 125, 6, 125, 4, 116,
- 117, 118, 119, 120, 121, 124, 126, 6, 4, 4, 125, 4, 6, 6, 101, 6, 4, 4, 4};
+ 0, 5, 130, 3, 93, 0, 14, 15, 16, 17, 18, 19, 94, 95, 96, 97, 98, 99, 100,
+ 6, 3, 8, 9, 10, 11, 49, 51, 52, 53, 72, 74, 75, 76, 103, 3, 3, 103, 131,
+ 132, 4, 4, 101, 22, 20, 3, 93, 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, 57, 59, 60, 61,
+ 62, 65, 103, 38, 80, 3, 5, 8, 9, 10, 11, 12, 13, 49, 51, 52, 53, 80, 102,
+ 105, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 102, 4, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 109, 12, 13, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 54, 55, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 104, 105,
+ 128, 75, 5, 5, 106, 5, 5, 5, 5, 5, 106, 106, 106, 106, 106, 106, 106, 4, 7,
+ 58, 59, 60, 62, 63, 66, 128, 6, 4, 104, 104, 4, 104, 3, 5, 79, 88, 89, 90,
+ 91, 79, 104, 104, 4, 4, 4, 4, 4, 4, 4, 104, 104, 104, 104, 92, 79, 129, 6,
+ 6, 104, 6, 128, 6, 128, 4, 59, 60, 61, 62, 63, 64, 67, 129, 6, 4, 4, 128,
+ 4, 6, 6, 79, 6, 4, 4, 4};
const unsigned char PipelineParserGen::yyr1_[] = {
- 0, 54, 127, 55, 55, 129, 128, 56, 56, 56, 56, 56, 57, 58, 59, 59, 59, 59, 60,
- 61, 62, 63, 63, 122, 122, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 114,
- 114, 114, 114, 119, 116, 116, 116, 116, 116, 117, 117, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 118, 118, 118, 118, 118, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 85, 87, 91,
- 92, 86, 86, 88, 88, 89, 89, 90, 90, 78, 78, 93, 93, 93, 93, 93, 93, 93, 93,
- 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 125, 125, 70, 70, 69, 65, 65, 65,
- 65, 65, 65, 66, 67, 68, 68, 123, 115, 115, 115, 115, 120, 71, 71, 72, 73, 94, 94,
- 94, 95, 96, 97, 98, 98, 99, 100, 101, 101, 102, 102, 103, 126, 126, 104, 105, 105, 124,
- 121, 121, 121, 121, 121, 106, 106, 106, 106, 106, 106, 106, 107, 108, 109, 110, 111, 112, 113};
+ 0, 56, 130, 93, 93, 132, 131, 94, 94, 94, 94, 94, 94, 100, 95, 96, 103, 103,
+ 103, 103, 97, 98, 99, 101, 101, 65, 65, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 57, 57, 57, 57, 62, 59, 59, 59, 59, 59, 59, 60, 60, 60, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 80, 81, 82, 83, 85,
+ 86, 87, 68, 69, 70, 71, 73, 77, 78, 72, 72, 74, 74, 75, 75, 76, 76, 84,
+ 84, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 128, 128, 104, 104, 106, 105, 105, 105, 105, 105, 105, 107, 108, 109, 109, 66,
+ 58, 58, 58, 58, 63, 110, 110, 111, 112, 113, 113, 113, 114, 115, 116, 117, 117, 118,
+ 119, 79, 79, 89, 89, 90, 129, 129, 91, 92, 92, 67, 64, 64, 64, 64, 64, 120,
+ 120, 120, 120, 120, 120, 120, 121, 122, 123, 124, 125, 126, 127};
const signed char PipelineParserGen::yyr2_[] = {
- 0, 2, 3, 0, 4, 0, 2, 1, 1, 1, 1, 1, 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, 0, 2, 1, 1, 4, 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};
+ 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, 0, 2, 1, 1, 4, 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};
#if YYDEBUG
@@ -3003,12 +3050,14 @@ const char* const PipelineParserGen::yytname_[] = {"\"EOF\"",
"BOOL_TRUE",
"BOOL_FALSE",
"STAGE_INHIBIT_OPTIMIZATION",
- "STAGE_UNION_WITH",
- "STAGE_SKIP",
"STAGE_LIMIT",
"STAGE_PROJECT",
+ "STAGE_SAMPLE",
+ "STAGE_SKIP",
+ "STAGE_UNION_WITH",
"COLL_ARG",
"PIPELINE_ARG",
+ "SIZE_ARG",
"ADD",
"ATAN2",
"AND",
@@ -3043,45 +3092,62 @@ const char* const PipelineParserGen::yytname_[] = {"\"EOF\"",
"MIN_KEY",
"MAX_KEY",
"$accept",
+ "projectionFieldname",
+ "expressionFieldname",
+ "stageAsUserFieldname",
+ "argAsUserFieldname",
+ "aggExprAsUserFieldname",
+ "invariableUserFieldname",
+ "idAsUserFieldname",
+ "valueFieldname",
+ "projectField",
+ "expressionField",
+ "valueField",
+ "dbPointer",
+ "javascript",
+ "symbol",
+ "javascriptWScope",
+ "int",
+ "timestamp",
+ "long",
+ "double",
+ "decimal",
+ "minKey",
+ "maxKey",
+ "value",
+ "string",
+ "binary",
+ "undefined",
+ "objectId",
+ "bool",
+ "date",
+ "null",
+ "regex",
+ "simpleValue",
+ "compoundValue",
+ "valueArray",
+ "valueObject",
+ "valueFields",
"stageList",
"stage",
"inhibitOptimization",
"unionWith",
- "num",
"skip",
"limit",
"project",
+ "sample",
"projectFields",
"projection",
+ "num",
+ "expression",
"compoundExpression",
+ "exprFixedTwoArg",
"expressionArray",
"expressionObject",
"expressionFields",
- "exprFixedTwoArg",
- "expression",
"maths",
"add",
"atan2",
- "string",
- "binary",
- "undefined",
- "objectId",
- "bool",
- "date",
- "null",
- "regex",
- "dbPointer",
- "javascript",
- "symbol",
- "javascriptWScope",
- "int",
- "timestamp",
- "long",
- "double",
- "decimal",
- "minKey",
- "maxKey",
- "simpleValue",
"boolExps",
"and",
"or",
@@ -3089,11 +3155,6 @@ const char* const PipelineParserGen::yytname_[] = {"\"EOF\"",
"literalEscapes",
"const",
"literal",
- "value",
- "compoundValue",
- "valueArray",
- "valueObject",
- "valueFields",
"compExprs",
"cmp",
"eq",
@@ -3102,17 +3163,6 @@ const char* const PipelineParserGen::yytname_[] = {"\"EOF\"",
"lt",
"lte",
"ne",
- "projectionFieldname",
- "expressionFieldname",
- "stageAsUserFieldname",
- "argAsUserFieldname",
- "aggExprAsUserFieldname",
- "invariableUserFieldname",
- "idAsUserFieldname",
- "valueFieldname",
- "projectField",
- "expressionField",
- "valueField",
"expressions",
"values",
"pipeline",
@@ -3122,15 +3172,16 @@ const char* const PipelineParserGen::yytname_[] = {"\"EOF\"",
const short PipelineParserGen::yyrline_[] = {
- 0, 198, 198, 204, 205, 213, 213, 216, 216, 216, 216, 216, 220, 226, 236, 236, 236, 236, 240,
- 245, 250, 256, 259, 266, 269, 275, 276, 279, 282, 285, 288, 291, 294, 297, 300, 303, 306, 310,
- 310, 310, 310, 314, 322, 325, 328, 331, 334, 343, 346, 354, 357, 360, 363, 366, 369, 372, 375,
- 378, 381, 384, 387, 390, 393, 399, 405, 411, 417, 423, 429, 435, 441, 447, 453, 459, 465, 471,
- 477, 483, 486, 492, 495, 501, 504, 510, 513, 519, 522, 528, 529, 530, 531, 532, 533, 534, 535,
- 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 553, 554, 561, 561, 565, 570, 570, 570,
- 570, 570, 570, 576, 584, 590, 593, 600, 607, 607, 607, 607, 611, 617, 618, 622, 632, 639, 639,
- 639, 643, 653, 663, 670, 670, 674, 681, 688, 688, 692, 692, 696, 702, 703, 710, 716, 719, 726,
- 733, 734, 735, 736, 737, 740, 740, 740, 740, 740, 740, 740, 742, 747, 752, 757, 762, 767, 772};
+ 0, 211, 211, 217, 218, 226, 226, 229, 229, 229, 229, 229, 229, 232, 242, 248, 258, 258,
+ 258, 258, 262, 267, 272, 278, 281, 288, 291, 297, 298, 301, 304, 307, 310, 313, 316, 319,
+ 322, 325, 328, 332, 332, 332, 332, 336, 344, 347, 350, 353, 356, 359, 368, 371, 374, 382,
+ 385, 388, 391, 394, 397, 400, 403, 406, 409, 412, 415, 418, 421, 428, 434, 440, 446, 452,
+ 458, 464, 470, 476, 482, 488, 494, 500, 506, 512, 515, 521, 524, 530, 533, 539, 542, 548,
+ 551, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 582, 583, 590, 590, 594, 599, 599, 599, 599, 599, 599, 605, 613, 619, 622, 629,
+ 636, 636, 636, 636, 640, 646, 647, 651, 661, 668, 668, 668, 672, 682, 692, 699, 699, 703,
+ 710, 717, 717, 721, 721, 725, 731, 732, 739, 745, 748, 755, 762, 763, 764, 765, 766, 769,
+ 769, 769, 769, 769, 769, 769, 771, 776, 781, 786, 791, 796, 801};
// Print the state stack on the debug stream.
void PipelineParserGen::yystack_print_() {
@@ -3155,6 +3206,6 @@ void PipelineParserGen::yy_reduce_print_(int yyrule) {
#line 58 "src/mongo/db/cst/pipeline_grammar.yy"
} // namespace mongo
-#line 3060 "src/mongo/db/cst/pipeline_parser_gen.cpp"
+#line 3104 "src/mongo/db/cst/pipeline_parser_gen.cpp"
-#line 777 "src/mongo/db/cst/pipeline_grammar.yy"
+#line 806 "src/mongo/db/cst/pipeline_grammar.yy"
diff --git a/src/mongo/db/cst/pipeline_parser_gen.hpp b/src/mongo/db/cst/pipeline_parser_gen.hpp
index f059f2c83a7..f5d46b567c4 100644
--- a/src/mongo/db/cst/pipeline_parser_gen.hpp
+++ b/src/mongo/db/cst/pipeline_parser_gen.hpp
@@ -374,45 +374,51 @@ public:
// SYMBOL
char dummy6[sizeof(BSONSymbol)];
+ // dbPointer
+ // javascript
+ // symbol
+ // javascriptWScope
+ // int
+ // timestamp
+ // long
+ // double
+ // decimal
+ // minKey
+ // maxKey
+ // value
+ // string
+ // binary
+ // undefined
+ // objectId
+ // bool
+ // date
+ // null
+ // regex
+ // simpleValue
+ // compoundValue
+ // valueArray
+ // valueObject
+ // valueFields
// stageList
// stage
// inhibitOptimization
// unionWith
- // num
// skip
// limit
// project
+ // sample
// projectFields
// projection
+ // num
+ // expression
// compoundExpression
+ // exprFixedTwoArg
// expressionArray
// expressionObject
// expressionFields
- // exprFixedTwoArg
- // expression
// maths
// add
// atan2
- // string
- // binary
- // undefined
- // objectId
- // bool
- // date
- // null
- // regex
- // dbPointer
- // javascript
- // symbol
- // javascriptWScope
- // int
- // timestamp
- // long
- // double
- // decimal
- // minKey
- // maxKey
- // simpleValue
// boolExps
// and
// or
@@ -420,11 +426,6 @@ public:
// literalEscapes
// const
// literal
- // value
- // compoundValue
- // valueArray
- // valueObject
- // valueFields
// compExprs
// cmp
// eq
@@ -541,45 +542,47 @@ public:
BOOL_TRUE = 12,
BOOL_FALSE = 13,
STAGE_INHIBIT_OPTIMIZATION = 14,
- STAGE_UNION_WITH = 15,
- STAGE_SKIP = 16,
- STAGE_LIMIT = 17,
- STAGE_PROJECT = 18,
- COLL_ARG = 19,
- PIPELINE_ARG = 20,
- ADD = 21,
- ATAN2 = 22,
- AND = 23,
- CONST_EXPR = 24,
- LITERAL = 25,
- OR = 26,
- NOT = 27,
- CMP = 28,
- EQ = 29,
- GT = 30,
- GTE = 31,
- LT = 32,
- LTE = 33,
- NE = 34,
- FIELDNAME = 35,
- STRING = 36,
- BINARY = 37,
- UNDEFINED = 38,
- OBJECT_ID = 39,
- DATE_LITERAL = 40,
- JSNULL = 41,
- REGEX = 42,
- DB_POINTER = 43,
- JAVASCRIPT = 44,
- SYMBOL = 45,
- JAVASCRIPT_W_SCOPE = 46,
- INT_NON_ZERO = 47,
- TIMESTAMP = 48,
- LONG_NON_ZERO = 49,
- DOUBLE_NON_ZERO = 50,
- DECIMAL_NON_ZERO = 51,
- MIN_KEY = 52,
- MAX_KEY = 53
+ STAGE_LIMIT = 15,
+ STAGE_PROJECT = 16,
+ STAGE_SAMPLE = 17,
+ STAGE_SKIP = 18,
+ STAGE_UNION_WITH = 19,
+ COLL_ARG = 20,
+ PIPELINE_ARG = 21,
+ SIZE_ARG = 22,
+ ADD = 23,
+ ATAN2 = 24,
+ AND = 25,
+ CONST_EXPR = 26,
+ LITERAL = 27,
+ OR = 28,
+ NOT = 29,
+ CMP = 30,
+ EQ = 31,
+ GT = 32,
+ GTE = 33,
+ LT = 34,
+ LTE = 35,
+ NE = 36,
+ FIELDNAME = 37,
+ STRING = 38,
+ BINARY = 39,
+ UNDEFINED = 40,
+ OBJECT_ID = 41,
+ DATE_LITERAL = 42,
+ JSNULL = 43,
+ REGEX = 44,
+ DB_POINTER = 45,
+ JAVASCRIPT = 46,
+ SYMBOL = 47,
+ JAVASCRIPT_W_SCOPE = 48,
+ INT_NON_ZERO = 49,
+ TIMESTAMP = 50,
+ LONG_NON_ZERO = 51,
+ DOUBLE_NON_ZERO = 52,
+ DECIMAL_NON_ZERO = 53,
+ MIN_KEY = 54,
+ MAX_KEY = 55
};
};
@@ -803,160 +806,161 @@ public:
// Type destructor.
switch (yytype) {
- case 37: // BINARY
+ case 39: // BINARY
value.template destroy<BSONBinData>();
break;
- case 44: // JAVASCRIPT
+ case 46: // JAVASCRIPT
value.template destroy<BSONCode>();
break;
- case 46: // JAVASCRIPT_W_SCOPE
+ case 48: // JAVASCRIPT_W_SCOPE
value.template destroy<BSONCodeWScope>();
break;
- case 43: // DB_POINTER
+ case 45: // DB_POINTER
value.template destroy<BSONDBRef>();
break;
- case 42: // REGEX
+ case 44: // REGEX
value.template destroy<BSONRegEx>();
break;
- case 45: // SYMBOL
+ case 47: // SYMBOL
value.template destroy<BSONSymbol>();
break;
- case 55: // stageList
- case 56: // stage
- case 57: // inhibitOptimization
- case 58: // unionWith
- case 59: // num
- case 60: // skip
- case 61: // limit
- case 62: // project
- case 63: // projectFields
- case 64: // projection
- case 65: // compoundExpression
- case 66: // expressionArray
- case 67: // expressionObject
- case 68: // expressionFields
- case 69: // exprFixedTwoArg
- case 70: // expression
- case 71: // maths
- case 72: // add
- case 73: // atan2
- case 74: // string
- case 75: // binary
- case 76: // undefined
- case 77: // objectId
- case 78: // bool
- case 79: // date
- case 80: // null
- case 81: // regex
- 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: // simpleValue
- case 94: // boolExps
- case 95: // and
- case 96: // or
- case 97: // not
- case 98: // literalEscapes
- case 99: // const
- case 100: // literal
- case 101: // value
- case 102: // compoundValue
- case 103: // valueArray
- case 104: // valueObject
- case 105: // valueFields
- case 106: // compExprs
- case 107: // cmp
- case 108: // eq
- case 109: // gt
- case 110: // gte
- case 111: // lt
- case 112: // lte
- case 113: // ne
+ case 68: // dbPointer
+ case 69: // javascript
+ case 70: // symbol
+ case 71: // javascriptWScope
+ case 72: // int
+ case 73: // timestamp
+ case 74: // long
+ case 75: // double
+ case 76: // decimal
+ case 77: // minKey
+ case 78: // maxKey
+ case 79: // value
+ case 80: // string
+ case 81: // binary
+ case 82: // undefined
+ case 83: // objectId
+ case 84: // bool
+ case 85: // date
+ case 86: // null
+ case 87: // regex
+ case 88: // simpleValue
+ case 89: // compoundValue
+ case 90: // valueArray
+ case 91: // valueObject
+ case 92: // valueFields
+ case 93: // stageList
+ case 94: // stage
+ case 95: // inhibitOptimization
+ case 96: // unionWith
+ case 97: // skip
+ case 98: // limit
+ case 99: // project
+ case 100: // sample
+ case 101: // projectFields
+ case 102: // projection
+ case 103: // num
+ case 104: // expression
+ case 105: // compoundExpression
+ case 106: // exprFixedTwoArg
+ case 107: // expressionArray
+ case 108: // expressionObject
+ case 109: // expressionFields
+ case 110: // maths
+ case 111: // add
+ case 112: // atan2
+ case 113: // boolExps
+ case 114: // and
+ case 115: // or
+ case 116: // not
+ case 117: // literalEscapes
+ case 118: // const
+ case 119: // literal
+ case 120: // compExprs
+ case 121: // cmp
+ case 122: // eq
+ case 123: // gt
+ case 124: // gte
+ case 125: // lt
+ case 126: // lte
+ case 127: // ne
value.template destroy<CNode>();
break;
- case 114: // projectionFieldname
- case 115: // expressionFieldname
- case 116: // stageAsUserFieldname
- case 117: // argAsUserFieldname
- case 118: // aggExprAsUserFieldname
- case 119: // invariableUserFieldname
- case 120: // idAsUserFieldname
- case 121: // valueFieldname
+ case 57: // projectionFieldname
+ case 58: // expressionFieldname
+ case 59: // stageAsUserFieldname
+ case 60: // argAsUserFieldname
+ case 61: // aggExprAsUserFieldname
+ case 62: // invariableUserFieldname
+ case 63: // idAsUserFieldname
+ case 64: // valueFieldname
value.template destroy<CNode::Fieldname>();
break;
- case 40: // DATE_LITERAL
+ case 42: // DATE_LITERAL
value.template destroy<Date_t>();
break;
- case 51: // DECIMAL_NON_ZERO
+ case 53: // DECIMAL_NON_ZERO
value.template destroy<Decimal128>();
break;
- case 39: // OBJECT_ID
+ case 41: // OBJECT_ID
value.template destroy<OID>();
break;
- case 48: // TIMESTAMP
+ case 50: // TIMESTAMP
value.template destroy<Timestamp>();
break;
- case 53: // MAX_KEY
+ case 55: // MAX_KEY
value.template destroy<UserMaxKey>();
break;
- case 52: // MIN_KEY
+ case 54: // MIN_KEY
value.template destroy<UserMinKey>();
break;
- case 41: // JSNULL
+ case 43: // JSNULL
value.template destroy<UserNull>();
break;
- case 38: // UNDEFINED
+ case 40: // UNDEFINED
value.template destroy<UserUndefined>();
break;
- case 50: // DOUBLE_NON_ZERO
+ case 52: // DOUBLE_NON_ZERO
value.template destroy<double>();
break;
- case 47: // INT_NON_ZERO
+ case 49: // INT_NON_ZERO
value.template destroy<int>();
break;
- case 49: // LONG_NON_ZERO
+ case 51: // LONG_NON_ZERO
value.template destroy<long long>();
break;
- case 122: // projectField
- case 123: // expressionField
- case 124: // valueField
+ case 65: // projectField
+ case 66: // expressionField
+ case 67: // valueField
value.template destroy<std::pair<CNode::Fieldname, CNode>>();
break;
- case 35: // FIELDNAME
- case 36: // STRING
+ case 37: // FIELDNAME
+ case 38: // STRING
value.template destroy<std::string>();
break;
- case 125: // expressions
- case 126: // values
+ case 128: // expressions
+ case 129: // values
value.template destroy<std::vector<CNode>>();
break;
@@ -1032,37 +1036,37 @@ public:
/// Constructor for valueless symbols, and symbols from each type.
#if 201103L <= YY_CPLUSPLUS
symbol_type(int tok, location_type l) : super_type(token_type(tok), std::move(l)) {
- YY_ASSERT(tok == token::END_OF_FILE || tok == token::START_OBJECT ||
- tok == token::END_OBJECT || tok == token::START_ARRAY ||
- tok == token::END_ARRAY || tok == token::ID || tok == token::INT_ZERO ||
- tok == token::LONG_ZERO || tok == token::DOUBLE_ZERO ||
- tok == token::DECIMAL_ZERO || tok == token::BOOL_TRUE ||
- tok == token::BOOL_FALSE || tok == token::STAGE_INHIBIT_OPTIMIZATION ||
- tok == token::STAGE_UNION_WITH || tok == token::STAGE_SKIP ||
- tok == token::STAGE_LIMIT || tok == token::STAGE_PROJECT ||
- tok == token::COLL_ARG || tok == token::PIPELINE_ARG || tok == token::ADD ||
- tok == token::ATAN2 || tok == token::AND || tok == token::CONST_EXPR ||
- tok == token::LITERAL || tok == token::OR || tok == token::NOT ||
- tok == token::CMP || tok == token::EQ || tok == token::GT ||
- tok == token::GTE || tok == token::LT || tok == token::LTE ||
- tok == token::NE);
+ YY_ASSERT(
+ tok == token::END_OF_FILE || tok == token::START_OBJECT ||
+ tok == token::END_OBJECT || tok == token::START_ARRAY || tok == token::END_ARRAY ||
+ tok == token::ID || tok == token::INT_ZERO || tok == token::LONG_ZERO ||
+ tok == token::DOUBLE_ZERO || tok == token::DECIMAL_ZERO ||
+ tok == token::BOOL_TRUE || tok == token::BOOL_FALSE ||
+ tok == token::STAGE_INHIBIT_OPTIMIZATION || tok == token::STAGE_LIMIT ||
+ tok == token::STAGE_PROJECT || tok == token::STAGE_SAMPLE ||
+ tok == token::STAGE_SKIP || tok == token::STAGE_UNION_WITH ||
+ tok == token::COLL_ARG || tok == token::PIPELINE_ARG || tok == token::SIZE_ARG ||
+ tok == token::ADD || tok == token::ATAN2 || tok == token::AND ||
+ tok == token::CONST_EXPR || tok == token::LITERAL || tok == token::OR ||
+ tok == token::NOT || tok == token::CMP || tok == token::EQ || tok == token::GT ||
+ tok == token::GTE || tok == token::LT || tok == token::LTE || tok == token::NE);
}
#else
symbol_type(int tok, const location_type& l) : super_type(token_type(tok), l) {
- YY_ASSERT(tok == token::END_OF_FILE || tok == token::START_OBJECT ||
- tok == token::END_OBJECT || tok == token::START_ARRAY ||
- tok == token::END_ARRAY || tok == token::ID || tok == token::INT_ZERO ||
- tok == token::LONG_ZERO || tok == token::DOUBLE_ZERO ||
- tok == token::DECIMAL_ZERO || tok == token::BOOL_TRUE ||
- tok == token::BOOL_FALSE || tok == token::STAGE_INHIBIT_OPTIMIZATION ||
- tok == token::STAGE_UNION_WITH || tok == token::STAGE_SKIP ||
- tok == token::STAGE_LIMIT || tok == token::STAGE_PROJECT ||
- tok == token::COLL_ARG || tok == token::PIPELINE_ARG || tok == token::ADD ||
- tok == token::ATAN2 || tok == token::AND || tok == token::CONST_EXPR ||
- tok == token::LITERAL || tok == token::OR || tok == token::NOT ||
- tok == token::CMP || tok == token::EQ || tok == token::GT ||
- tok == token::GTE || tok == token::LT || tok == token::LTE ||
- tok == token::NE);
+ YY_ASSERT(
+ tok == token::END_OF_FILE || tok == token::START_OBJECT ||
+ tok == token::END_OBJECT || tok == token::START_ARRAY || tok == token::END_ARRAY ||
+ tok == token::ID || tok == token::INT_ZERO || tok == token::LONG_ZERO ||
+ tok == token::DOUBLE_ZERO || tok == token::DECIMAL_ZERO ||
+ tok == token::BOOL_TRUE || tok == token::BOOL_FALSE ||
+ tok == token::STAGE_INHIBIT_OPTIMIZATION || tok == token::STAGE_LIMIT ||
+ tok == token::STAGE_PROJECT || tok == token::STAGE_SAMPLE ||
+ tok == token::STAGE_SKIP || tok == token::STAGE_UNION_WITH ||
+ tok == token::COLL_ARG || tok == token::PIPELINE_ARG || tok == token::SIZE_ARG ||
+ tok == token::ADD || tok == token::ATAN2 || tok == token::AND ||
+ tok == token::CONST_EXPR || tok == token::LITERAL || tok == token::OR ||
+ tok == token::NOT || tok == token::CMP || tok == token::EQ || tok == token::GT ||
+ tok == token::GTE || tok == token::LT || tok == token::LTE || tok == token::NE);
}
#endif
#if 201103L <= YY_CPLUSPLUS
@@ -1418,39 +1422,48 @@ public:
}
#endif
#if 201103L <= YY_CPLUSPLUS
- static symbol_type make_STAGE_UNION_WITH(location_type l) {
- return symbol_type(token::STAGE_UNION_WITH, std::move(l));
+ static symbol_type make_STAGE_LIMIT(location_type l) {
+ return symbol_type(token::STAGE_LIMIT, std::move(l));
}
#else
- static symbol_type make_STAGE_UNION_WITH(const location_type& l) {
- return symbol_type(token::STAGE_UNION_WITH, l);
+ static symbol_type make_STAGE_LIMIT(const location_type& l) {
+ return symbol_type(token::STAGE_LIMIT, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
- static symbol_type make_STAGE_SKIP(location_type l) {
- return symbol_type(token::STAGE_SKIP, std::move(l));
+ static symbol_type make_STAGE_PROJECT(location_type l) {
+ return symbol_type(token::STAGE_PROJECT, std::move(l));
}
#else
- static symbol_type make_STAGE_SKIP(const location_type& l) {
- return symbol_type(token::STAGE_SKIP, l);
+ static symbol_type make_STAGE_PROJECT(const location_type& l) {
+ return symbol_type(token::STAGE_PROJECT, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
- static symbol_type make_STAGE_LIMIT(location_type l) {
- return symbol_type(token::STAGE_LIMIT, std::move(l));
+ static symbol_type make_STAGE_SAMPLE(location_type l) {
+ return symbol_type(token::STAGE_SAMPLE, std::move(l));
}
#else
- static symbol_type make_STAGE_LIMIT(const location_type& l) {
- return symbol_type(token::STAGE_LIMIT, l);
+ static symbol_type make_STAGE_SAMPLE(const location_type& l) {
+ return symbol_type(token::STAGE_SAMPLE, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
- static symbol_type make_STAGE_PROJECT(location_type l) {
- return symbol_type(token::STAGE_PROJECT, std::move(l));
+ static symbol_type make_STAGE_SKIP(location_type l) {
+ return symbol_type(token::STAGE_SKIP, std::move(l));
}
#else
- static symbol_type make_STAGE_PROJECT(const location_type& l) {
- return symbol_type(token::STAGE_PROJECT, l);
+ static symbol_type make_STAGE_SKIP(const location_type& l) {
+ return symbol_type(token::STAGE_SKIP, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_STAGE_UNION_WITH(location_type l) {
+ return symbol_type(token::STAGE_UNION_WITH, std::move(l));
+ }
+#else
+ static symbol_type make_STAGE_UNION_WITH(const location_type& l) {
+ return symbol_type(token::STAGE_UNION_WITH, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
@@ -1472,6 +1485,15 @@ public:
}
#endif
#if 201103L <= YY_CPLUSPLUS
+ static symbol_type make_SIZE_ARG(location_type l) {
+ return symbol_type(token::SIZE_ARG, std::move(l));
+ }
+#else
+ static symbol_type make_SIZE_ARG(const location_type& l) {
+ return symbol_type(token::SIZE_ARG, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
static symbol_type make_ADD(location_type l) {
return symbol_type(token::ADD, std::move(l));
}
@@ -2040,10 +2062,10 @@ private:
/// Constants.
enum {
yyeof_ = 0,
- yylast_ = 284, ///< Last index in yytable_.
- yynnts_ = 76, ///< Number of nonterminal symbols.
+ yylast_ = 292, ///< Last index in yytable_.
+ yynnts_ = 77, ///< Number of nonterminal symbols.
yyfinal_ = 5, ///< Termination state number.
- yyntokens_ = 54 ///< Number of tokens.
+ yyntokens_ = 56 ///< Number of tokens.
};
@@ -2062,160 +2084,161 @@ template <typename Base>
PipelineParserGen::basic_symbol<Base>::basic_symbol(basic_symbol&& that)
: Base(std::move(that)), value(), location(std::move(that.location)) {
switch (this->type_get()) {
- case 37: // BINARY
+ case 39: // BINARY
value.move<BSONBinData>(std::move(that.value));
break;
- case 44: // JAVASCRIPT
+ case 46: // JAVASCRIPT
value.move<BSONCode>(std::move(that.value));
break;
- case 46: // JAVASCRIPT_W_SCOPE
+ case 48: // JAVASCRIPT_W_SCOPE
value.move<BSONCodeWScope>(std::move(that.value));
break;
- case 43: // DB_POINTER
+ case 45: // DB_POINTER
value.move<BSONDBRef>(std::move(that.value));
break;
- case 42: // REGEX
+ case 44: // REGEX
value.move<BSONRegEx>(std::move(that.value));
break;
- case 45: // SYMBOL
+ case 47: // SYMBOL
value.move<BSONSymbol>(std::move(that.value));
break;
- case 55: // stageList
- case 56: // stage
- case 57: // inhibitOptimization
- case 58: // unionWith
- case 59: // num
- case 60: // skip
- case 61: // limit
- case 62: // project
- case 63: // projectFields
- case 64: // projection
- case 65: // compoundExpression
- case 66: // expressionArray
- case 67: // expressionObject
- case 68: // expressionFields
- case 69: // exprFixedTwoArg
- case 70: // expression
- case 71: // maths
- case 72: // add
- case 73: // atan2
- case 74: // string
- case 75: // binary
- case 76: // undefined
- case 77: // objectId
- case 78: // bool
- case 79: // date
- case 80: // null
- case 81: // regex
- 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: // simpleValue
- case 94: // boolExps
- case 95: // and
- case 96: // or
- case 97: // not
- case 98: // literalEscapes
- case 99: // const
- case 100: // literal
- case 101: // value
- case 102: // compoundValue
- case 103: // valueArray
- case 104: // valueObject
- case 105: // valueFields
- case 106: // compExprs
- case 107: // cmp
- case 108: // eq
- case 109: // gt
- case 110: // gte
- case 111: // lt
- case 112: // lte
- case 113: // ne
+ case 68: // dbPointer
+ case 69: // javascript
+ case 70: // symbol
+ case 71: // javascriptWScope
+ case 72: // int
+ case 73: // timestamp
+ case 74: // long
+ case 75: // double
+ case 76: // decimal
+ case 77: // minKey
+ case 78: // maxKey
+ case 79: // value
+ case 80: // string
+ case 81: // binary
+ case 82: // undefined
+ case 83: // objectId
+ case 84: // bool
+ case 85: // date
+ case 86: // null
+ case 87: // regex
+ case 88: // simpleValue
+ case 89: // compoundValue
+ case 90: // valueArray
+ case 91: // valueObject
+ case 92: // valueFields
+ case 93: // stageList
+ case 94: // stage
+ case 95: // inhibitOptimization
+ case 96: // unionWith
+ case 97: // skip
+ case 98: // limit
+ case 99: // project
+ case 100: // sample
+ case 101: // projectFields
+ case 102: // projection
+ case 103: // num
+ case 104: // expression
+ case 105: // compoundExpression
+ case 106: // exprFixedTwoArg
+ case 107: // expressionArray
+ case 108: // expressionObject
+ case 109: // expressionFields
+ case 110: // maths
+ case 111: // add
+ case 112: // atan2
+ case 113: // boolExps
+ case 114: // and
+ case 115: // or
+ case 116: // not
+ case 117: // literalEscapes
+ case 118: // const
+ case 119: // literal
+ case 120: // compExprs
+ case 121: // cmp
+ case 122: // eq
+ case 123: // gt
+ case 124: // gte
+ case 125: // lt
+ case 126: // lte
+ case 127: // ne
value.move<CNode>(std::move(that.value));
break;
- case 114: // projectionFieldname
- case 115: // expressionFieldname
- case 116: // stageAsUserFieldname
- case 117: // argAsUserFieldname
- case 118: // aggExprAsUserFieldname
- case 119: // invariableUserFieldname
- case 120: // idAsUserFieldname
- case 121: // valueFieldname
+ case 57: // projectionFieldname
+ case 58: // expressionFieldname
+ case 59: // stageAsUserFieldname
+ case 60: // argAsUserFieldname
+ case 61: // aggExprAsUserFieldname
+ case 62: // invariableUserFieldname
+ case 63: // idAsUserFieldname
+ case 64: // valueFieldname
value.move<CNode::Fieldname>(std::move(that.value));
break;
- case 40: // DATE_LITERAL
+ case 42: // DATE_LITERAL
value.move<Date_t>(std::move(that.value));
break;
- case 51: // DECIMAL_NON_ZERO
+ case 53: // DECIMAL_NON_ZERO
value.move<Decimal128>(std::move(that.value));
break;
- case 39: // OBJECT_ID
+ case 41: // OBJECT_ID
value.move<OID>(std::move(that.value));
break;
- case 48: // TIMESTAMP
+ case 50: // TIMESTAMP
value.move<Timestamp>(std::move(that.value));
break;
- case 53: // MAX_KEY
+ case 55: // MAX_KEY
value.move<UserMaxKey>(std::move(that.value));
break;
- case 52: // MIN_KEY
+ case 54: // MIN_KEY
value.move<UserMinKey>(std::move(that.value));
break;
- case 41: // JSNULL
+ case 43: // JSNULL
value.move<UserNull>(std::move(that.value));
break;
- case 38: // UNDEFINED
+ case 40: // UNDEFINED
value.move<UserUndefined>(std::move(that.value));
break;
- case 50: // DOUBLE_NON_ZERO
+ case 52: // DOUBLE_NON_ZERO
value.move<double>(std::move(that.value));
break;
- case 47: // INT_NON_ZERO
+ case 49: // INT_NON_ZERO
value.move<int>(std::move(that.value));
break;
- case 49: // LONG_NON_ZERO
+ case 51: // LONG_NON_ZERO
value.move<long long>(std::move(that.value));
break;
- case 122: // projectField
- case 123: // expressionField
- case 124: // valueField
+ case 65: // projectField
+ case 66: // expressionField
+ case 67: // valueField
value.move<std::pair<CNode::Fieldname, CNode>>(std::move(that.value));
break;
- case 35: // FIELDNAME
- case 36: // STRING
+ case 37: // FIELDNAME
+ case 38: // STRING
value.move<std::string>(std::move(that.value));
break;
- case 125: // expressions
- case 126: // values
+ case 128: // expressions
+ case 129: // values
value.move<std::vector<CNode>>(std::move(that.value));
break;
@@ -2229,160 +2252,161 @@ template <typename Base>
PipelineParserGen::basic_symbol<Base>::basic_symbol(const basic_symbol& that)
: Base(that), value(), location(that.location) {
switch (this->type_get()) {
- case 37: // BINARY
+ case 39: // BINARY
value.copy<BSONBinData>(YY_MOVE(that.value));
break;
- case 44: // JAVASCRIPT
+ case 46: // JAVASCRIPT
value.copy<BSONCode>(YY_MOVE(that.value));
break;
- case 46: // JAVASCRIPT_W_SCOPE
+ case 48: // JAVASCRIPT_W_SCOPE
value.copy<BSONCodeWScope>(YY_MOVE(that.value));
break;
- case 43: // DB_POINTER
+ case 45: // DB_POINTER
value.copy<BSONDBRef>(YY_MOVE(that.value));
break;
- case 42: // REGEX
+ case 44: // REGEX
value.copy<BSONRegEx>(YY_MOVE(that.value));
break;
- case 45: // SYMBOL
+ case 47: // SYMBOL
value.copy<BSONSymbol>(YY_MOVE(that.value));
break;
- case 55: // stageList
- case 56: // stage
- case 57: // inhibitOptimization
- case 58: // unionWith
- case 59: // num
- case 60: // skip
- case 61: // limit
- case 62: // project
- case 63: // projectFields
- case 64: // projection
- case 65: // compoundExpression
- case 66: // expressionArray
- case 67: // expressionObject
- case 68: // expressionFields
- case 69: // exprFixedTwoArg
- case 70: // expression
- case 71: // maths
- case 72: // add
- case 73: // atan2
- case 74: // string
- case 75: // binary
- case 76: // undefined
- case 77: // objectId
- case 78: // bool
- case 79: // date
- case 80: // null
- case 81: // regex
- 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: // simpleValue
- case 94: // boolExps
- case 95: // and
- case 96: // or
- case 97: // not
- case 98: // literalEscapes
- case 99: // const
- case 100: // literal
- case 101: // value
- case 102: // compoundValue
- case 103: // valueArray
- case 104: // valueObject
- case 105: // valueFields
- case 106: // compExprs
- case 107: // cmp
- case 108: // eq
- case 109: // gt
- case 110: // gte
- case 111: // lt
- case 112: // lte
- case 113: // ne
+ case 68: // dbPointer
+ case 69: // javascript
+ case 70: // symbol
+ case 71: // javascriptWScope
+ case 72: // int
+ case 73: // timestamp
+ case 74: // long
+ case 75: // double
+ case 76: // decimal
+ case 77: // minKey
+ case 78: // maxKey
+ case 79: // value
+ case 80: // string
+ case 81: // binary
+ case 82: // undefined
+ case 83: // objectId
+ case 84: // bool
+ case 85: // date
+ case 86: // null
+ case 87: // regex
+ case 88: // simpleValue
+ case 89: // compoundValue
+ case 90: // valueArray
+ case 91: // valueObject
+ case 92: // valueFields
+ case 93: // stageList
+ case 94: // stage
+ case 95: // inhibitOptimization
+ case 96: // unionWith
+ case 97: // skip
+ case 98: // limit
+ case 99: // project
+ case 100: // sample
+ case 101: // projectFields
+ case 102: // projection
+ case 103: // num
+ case 104: // expression
+ case 105: // compoundExpression
+ case 106: // exprFixedTwoArg
+ case 107: // expressionArray
+ case 108: // expressionObject
+ case 109: // expressionFields
+ case 110: // maths
+ case 111: // add
+ case 112: // atan2
+ case 113: // boolExps
+ case 114: // and
+ case 115: // or
+ case 116: // not
+ case 117: // literalEscapes
+ case 118: // const
+ case 119: // literal
+ case 120: // compExprs
+ case 121: // cmp
+ case 122: // eq
+ case 123: // gt
+ case 124: // gte
+ case 125: // lt
+ case 126: // lte
+ case 127: // ne
value.copy<CNode>(YY_MOVE(that.value));
break;
- case 114: // projectionFieldname
- case 115: // expressionFieldname
- case 116: // stageAsUserFieldname
- case 117: // argAsUserFieldname
- case 118: // aggExprAsUserFieldname
- case 119: // invariableUserFieldname
- case 120: // idAsUserFieldname
- case 121: // valueFieldname
+ case 57: // projectionFieldname
+ case 58: // expressionFieldname
+ case 59: // stageAsUserFieldname
+ case 60: // argAsUserFieldname
+ case 61: // aggExprAsUserFieldname
+ case 62: // invariableUserFieldname
+ case 63: // idAsUserFieldname
+ case 64: // valueFieldname
value.copy<CNode::Fieldname>(YY_MOVE(that.value));
break;
- case 40: // DATE_LITERAL
+ case 42: // DATE_LITERAL
value.copy<Date_t>(YY_MOVE(that.value));
break;
- case 51: // DECIMAL_NON_ZERO
+ case 53: // DECIMAL_NON_ZERO
value.copy<Decimal128>(YY_MOVE(that.value));
break;
- case 39: // OBJECT_ID
+ case 41: // OBJECT_ID
value.copy<OID>(YY_MOVE(that.value));
break;
- case 48: // TIMESTAMP
+ case 50: // TIMESTAMP
value.copy<Timestamp>(YY_MOVE(that.value));
break;
- case 53: // MAX_KEY
+ case 55: // MAX_KEY
value.copy<UserMaxKey>(YY_MOVE(that.value));
break;
- case 52: // MIN_KEY
+ case 54: // MIN_KEY
value.copy<UserMinKey>(YY_MOVE(that.value));
break;
- case 41: // JSNULL
+ case 43: // JSNULL
value.copy<UserNull>(YY_MOVE(that.value));
break;
- case 38: // UNDEFINED
+ case 40: // UNDEFINED
value.copy<UserUndefined>(YY_MOVE(that.value));
break;
- case 50: // DOUBLE_NON_ZERO
+ case 52: // DOUBLE_NON_ZERO
value.copy<double>(YY_MOVE(that.value));
break;
- case 47: // INT_NON_ZERO
+ case 49: // INT_NON_ZERO
value.copy<int>(YY_MOVE(that.value));
break;
- case 49: // LONG_NON_ZERO
+ case 51: // LONG_NON_ZERO
value.copy<long long>(YY_MOVE(that.value));
break;
- case 122: // projectField
- case 123: // expressionField
- case 124: // valueField
+ case 65: // projectField
+ case 66: // expressionField
+ case 67: // valueField
value.copy<std::pair<CNode::Fieldname, CNode>>(YY_MOVE(that.value));
break;
- case 35: // FIELDNAME
- case 36: // STRING
+ case 37: // FIELDNAME
+ case 38: // STRING
value.copy<std::string>(YY_MOVE(that.value));
break;
- case 125: // expressions
- case 126: // values
+ case 128: // expressions
+ case 129: // values
value.copy<std::vector<CNode>>(YY_MOVE(that.value));
break;
@@ -2401,160 +2425,161 @@ template <typename Base>
void PipelineParserGen::basic_symbol<Base>::move(basic_symbol& s) {
super_type::move(s);
switch (this->type_get()) {
- case 37: // BINARY
+ case 39: // BINARY
value.move<BSONBinData>(YY_MOVE(s.value));
break;
- case 44: // JAVASCRIPT
+ case 46: // JAVASCRIPT
value.move<BSONCode>(YY_MOVE(s.value));
break;
- case 46: // JAVASCRIPT_W_SCOPE
+ case 48: // JAVASCRIPT_W_SCOPE
value.move<BSONCodeWScope>(YY_MOVE(s.value));
break;
- case 43: // DB_POINTER
+ case 45: // DB_POINTER
value.move<BSONDBRef>(YY_MOVE(s.value));
break;
- case 42: // REGEX
+ case 44: // REGEX
value.move<BSONRegEx>(YY_MOVE(s.value));
break;
- case 45: // SYMBOL
+ case 47: // SYMBOL
value.move<BSONSymbol>(YY_MOVE(s.value));
break;
- case 55: // stageList
- case 56: // stage
- case 57: // inhibitOptimization
- case 58: // unionWith
- case 59: // num
- case 60: // skip
- case 61: // limit
- case 62: // project
- case 63: // projectFields
- case 64: // projection
- case 65: // compoundExpression
- case 66: // expressionArray
- case 67: // expressionObject
- case 68: // expressionFields
- case 69: // exprFixedTwoArg
- case 70: // expression
- case 71: // maths
- case 72: // add
- case 73: // atan2
- case 74: // string
- case 75: // binary
- case 76: // undefined
- case 77: // objectId
- case 78: // bool
- case 79: // date
- case 80: // null
- case 81: // regex
- 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: // simpleValue
- case 94: // boolExps
- case 95: // and
- case 96: // or
- case 97: // not
- case 98: // literalEscapes
- case 99: // const
- case 100: // literal
- case 101: // value
- case 102: // compoundValue
- case 103: // valueArray
- case 104: // valueObject
- case 105: // valueFields
- case 106: // compExprs
- case 107: // cmp
- case 108: // eq
- case 109: // gt
- case 110: // gte
- case 111: // lt
- case 112: // lte
- case 113: // ne
+ case 68: // dbPointer
+ case 69: // javascript
+ case 70: // symbol
+ case 71: // javascriptWScope
+ case 72: // int
+ case 73: // timestamp
+ case 74: // long
+ case 75: // double
+ case 76: // decimal
+ case 77: // minKey
+ case 78: // maxKey
+ case 79: // value
+ case 80: // string
+ case 81: // binary
+ case 82: // undefined
+ case 83: // objectId
+ case 84: // bool
+ case 85: // date
+ case 86: // null
+ case 87: // regex
+ case 88: // simpleValue
+ case 89: // compoundValue
+ case 90: // valueArray
+ case 91: // valueObject
+ case 92: // valueFields
+ case 93: // stageList
+ case 94: // stage
+ case 95: // inhibitOptimization
+ case 96: // unionWith
+ case 97: // skip
+ case 98: // limit
+ case 99: // project
+ case 100: // sample
+ case 101: // projectFields
+ case 102: // projection
+ case 103: // num
+ case 104: // expression
+ case 105: // compoundExpression
+ case 106: // exprFixedTwoArg
+ case 107: // expressionArray
+ case 108: // expressionObject
+ case 109: // expressionFields
+ case 110: // maths
+ case 111: // add
+ case 112: // atan2
+ case 113: // boolExps
+ case 114: // and
+ case 115: // or
+ case 116: // not
+ case 117: // literalEscapes
+ case 118: // const
+ case 119: // literal
+ case 120: // compExprs
+ case 121: // cmp
+ case 122: // eq
+ case 123: // gt
+ case 124: // gte
+ case 125: // lt
+ case 126: // lte
+ case 127: // ne
value.move<CNode>(YY_MOVE(s.value));
break;
- case 114: // projectionFieldname
- case 115: // expressionFieldname
- case 116: // stageAsUserFieldname
- case 117: // argAsUserFieldname
- case 118: // aggExprAsUserFieldname
- case 119: // invariableUserFieldname
- case 120: // idAsUserFieldname
- case 121: // valueFieldname
+ case 57: // projectionFieldname
+ case 58: // expressionFieldname
+ case 59: // stageAsUserFieldname
+ case 60: // argAsUserFieldname
+ case 61: // aggExprAsUserFieldname
+ case 62: // invariableUserFieldname
+ case 63: // idAsUserFieldname
+ case 64: // valueFieldname
value.move<CNode::Fieldname>(YY_MOVE(s.value));
break;
- case 40: // DATE_LITERAL
+ case 42: // DATE_LITERAL
value.move<Date_t>(YY_MOVE(s.value));
break;
- case 51: // DECIMAL_NON_ZERO
+ case 53: // DECIMAL_NON_ZERO
value.move<Decimal128>(YY_MOVE(s.value));
break;
- case 39: // OBJECT_ID
+ case 41: // OBJECT_ID
value.move<OID>(YY_MOVE(s.value));
break;
- case 48: // TIMESTAMP
+ case 50: // TIMESTAMP
value.move<Timestamp>(YY_MOVE(s.value));
break;
- case 53: // MAX_KEY
+ case 55: // MAX_KEY
value.move<UserMaxKey>(YY_MOVE(s.value));
break;
- case 52: // MIN_KEY
+ case 54: // MIN_KEY
value.move<UserMinKey>(YY_MOVE(s.value));
break;
- case 41: // JSNULL
+ case 43: // JSNULL
value.move<UserNull>(YY_MOVE(s.value));
break;
- case 38: // UNDEFINED
+ case 40: // UNDEFINED
value.move<UserUndefined>(YY_MOVE(s.value));
break;
- case 50: // DOUBLE_NON_ZERO
+ case 52: // DOUBLE_NON_ZERO
value.move<double>(YY_MOVE(s.value));
break;
- case 47: // INT_NON_ZERO
+ case 49: // INT_NON_ZERO
value.move<int>(YY_MOVE(s.value));
break;
- case 49: // LONG_NON_ZERO
+ case 51: // LONG_NON_ZERO
value.move<long long>(YY_MOVE(s.value));
break;
- case 122: // projectField
- case 123: // expressionField
- case 124: // valueField
+ case 65: // projectField
+ case 66: // expressionField
+ case 67: // valueField
value.move<std::pair<CNode::Fieldname, CNode>>(YY_MOVE(s.value));
break;
- case 35: // FIELDNAME
- case 36: // STRING
+ case 37: // FIELDNAME
+ case 38: // STRING
value.move<std::string>(YY_MOVE(s.value));
break;
- case 125: // expressions
- case 126: // values
+ case 128: // expressions
+ case 129: // values
value.move<std::vector<CNode>>(YY_MOVE(s.value));
break;
@@ -2593,7 +2618,7 @@ inline int PipelineParserGen::by_type::type_get() const YY_NOEXCEPT {
#line 58 "src/mongo/db/cst/pipeline_grammar.yy"
} // namespace mongo
-#line 3187 "src/mongo/db/cst/pipeline_parser_gen.hpp"
+#line 3224 "src/mongo/db/cst/pipeline_parser_gen.hpp"
#endif // !YY_YY_SRC_MONGO_DB_CST_PIPELINE_PARSER_GEN_HPP_INCLUDED