// A Bison parser, made by GNU Bison 3.6.
// Skeleton implementation for Bison LALR(1) parsers in C++
// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
// As a special exception, you may create a larger work that contains
// part or all of the Bison parser skeleton and distribute that work
// under terms of your choice, so long as that work isn't itself a
// parser generator using the skeleton or a modified version thereof
// as a parser skeleton. Alternatively, if you modify or redistribute
// the parser skeleton itself, you may (at your option) remove this
// special exception, which will cause the skeleton and the resulting
// Bison output files to be licensed under the GNU General Public
// License without this special exception.
// This special exception was added by the Free Software Foundation in
// version 2.2 of Bison.
// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
// especially those whose name start with YY_ or yy_. They are
// private implementation details that can be changed or removed.
#include "pipeline_parser_gen.hpp"
// Unqualified %code blocks.
#line 83 "src/mongo/db/cst/pipeline_grammar.yy"
#include "mongo/db/cst/bson_lexer.h"
#include "mongo/platform/decimal128.h"
namespace mongo {
// Mandatory error function.
void PipelineParserGen::error(const PipelineParserGen::location_type& loc, const std::string& msg) {
uasserted(ErrorCodes::FailedToParse,
str::stream() << msg << " at location " << loc.begin.line << ":" << loc.begin.column
<< " of input BSON. Lexer produced token of type "
<< lexer[loc.begin.column].type_get() << ".");
}
} // namespace mongo
#line 63 "src/mongo/db/cst/pipeline_parser_gen.cpp"
#ifndef YY_
#if defined YYENABLE_NLS && YYENABLE_NLS
#if ENABLE_NLS
#include // FIXME: INFRINGES ON USER NAME SPACE.
#define YY_(msgid) dgettext("bison-runtime", msgid)
#endif
#endif
#ifndef YY_
#define YY_(msgid) msgid
#endif
#endif
// Whether we are compiled with exception support.
#ifndef YY_EXCEPTIONS
#if defined __GNUC__ && !defined __EXCEPTIONS
#define YY_EXCEPTIONS 0
#else
#define YY_EXCEPTIONS 1
#endif
#endif
#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#ifndef YYLLOC_DEFAULT
#define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (N) { \
(Current).begin = YYRHSLOC(Rhs, 1).begin; \
(Current).end = YYRHSLOC(Rhs, N).end; \
} else { \
(Current).begin = (Current).end = YYRHSLOC(Rhs, 0).end; \
} \
while (false)
#endif
// Enable debugging if requested.
#if YYDEBUG
// A pseudo ostream that takes yydebug_ into account.
#define YYCDEBUG \
if (yydebug_) \
(*yycdebug_)
#define YY_SYMBOL_PRINT(Title, Symbol) \
do { \
if (yydebug_) { \
*yycdebug_ << Title << ' '; \
yy_print_(*yycdebug_, Symbol); \
*yycdebug_ << '\n'; \
} \
} while (false)
#define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug_) \
yy_reduce_print_(Rule); \
} while (false)
#define YY_STACK_PRINT() \
do { \
if (yydebug_) \
yy_stack_print_(); \
} while (false)
#else // !YYDEBUG
#define YYCDEBUG \
if (false) \
std::cerr
#define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol)
#define YY_REDUCE_PRINT(Rule) static_cast(0)
#define YY_STACK_PRINT() static_cast(0)
#endif // !YYDEBUG
#define yyerrok (yyerrstatus_ = 0)
#define yyclearin (yyla.clear())
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
#define YYRECOVERING() (!!yyerrstatus_)
#line 58 "src/mongo/db/cst/pipeline_grammar.yy"
namespace mongo {
#line 156 "src/mongo/db/cst/pipeline_parser_gen.cpp"
#if YYDEBUG || 0
const char* PipelineParserGen::symbol_name(symbol_kind_type yysymbol) {
return yytname_[yysymbol];
}
#endif // #if YYDEBUG || 0
/// Build a parser object.
PipelineParserGen::PipelineParserGen(BSONLexer& lexer_yyarg, CNode* cst_yyarg)
#if YYDEBUG
: yydebug_(false),
yycdebug_(&std::cerr),
#else
:
#endif
lexer(lexer_yyarg),
cst(cst_yyarg) {
}
PipelineParserGen::~PipelineParserGen() {}
PipelineParserGen::syntax_error::~syntax_error() YY_NOEXCEPT YY_NOTHROW {}
/*---------------.
| symbol kinds. |
`---------------*/
// by_state.
PipelineParserGen::by_state::by_state() YY_NOEXCEPT : state(empty_state) {}
PipelineParserGen::by_state::by_state(const by_state& that) YY_NOEXCEPT : state(that.state) {}
void PipelineParserGen::by_state::clear() YY_NOEXCEPT {
state = empty_state;
}
void PipelineParserGen::by_state::move(by_state& that) {
state = that.state;
that.clear();
}
PipelineParserGen::by_state::by_state(state_type s) YY_NOEXCEPT : state(s) {}
PipelineParserGen::symbol_kind_type PipelineParserGen::by_state::kind() const YY_NOEXCEPT {
if (state == empty_state)
return symbol_kind::S_YYEMPTY;
else
return YY_CAST(symbol_kind_type, yystos_[+state]);
}
PipelineParserGen::stack_symbol_type::stack_symbol_type() {}
PipelineParserGen::stack_symbol_type::stack_symbol_type(YY_RVREF(stack_symbol_type) that)
: super_type(YY_MOVE(that.state), YY_MOVE(that.location)) {
switch (that.kind()) {
case 68: // BINARY
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 75: // JAVASCRIPT
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 77: // JAVASCRIPT_W_SCOPE
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 74: // DB_POINTER
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 73: // REGEX
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 76: // SYMBOL
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 101: // dbPointer
case 102: // javascript
case 103: // symbol
case 104: // javascriptWScope
case 105: // int
case 106: // timestamp
case 107: // long
case 108: // double
case 109: // decimal
case 110: // minKey
case 111: // maxKey
case 112: // value
case 113: // string
case 114: // binary
case 115: // undefined
case 116: // objectId
case 117: // bool
case 118: // date
case 119: // null
case 120: // regex
case 121: // simpleValue
case 122: // compoundValue
case 123: // valueArray
case 124: // valueObject
case 125: // valueFields
case 126: // stageList
case 127: // stage
case 128: // inhibitOptimization
case 129: // unionWith
case 130: // skip
case 131: // limit
case 132: // project
case 133: // sample
case 134: // projectFields
case 135: // projection
case 136: // num
case 137: // expression
case 138: // compoundExpression
case 139: // exprFixedTwoArg
case 140: // expressionArray
case 141: // expressionObject
case 142: // expressionFields
case 143: // maths
case 144: // add
case 145: // atan2
case 146: // boolExps
case 147: // and
case 148: // or
case 149: // not
case 150: // literalEscapes
case 151: // const
case 152: // literal
case 153: // compExprs
case 154: // cmp
case 155: // eq
case 156: // gt
case 157: // gte
case 158: // lt
case 159: // lte
case 160: // ne
case 161: // typeExpression
case 162: // typeValue
case 163: // convert
case 164: // toBool
case 165: // toDate
case 166: // toDecimal
case 167: // toDouble
case 168: // toInt
case 169: // toLong
case 170: // toObjectId
case 171: // toString
case 172: // type
case 173: // abs
case 174: // ceil
case 175: // divide
case 176: // exponent
case 177: // floor
case 178: // ln
case 179: // log
case 180: // logten
case 181: // mod
case 182: // multiply
case 183: // pow
case 184: // round
case 185: // sqrt
case 186: // subtract
case 187: // trunc
case 192: // matchExpression
case 193: // filterFields
case 194: // filterVal
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 88: // projectionFieldname
case 89: // expressionFieldname
case 90: // stageAsUserFieldname
case 91: // filterFieldname
case 92: // argAsUserFieldname
case 93: // aggExprAsUserFieldname
case 94: // invariableUserFieldname
case 95: // idAsUserFieldname
case 96: // valueFieldname
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 71: // DATE_LITERAL
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 82: // DECIMAL_NON_ZERO
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 70: // OBJECT_ID
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 79: // TIMESTAMP
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 84: // MAX_KEY
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 83: // MIN_KEY
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 72: // JSNULL
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 69: // UNDEFINED
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 81: // DOUBLE_NON_ZERO
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 78: // INT_NON_ZERO
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 80: // LONG_NON_ZERO
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 97: // projectField
case 98: // expressionField
case 99: // valueField
case 100: // filterField
case 188: // onErrorArg
case 189: // onNullArg
value.YY_MOVE_OR_COPY>(YY_MOVE(that.value));
break;
case 66: // FIELDNAME
case 67: // STRING
value.YY_MOVE_OR_COPY(YY_MOVE(that.value));
break;
case 190: // expressions
case 191: // values
value.YY_MOVE_OR_COPY>(YY_MOVE(that.value));
break;
default:
break;
}
#if 201103L <= YY_CPLUSPLUS
// that is emptied.
that.state = empty_state;
#endif
}
PipelineParserGen::stack_symbol_type::stack_symbol_type(state_type s, YY_MOVE_REF(symbol_type) that)
: super_type(s, YY_MOVE(that.location)) {
switch (that.kind()) {
case 68: // BINARY
value.move(YY_MOVE(that.value));
break;
case 75: // JAVASCRIPT
value.move(YY_MOVE(that.value));
break;
case 77: // JAVASCRIPT_W_SCOPE
value.move(YY_MOVE(that.value));
break;
case 74: // DB_POINTER
value.move(YY_MOVE(that.value));
break;
case 73: // REGEX
value.move(YY_MOVE(that.value));
break;
case 76: // SYMBOL
value.move(YY_MOVE(that.value));
break;
case 101: // dbPointer
case 102: // javascript
case 103: // symbol
case 104: // javascriptWScope
case 105: // int
case 106: // timestamp
case 107: // long
case 108: // double
case 109: // decimal
case 110: // minKey
case 111: // maxKey
case 112: // value
case 113: // string
case 114: // binary
case 115: // undefined
case 116: // objectId
case 117: // bool
case 118: // date
case 119: // null
case 120: // regex
case 121: // simpleValue
case 122: // compoundValue
case 123: // valueArray
case 124: // valueObject
case 125: // valueFields
case 126: // stageList
case 127: // stage
case 128: // inhibitOptimization
case 129: // unionWith
case 130: // skip
case 131: // limit
case 132: // project
case 133: // sample
case 134: // projectFields
case 135: // projection
case 136: // num
case 137: // expression
case 138: // compoundExpression
case 139: // exprFixedTwoArg
case 140: // expressionArray
case 141: // expressionObject
case 142: // expressionFields
case 143: // maths
case 144: // add
case 145: // atan2
case 146: // boolExps
case 147: // and
case 148: // or
case 149: // not
case 150: // literalEscapes
case 151: // const
case 152: // literal
case 153: // compExprs
case 154: // cmp
case 155: // eq
case 156: // gt
case 157: // gte
case 158: // lt
case 159: // lte
case 160: // ne
case 161: // typeExpression
case 162: // typeValue
case 163: // convert
case 164: // toBool
case 165: // toDate
case 166: // toDecimal
case 167: // toDouble
case 168: // toInt
case 169: // toLong
case 170: // toObjectId
case 171: // toString
case 172: // type
case 173: // abs
case 174: // ceil
case 175: // divide
case 176: // exponent
case 177: // floor
case 178: // ln
case 179: // log
case 180: // logten
case 181: // mod
case 182: // multiply
case 183: // pow
case 184: // round
case 185: // sqrt
case 186: // subtract
case 187: // trunc
case 192: // matchExpression
case 193: // filterFields
case 194: // filterVal
value.move(YY_MOVE(that.value));
break;
case 88: // projectionFieldname
case 89: // expressionFieldname
case 90: // stageAsUserFieldname
case 91: // filterFieldname
case 92: // argAsUserFieldname
case 93: // aggExprAsUserFieldname
case 94: // invariableUserFieldname
case 95: // idAsUserFieldname
case 96: // valueFieldname
value.move(YY_MOVE(that.value));
break;
case 71: // DATE_LITERAL
value.move(YY_MOVE(that.value));
break;
case 82: // DECIMAL_NON_ZERO
value.move(YY_MOVE(that.value));
break;
case 70: // OBJECT_ID
value.move(YY_MOVE(that.value));
break;
case 79: // TIMESTAMP
value.move(YY_MOVE(that.value));
break;
case 84: // MAX_KEY
value.move(YY_MOVE(that.value));
break;
case 83: // MIN_KEY
value.move(YY_MOVE(that.value));
break;
case 72: // JSNULL
value.move(YY_MOVE(that.value));
break;
case 69: // UNDEFINED
value.move(YY_MOVE(that.value));
break;
case 81: // DOUBLE_NON_ZERO
value.move(YY_MOVE(that.value));
break;
case 78: // INT_NON_ZERO
value.move(YY_MOVE(that.value));
break;
case 80: // LONG_NON_ZERO
value.move(YY_MOVE(that.value));
break;
case 97: // projectField
case 98: // expressionField
case 99: // valueField
case 100: // filterField
case 188: // onErrorArg
case 189: // onNullArg
value.move>(YY_MOVE(that.value));
break;
case 66: // FIELDNAME
case 67: // STRING
value.move(YY_MOVE(that.value));
break;
case 190: // expressions
case 191: // values
value.move>(YY_MOVE(that.value));
break;
default:
break;
}
// that is emptied.
that.kind_ = symbol_kind::S_YYEMPTY;
}
#if YY_CPLUSPLUS < 201103L
PipelineParserGen::stack_symbol_type& PipelineParserGen::stack_symbol_type::operator=(
const stack_symbol_type& that) {
state = that.state;
switch (that.kind()) {
case 68: // BINARY
value.copy(that.value);
break;
case 75: // JAVASCRIPT
value.copy(that.value);
break;
case 77: // JAVASCRIPT_W_SCOPE
value.copy(that.value);
break;
case 74: // DB_POINTER
value.copy(that.value);
break;
case 73: // REGEX
value.copy(that.value);
break;
case 76: // SYMBOL
value.copy(that.value);
break;
case 101: // dbPointer
case 102: // javascript
case 103: // symbol
case 104: // javascriptWScope
case 105: // int
case 106: // timestamp
case 107: // long
case 108: // double
case 109: // decimal
case 110: // minKey
case 111: // maxKey
case 112: // value
case 113: // string
case 114: // binary
case 115: // undefined
case 116: // objectId
case 117: // bool
case 118: // date
case 119: // null
case 120: // regex
case 121: // simpleValue
case 122: // compoundValue
case 123: // valueArray
case 124: // valueObject
case 125: // valueFields
case 126: // stageList
case 127: // stage
case 128: // inhibitOptimization
case 129: // unionWith
case 130: // skip
case 131: // limit
case 132: // project
case 133: // sample
case 134: // projectFields
case 135: // projection
case 136: // num
case 137: // expression
case 138: // compoundExpression
case 139: // exprFixedTwoArg
case 140: // expressionArray
case 141: // expressionObject
case 142: // expressionFields
case 143: // maths
case 144: // add
case 145: // atan2
case 146: // boolExps
case 147: // and
case 148: // or
case 149: // not
case 150: // literalEscapes
case 151: // const
case 152: // literal
case 153: // compExprs
case 154: // cmp
case 155: // eq
case 156: // gt
case 157: // gte
case 158: // lt
case 159: // lte
case 160: // ne
case 161: // typeExpression
case 162: // typeValue
case 163: // convert
case 164: // toBool
case 165: // toDate
case 166: // toDecimal
case 167: // toDouble
case 168: // toInt
case 169: // toLong
case 170: // toObjectId
case 171: // toString
case 172: // type
case 173: // abs
case 174: // ceil
case 175: // divide
case 176: // exponent
case 177: // floor
case 178: // ln
case 179: // log
case 180: // logten
case 181: // mod
case 182: // multiply
case 183: // pow
case 184: // round
case 185: // sqrt
case 186: // subtract
case 187: // trunc
case 192: // matchExpression
case 193: // filterFields
case 194: // filterVal
value.copy(that.value);
break;
case 88: // projectionFieldname
case 89: // expressionFieldname
case 90: // stageAsUserFieldname
case 91: // filterFieldname
case 92: // argAsUserFieldname
case 93: // aggExprAsUserFieldname
case 94: // invariableUserFieldname
case 95: // idAsUserFieldname
case 96: // valueFieldname
value.copy(that.value);
break;
case 71: // DATE_LITERAL
value.copy(that.value);
break;
case 82: // DECIMAL_NON_ZERO
value.copy(that.value);
break;
case 70: // OBJECT_ID
value.copy(that.value);
break;
case 79: // TIMESTAMP
value.copy(that.value);
break;
case 84: // MAX_KEY
value.copy(that.value);
break;
case 83: // MIN_KEY
value.copy(that.value);
break;
case 72: // JSNULL
value.copy(that.value);
break;
case 69: // UNDEFINED
value.copy(that.value);
break;
case 81: // DOUBLE_NON_ZERO
value.copy(that.value);
break;
case 78: // INT_NON_ZERO
value.copy(that.value);
break;
case 80: // LONG_NON_ZERO
value.copy(that.value);
break;
case 97: // projectField
case 98: // expressionField
case 99: // valueField
case 100: // filterField
case 188: // onErrorArg
case 189: // onNullArg
value.copy>(that.value);
break;
case 66: // FIELDNAME
case 67: // STRING
value.copy(that.value);
break;
case 190: // expressions
case 191: // values
value.copy>(that.value);
break;
default:
break;
}
location = that.location;
return *this;
}
PipelineParserGen::stack_symbol_type& PipelineParserGen::stack_symbol_type::operator=(
stack_symbol_type& that) {
state = that.state;
switch (that.kind()) {
case 68: // BINARY
value.move(that.value);
break;
case 75: // JAVASCRIPT
value.move(that.value);
break;
case 77: // JAVASCRIPT_W_SCOPE
value.move(that.value);
break;
case 74: // DB_POINTER
value.move(that.value);
break;
case 73: // REGEX
value.move(that.value);
break;
case 76: // SYMBOL
value.move(that.value);
break;
case 101: // dbPointer
case 102: // javascript
case 103: // symbol
case 104: // javascriptWScope
case 105: // int
case 106: // timestamp
case 107: // long
case 108: // double
case 109: // decimal
case 110: // minKey
case 111: // maxKey
case 112: // value
case 113: // string
case 114: // binary
case 115: // undefined
case 116: // objectId
case 117: // bool
case 118: // date
case 119: // null
case 120: // regex
case 121: // simpleValue
case 122: // compoundValue
case 123: // valueArray
case 124: // valueObject
case 125: // valueFields
case 126: // stageList
case 127: // stage
case 128: // inhibitOptimization
case 129: // unionWith
case 130: // skip
case 131: // limit
case 132: // project
case 133: // sample
case 134: // projectFields
case 135: // projection
case 136: // num
case 137: // expression
case 138: // compoundExpression
case 139: // exprFixedTwoArg
case 140: // expressionArray
case 141: // expressionObject
case 142: // expressionFields
case 143: // maths
case 144: // add
case 145: // atan2
case 146: // boolExps
case 147: // and
case 148: // or
case 149: // not
case 150: // literalEscapes
case 151: // const
case 152: // literal
case 153: // compExprs
case 154: // cmp
case 155: // eq
case 156: // gt
case 157: // gte
case 158: // lt
case 159: // lte
case 160: // ne
case 161: // typeExpression
case 162: // typeValue
case 163: // convert
case 164: // toBool
case 165: // toDate
case 166: // toDecimal
case 167: // toDouble
case 168: // toInt
case 169: // toLong
case 170: // toObjectId
case 171: // toString
case 172: // type
case 173: // abs
case 174: // ceil
case 175: // divide
case 176: // exponent
case 177: // floor
case 178: // ln
case 179: // log
case 180: // logten
case 181: // mod
case 182: // multiply
case 183: // pow
case 184: // round
case 185: // sqrt
case 186: // subtract
case 187: // trunc
case 192: // matchExpression
case 193: // filterFields
case 194: // filterVal
value.move(that.value);
break;
case 88: // projectionFieldname
case 89: // expressionFieldname
case 90: // stageAsUserFieldname
case 91: // filterFieldname
case 92: // argAsUserFieldname
case 93: // aggExprAsUserFieldname
case 94: // invariableUserFieldname
case 95: // idAsUserFieldname
case 96: // valueFieldname
value.move(that.value);
break;
case 71: // DATE_LITERAL
value.move(that.value);
break;
case 82: // DECIMAL_NON_ZERO
value.move(that.value);
break;
case 70: // OBJECT_ID
value.move(that.value);
break;
case 79: // TIMESTAMP
value.move(that.value);
break;
case 84: // MAX_KEY
value.move(that.value);
break;
case 83: // MIN_KEY
value.move(that.value);
break;
case 72: // JSNULL
value.move(that.value);
break;
case 69: // UNDEFINED
value.move(that.value);
break;
case 81: // DOUBLE_NON_ZERO
value.move(that.value);
break;
case 78: // INT_NON_ZERO
value.move(that.value);
break;
case 80: // LONG_NON_ZERO
value.move(that.value);
break;
case 97: // projectField
case 98: // expressionField
case 99: // valueField
case 100: // filterField
case 188: // onErrorArg
case 189: // onNullArg
value.move>(that.value);
break;
case 66: // FIELDNAME
case 67: // STRING
value.move(that.value);
break;
case 190: // expressions
case 191: // values
value.move>(that.value);
break;
default:
break;
}
location = that.location;
// that is emptied.
that.state = empty_state;
return *this;
}
#endif
template
void PipelineParserGen::yy_destroy_(const char* yymsg, basic_symbol& yysym) const {
if (yymsg)
YY_SYMBOL_PRINT(yymsg, yysym);
}
#if YYDEBUG
template
void PipelineParserGen::yy_print_(std::ostream& yyo, const basic_symbol& yysym) const {
std::ostream& yyoutput = yyo;
YYUSE(yyoutput);
if (yysym.empty())
yyo << "empty symbol";
else {
symbol_kind_type yykind = yysym.kind();
yyo << (yykind < YYNTOKENS ? "token" : "nterm") << ' ' << symbol_name(yykind) << " ("
<< yysym.location << ": ";
YYUSE(yykind);
yyo << ')';
}
}
#endif
void PipelineParserGen::yypush_(const char* m, YY_MOVE_REF(stack_symbol_type) sym) {
if (m)
YY_SYMBOL_PRINT(m, sym);
yystack_.push(YY_MOVE(sym));
}
void PipelineParserGen::yypush_(const char* m, state_type s, YY_MOVE_REF(symbol_type) sym) {
#if 201103L <= YY_CPLUSPLUS
yypush_(m, stack_symbol_type(s, std::move(sym)));
#else
stack_symbol_type ss(s, sym);
yypush_(m, ss);
#endif
}
void PipelineParserGen::yypop_(int n) {
yystack_.pop(n);
}
#if YYDEBUG
std::ostream& PipelineParserGen::debug_stream() const {
return *yycdebug_;
}
void PipelineParserGen::set_debug_stream(std::ostream& o) {
yycdebug_ = &o;
}
PipelineParserGen::debug_level_type PipelineParserGen::debug_level() const {
return yydebug_;
}
void PipelineParserGen::set_debug_level(debug_level_type l) {
yydebug_ = l;
}
#endif // YYDEBUG
PipelineParserGen::state_type PipelineParserGen::yy_lr_goto_state_(state_type yystate, int yysym) {
int yyr = yypgoto_[yysym - YYNTOKENS] + yystate;
if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
return yytable_[yyr];
else
return yydefgoto_[yysym - YYNTOKENS];
}
bool PipelineParserGen::yy_pact_value_is_default_(int yyvalue) {
return yyvalue == yypact_ninf_;
}
bool PipelineParserGen::yy_table_value_is_error_(int yyvalue) {
return yyvalue == yytable_ninf_;
}
int PipelineParserGen::operator()() {
return parse();
}
int PipelineParserGen::parse() {
int yyn;
/// Length of the RHS of the rule being reduced.
int yylen = 0;
// Error handling.
int yynerrs_ = 0;
int yyerrstatus_ = 0;
/// The lookahead symbol.
symbol_type yyla;
/// The locations where the error started and ended.
stack_symbol_type yyerror_range[3];
/// The return value of parse ().
int yyresult;
#if YY_EXCEPTIONS
try
#endif // YY_EXCEPTIONS
{
YYCDEBUG << "Starting parse\n";
/* Initialize the stack. The initial state will be set in
yynewstate, since the latter expects the semantical and the
location values to have been already stored, initialize these
stacks with a primary value. */
yystack_.clear();
yypush_(YY_NULLPTR, 0, YY_MOVE(yyla));
/*-----------------------------------------------.
| yynewstate -- push a new symbol on the stack. |
`-----------------------------------------------*/
yynewstate:
YYCDEBUG << "Entering state " << int(yystack_[0].state) << '\n';
YY_STACK_PRINT();
// Accept?
if (yystack_[0].state == yyfinal_)
YYACCEPT;
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
// Try to take a decision without lookahead.
yyn = yypact_[+yystack_[0].state];
if (yy_pact_value_is_default_(yyn))
goto yydefault;
// Read a lookahead token.
if (yyla.empty()) {
YYCDEBUG << "Reading a token\n";
#if YY_EXCEPTIONS
try
#endif // YY_EXCEPTIONS
{
symbol_type yylookahead(yylex(lexer));
yyla.move(yylookahead);
}
#if YY_EXCEPTIONS
catch (const syntax_error& yyexc) {
YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
error(yyexc);
goto yyerrlab1;
}
#endif // YY_EXCEPTIONS
}
YY_SYMBOL_PRINT("Next token is", yyla);
if (yyla.kind() == symbol_kind::S_YYerror) {
// The scanner already issued an error message, process directly
// to error recovery. But do not keep the error token as
// lookahead, it is too special and may lead us to an endless
// loop in error recovery. */
yyla.kind_ = symbol_kind::S_YYUNDEF;
goto yyerrlab1;
}
/* If the proper action on seeing token YYLA.TYPE is to reduce or
to detect an error, take that action. */
yyn += yyla.kind();
if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind()) {
goto yydefault;
}
// Reduce or error.
yyn = yytable_[yyn];
if (yyn <= 0) {
if (yy_table_value_is_error_(yyn))
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
// Count tokens shifted since error; after three, turn off error status.
if (yyerrstatus_)
--yyerrstatus_;
// Shift the lookahead token.
yypush_("Shifting", state_type(yyn), YY_MOVE(yyla));
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact_[+yystack_[0].state];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- do a reduction. |
`-----------------------------*/
yyreduce:
yylen = yyr2_[yyn];
{
stack_symbol_type yylhs;
yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);
/* Variants are always initialized to an empty instance of the
correct type. The default '$$ = $1' action is NOT applied
when using variants. */
switch (yyr1_[yyn]) {
case 68: // BINARY
yylhs.value.emplace();
break;
case 75: // JAVASCRIPT
yylhs.value.emplace();
break;
case 77: // JAVASCRIPT_W_SCOPE
yylhs.value.emplace();
break;
case 74: // DB_POINTER
yylhs.value.emplace();
break;
case 73: // REGEX
yylhs.value.emplace();
break;
case 76: // SYMBOL
yylhs.value.emplace();
break;
case 101: // dbPointer
case 102: // javascript
case 103: // symbol
case 104: // javascriptWScope
case 105: // int
case 106: // timestamp
case 107: // long
case 108: // double
case 109: // decimal
case 110: // minKey
case 111: // maxKey
case 112: // value
case 113: // string
case 114: // binary
case 115: // undefined
case 116: // objectId
case 117: // bool
case 118: // date
case 119: // null
case 120: // regex
case 121: // simpleValue
case 122: // compoundValue
case 123: // valueArray
case 124: // valueObject
case 125: // valueFields
case 126: // stageList
case 127: // stage
case 128: // inhibitOptimization
case 129: // unionWith
case 130: // skip
case 131: // limit
case 132: // project
case 133: // sample
case 134: // projectFields
case 135: // projection
case 136: // num
case 137: // expression
case 138: // compoundExpression
case 139: // exprFixedTwoArg
case 140: // expressionArray
case 141: // expressionObject
case 142: // expressionFields
case 143: // maths
case 144: // add
case 145: // atan2
case 146: // boolExps
case 147: // and
case 148: // or
case 149: // not
case 150: // literalEscapes
case 151: // const
case 152: // literal
case 153: // compExprs
case 154: // cmp
case 155: // eq
case 156: // gt
case 157: // gte
case 158: // lt
case 159: // lte
case 160: // ne
case 161: // typeExpression
case 162: // typeValue
case 163: // convert
case 164: // toBool
case 165: // toDate
case 166: // toDecimal
case 167: // toDouble
case 168: // toInt
case 169: // toLong
case 170: // toObjectId
case 171: // toString
case 172: // type
case 173: // abs
case 174: // ceil
case 175: // divide
case 176: // exponent
case 177: // floor
case 178: // ln
case 179: // log
case 180: // logten
case 181: // mod
case 182: // multiply
case 183: // pow
case 184: // round
case 185: // sqrt
case 186: // subtract
case 187: // trunc
case 192: // matchExpression
case 193: // filterFields
case 194: // filterVal
yylhs.value.emplace();
break;
case 88: // projectionFieldname
case 89: // expressionFieldname
case 90: // stageAsUserFieldname
case 91: // filterFieldname
case 92: // argAsUserFieldname
case 93: // aggExprAsUserFieldname
case 94: // invariableUserFieldname
case 95: // idAsUserFieldname
case 96: // valueFieldname
yylhs.value.emplace();
break;
case 71: // DATE_LITERAL
yylhs.value.emplace();
break;
case 82: // DECIMAL_NON_ZERO
yylhs.value.emplace();
break;
case 70: // OBJECT_ID
yylhs.value.emplace();
break;
case 79: // TIMESTAMP
yylhs.value.emplace();
break;
case 84: // MAX_KEY
yylhs.value.emplace();
break;
case 83: // MIN_KEY
yylhs.value.emplace();
break;
case 72: // JSNULL
yylhs.value.emplace();
break;
case 69: // UNDEFINED
yylhs.value.emplace();
break;
case 81: // DOUBLE_NON_ZERO
yylhs.value.emplace();
break;
case 78: // INT_NON_ZERO
yylhs.value.emplace();
break;
case 80: // LONG_NON_ZERO
yylhs.value.emplace();
break;
case 97: // projectField
case 98: // expressionField
case 99: // valueField
case 100: // filterField
case 188: // onErrorArg
case 189: // onNullArg
yylhs.value.emplace>();
break;
case 66: // FIELDNAME
case 67: // STRING
yylhs.value.emplace();
break;
case 190: // expressions
case 191: // values
yylhs.value.emplace>();
break;
default:
break;
}
// Default location.
{
stack_type::slice range(yystack_, yylen);
YYLLOC_DEFAULT(yylhs.location, range, yylen);
yyerror_range[1].location = yylhs.location;
}
// Perform the reduction.
YY_REDUCE_PRINT(yyn);
#if YY_EXCEPTIONS
try
#endif // YY_EXCEPTIONS
{
switch (yyn) {
case 3:
#line 249 "src/mongo/db/cst/pipeline_grammar.yy"
{
*cst = CNode{YY_MOVE(yystack_[0].value.as())};
}
#line 1522 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 4:
#line 256 "src/mongo/db/cst/pipeline_grammar.yy"
{
*cst = YY_MOVE(yystack_[1].value.as());
}
#line 1530 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 5:
#line 262 "src/mongo/db/cst/pipeline_grammar.yy"
{
}
#line 1536 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 6:
#line 263 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
CNode{CNode::ArrayChildren{YY_MOVE(yystack_[2].value.as())}};
}
#line 1544 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 7:
#line 271 "src/mongo/db/cst/pipeline_grammar.yy"
{
lexer.sortObjTokens();
}
#line 1550 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 9:
#line 274 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1556 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 10:
#line 274 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1562 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 11:
#line 274 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1568 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 12:
#line 274 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1574 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 13:
#line 274 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1580 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 14:
#line 274 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1586 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 15:
#line 277 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::sample,
CNode{CNode::ObjectChildren{
{KeyFieldname::sizeArg, YY_MOVE(yystack_[1].value.as())},
}}}}};
}
#line 1598 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 16:
#line 287 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{CNode::ObjectChildren{
std::pair{KeyFieldname::inhibitOptimization, CNode::noopLeaf()}}};
}
#line 1606 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 17:
#line 293 "src/mongo/db/cst/pipeline_grammar.yy"
{
auto pipeline = YY_MOVE(yystack_[1].value.as());
yylhs.value.as() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::unionWith,
CNode{CNode::ObjectChildren{
{KeyFieldname::collArg, YY_MOVE(yystack_[3].value.as())},
{KeyFieldname::pipelineArg, std::move(pipeline)}}}}}};
}
#line 1619 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 18:
#line 303 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1625 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 19:
#line 303 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1631 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 20:
#line 303 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1637 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 21:
#line 303 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1643 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 22:
#line 307 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{CNode::ObjectChildren{
std::pair{KeyFieldname::skip, YY_MOVE(yystack_[0].value.as())}}};
}
#line 1651 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 23:
#line 312 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::limit, YY_MOVE(yystack_[0].value.as())}}};
}
#line 1659 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 24:
#line 317 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::project, YY_MOVE(yystack_[1].value.as())}}};
}
#line 1667 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 25:
#line 323 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode::noopLeaf();
}
#line 1675 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 26:
#line 326 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[1].value.as());
yylhs.value.as().objectChildren().emplace_back(
YY_MOVE(yystack_[0].value.as>()));
}
#line 1684 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 27:
#line 333 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as>() = {
KeyFieldname::id, YY_MOVE(yystack_[0].value.as())};
}
#line 1692 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 28:
#line 336 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as>() = {
YY_MOVE(yystack_[1].value.as()),
YY_MOVE(yystack_[0].value.as())};
}
#line 1700 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 29:
#line 342 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1706 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 30:
#line 343 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as())}};
}
#line 1714 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 31:
#line 346 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{KeyValue::intZeroKey};
}
#line 1722 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 32:
#line 349 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as())}};
}
#line 1730 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 33:
#line 352 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{KeyValue::longZeroKey};
}
#line 1738 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 34:
#line 355 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as())}};
}
#line 1746 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 35:
#line 358 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{KeyValue::doubleZeroKey};
}
#line 1754 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 36:
#line 361 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
CNode{NonZeroKey{YY_MOVE(yystack_[0].value.as())}};
}
#line 1762 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 37:
#line 364 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{KeyValue::decimalZeroKey};
}
#line 1770 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 38:
#line 367 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{KeyValue::trueKey};
}
#line 1778 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 39:
#line 370 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{KeyValue::falseKey};
}
#line 1786 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 40:
#line 373 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1792 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 41:
#line 377 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
YY_MOVE(yystack_[0].value.as());
}
#line 1798 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 42:
#line 377 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
YY_MOVE(yystack_[0].value.as());
}
#line 1804 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 43:
#line 377 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
YY_MOVE(yystack_[0].value.as());
}
#line 1810 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 44:
#line 377 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
YY_MOVE(yystack_[0].value.as());
}
#line 1816 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 45:
#line 381 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode{CNode::ObjectChildren{std::pair{
KeyFieldname::match, YY_MOVE(yystack_[1].value.as())}}};
}
#line 1824 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 46:
#line 387 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = CNode::noopLeaf();
}
#line 1832 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 47:
#line 390 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[1].value.as());
yylhs.value.as().objectChildren().emplace_back(
YY_MOVE(yystack_[0].value.as>()));
}
#line 1841 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 48:
#line 397 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as>() = {
KeyFieldname::id, YY_MOVE(yystack_[0].value.as())};
}
#line 1849 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 49:
#line 400 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as>() = {
YY_MOVE(yystack_[1].value.as()),
YY_MOVE(yystack_[0].value.as())};
}
#line 1857 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 50:
#line 406 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = YY_MOVE(yystack_[0].value.as());
}
#line 1863 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 51:
#line 410 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
YY_MOVE(yystack_[0].value.as());
}
#line 1869 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 52:
#line 410 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
YY_MOVE(yystack_[0].value.as());
}
#line 1875 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 53:
#line 410 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
YY_MOVE(yystack_[0].value.as());
}
#line 1881 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 54:
#line 410 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
YY_MOVE(yystack_[0].value.as());
}
#line 1887 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 55:
#line 414 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
UserFieldname{YY_MOVE(yystack_[0].value.as())};
}
#line 1895 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 56:
#line 422 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() =
UserFieldname{"$_internalInhibitOptimization"};
}
#line 1903 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 57:
#line 425 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$unionWith"};
}
#line 1911 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 58:
#line 428 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$skip"};
}
#line 1919 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 59:
#line 431 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$limit"};
}
#line 1927 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 60:
#line 434 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$project"};
}
#line 1935 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 61:
#line 437 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$sample"};
}
#line 1943 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 62:
#line 446 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"coll"};
}
#line 1951 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 63:
#line 449 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"pipeline"};
}
#line 1959 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 64:
#line 452 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"size"};
}
#line 1967 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 65:
#line 455 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"input"};
}
#line 1975 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 66:
#line 458 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"to"};
}
#line 1983 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 67:
#line 461 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"onError"};
}
#line 1991 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 68:
#line 464 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"onNull"};
}
#line 1999 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 69:
#line 472 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$add"};
}
#line 2007 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 70:
#line 475 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$atan2"};
}
#line 2015 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 71:
#line 478 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$and"};
}
#line 2023 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 72:
#line 481 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$const"};
}
#line 2031 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 73:
#line 484 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$literal"};
}
#line 2039 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 74:
#line 487 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$or"};
}
#line 2047 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 75:
#line 490 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$not"};
}
#line 2055 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 76:
#line 493 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$cmp"};
}
#line 2063 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 77:
#line 496 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$eq"};
}
#line 2071 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 78:
#line 499 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$gt"};
}
#line 2079 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 79:
#line 502 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$gte"};
}
#line 2087 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 80:
#line 505 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$lt"};
}
#line 2095 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 81:
#line 508 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$lte"};
}
#line 2103 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 82:
#line 511 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$ne"};
}
#line 2111 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 83:
#line 514 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$convert"};
}
#line 2119 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 84:
#line 517 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$toBool"};
}
#line 2127 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 85:
#line 520 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$toDate"};
}
#line 2135 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 86:
#line 523 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$toDecimal"};
}
#line 2143 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 87:
#line 526 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$toDouble"};
}
#line 2151 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 88:
#line 529 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$toInt"};
}
#line 2159 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 89:
#line 532 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$toLong"};
}
#line 2167 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 90:
#line 535 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$toObjectId"};
}
#line 2175 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 91:
#line 538 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$toString"};
}
#line 2183 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 92:
#line 541 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$type"};
}
#line 2191 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 93:
#line 544 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$abs"};
}
#line 2199 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 94:
#line 547 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$ceil"};
}
#line 2207 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 95:
#line 550 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$divide"};
}
#line 2215 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 96:
#line 553 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$exp"};
}
#line 2223 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 97:
#line 556 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$floor"};
}
#line 2231 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 98:
#line 559 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as() = UserFieldname{"$ln"};
}
#line 2239 "src/mongo/db/cst/pipeline_parser_gen.cpp"
break;
case 99:
#line 562 "src/mongo/db/cst/pipeline_grammar.yy"
{
yylhs.value.as