#line 60 "third_party/blink/renderer/core/xml/xpath_grammar.y"
#include "third_party/blink/renderer/core/xml/xpath_functions.h"
#include "third_party/blink/renderer/core/xml/xpath_parser.h"
#include "third_party/blink/renderer/core/xml/xpath_path.h"
#include "third_party/blink/renderer/core/xml/xpath_predicate.h"
#include "third_party/blink/renderer/core/xml/xpath_step.h"
#include "third_party/blink/renderer/core/xml/xpath_variable_reference.h"
#define YYENABLE_NLS …
#define YY_EXCEPTIONS …
#define YYDEBUG …
Step;
#line 58 "third_party/blink/renderer/core/xml/xpath_grammar_generated.cc"
#include "xpath_grammar_generated.h"
#line 52 "third_party/blink/renderer/core/xml/xpath_grammar.y"
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-but-set-variable"
#endif
#line 121 "third_party/blink/renderer/core/xml/xpath_grammar.y"
static int yylex(xpathyy::YyParser::semantic_type* yylval) { … }
namespace xpathyy {
void YyParser::error(const std::string&) { … }
}
#line 83 "third_party/blink/renderer/core/xml/xpath_grammar_generated.cc"
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h>
#define YY_ …
# endif
# endif
# ifndef YY_
#define YY_(msgid) …
# endif
#endif
#ifndef YY_EXCEPTIONS
# if defined __GNUC__ && !defined __EXCEPTIONS
#define YY_EXCEPTIONS …
# else
#define YY_EXCEPTIONS …
# endif
#endif
#if YYDEBUG
#define YYCDEBUG …
#define YY_SYMBOL_PRINT …
#define YY_REDUCE_PRINT …
#define YY_STACK_PRINT …
#else
#define YYCDEBUG …
#define YY_SYMBOL_PRINT(Title, Symbol) …
#define YY_REDUCE_PRINT(Rule) …
#define YY_STACK_PRINT() …
#endif
#define yyerrok …
#define yyclearin …
#define YYACCEPT …
#define YYABORT …
#define YYERROR …
#define YYRECOVERING() …
#line 77 "third_party/blink/renderer/core/xml/xpath_grammar.y"
namespace xpathyy {
#line 157 "third_party/blink/renderer/core/xml/xpath_grammar_generated.cc"
YyParser::YyParser (blink::xpath::Parser* parser__yyarg)
#if YYDEBUG
: … { … }
YyParser::~YyParser ()
{ … }
YyParser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
{ … }
template <typename Base>
YyParser::basic_symbol<Base>::basic_symbol (const basic_symbol& that)
: … { … }
template <typename Base>
YyParser::symbol_kind_type
YyParser::basic_symbol<Base>::type_get () const YY_NOEXCEPT
{ … }
template <typename Base>
bool
YyParser::basic_symbol<Base>::empty () const YY_NOEXCEPT
{ … }
template <typename Base>
void
YyParser::basic_symbol<Base>::move (basic_symbol& s)
{ … }
YyParser::by_kind::by_kind ()
: … { … }
#if 201103L <= YY_CPLUSPLUS
YyParser::by_kind::by_kind (by_kind&& that)
: … { … }
#endif
YyParser::by_kind::by_kind (const by_kind& that)
: … { … }
YyParser::by_kind::by_kind (token_kind_type t)
: … { … }
void
YyParser::by_kind::clear ()
{ … }
void
YyParser::by_kind::move (by_kind& that)
{ … }
YyParser::symbol_kind_type
YyParser::by_kind::kind () const YY_NOEXCEPT
{ … }
YyParser::symbol_kind_type
YyParser::by_kind::type_get () const YY_NOEXCEPT
{ … }
YyParser::by_state::by_state () YY_NOEXCEPT
: … { … }
YyParser::by_state::by_state (const by_state& that) YY_NOEXCEPT
: … { … }
void
YyParser::by_state::clear () YY_NOEXCEPT
{ … }
void
YyParser::by_state::move (by_state& that)
{ … }
YyParser::by_state::by_state (state_type s) YY_NOEXCEPT
: … { … }
YyParser::symbol_kind_type
YyParser::by_state::kind () const YY_NOEXCEPT
{ … }
YyParser::stack_symbol_type::stack_symbol_type ()
{ … }
YyParser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that)
: … { … }
YyParser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that)
: … { … }
#if YY_CPLUSPLUS < 201103L
YyParser::stack_symbol_type&
YyParser::stack_symbol_type::operator= (const stack_symbol_type& that)
{
state = that.state;
switch (that.kind ())
{
case symbol_kind::S_kNodeType:
case symbol_kind::S_kPI:
case symbol_kind::S_kFunctionName:
case symbol_kind::S_kLiteral:
case symbol_kind::S_kVariableReference:
case symbol_kind::S_kNumber:
case symbol_kind::S_kNameTest:
value.copy< String > (that.value);
break;
case symbol_kind::S_ArgumentList:
value.copy< blink::Persistent<blink::HeapVector<blink::Member<blink::xpath::Expression>>> > (that.value);
break;
case symbol_kind::S_OptionalPredicateList:
case symbol_kind::S_PredicateList:
value.copy< blink::Persistent<blink::HeapVector<blink::Member<blink::xpath::Predicate>>> > (that.value);
break;
case symbol_kind::S_Expr:
case symbol_kind::S_Predicate:
case symbol_kind::S_PrimaryExpr:
case symbol_kind::S_FunctionCall:
case symbol_kind::S_Argument:
case symbol_kind::S_UnionExpr:
case symbol_kind::S_PathExpr:
case symbol_kind::S_FilterExpr:
case symbol_kind::S_OrExpr:
case symbol_kind::S_AndExpr:
case symbol_kind::S_EqualityExpr:
case symbol_kind::S_RelationalExpr:
case symbol_kind::S_AdditiveExpr:
case symbol_kind::S_MultiplicativeExpr:
case symbol_kind::S_UnaryExpr:
value.copy< blink::Persistent<blink::xpath::Expression> > (that.value);
break;
case symbol_kind::S_LocationPath:
case symbol_kind::S_AbsoluteLocationPath:
case symbol_kind::S_RelativeLocationPath:
value.copy< blink::Persistent<blink::xpath::LocationPath> > (that.value);
break;
case symbol_kind::S_NodeTest:
value.copy< blink::Persistent<blink::xpath::Step::NodeTest> > (that.value);
break;
case symbol_kind::S_Step:
case symbol_kind::S_DescendantOrSelf:
case symbol_kind::S_AbbreviatedStep:
value.copy< blink::Persistent<blink::xpath::Step> > (that.value);
break;
case symbol_kind::S_kEqOp:
case symbol_kind::S_kRelOp:
value.copy< blink::xpath::EqTestOp::Opcode > (that.value);
break;
case symbol_kind::S_kMulOp:
value.copy< blink::xpath::NumericOp::Opcode > (that.value);
break;
case symbol_kind::S_kAxisName:
case symbol_kind::S_AxisSpecifier:
value.copy< blink::xpath::Step::Axis > (that.value);
break;
default:
break;
}
return *this;
}
YyParser::stack_symbol_type&
YyParser::stack_symbol_type::operator= (stack_symbol_type& that)
{
state = that.state;
switch (that.kind ())
{
case symbol_kind::S_kNodeType:
case symbol_kind::S_kPI:
case symbol_kind::S_kFunctionName:
case symbol_kind::S_kLiteral:
case symbol_kind::S_kVariableReference:
case symbol_kind::S_kNumber:
case symbol_kind::S_kNameTest:
value.move< String > (that.value);
break;
case symbol_kind::S_ArgumentList:
value.move< blink::Persistent<blink::HeapVector<blink::Member<blink::xpath::Expression>>> > (that.value);
break;
case symbol_kind::S_OptionalPredicateList:
case symbol_kind::S_PredicateList:
value.move< blink::Persistent<blink::HeapVector<blink::Member<blink::xpath::Predicate>>> > (that.value);
break;
case symbol_kind::S_Expr:
case symbol_kind::S_Predicate:
case symbol_kind::S_PrimaryExpr:
case symbol_kind::S_FunctionCall:
case symbol_kind::S_Argument:
case symbol_kind::S_UnionExpr:
case symbol_kind::S_PathExpr:
case symbol_kind::S_FilterExpr:
case symbol_kind::S_OrExpr:
case symbol_kind::S_AndExpr:
case symbol_kind::S_EqualityExpr:
case symbol_kind::S_RelationalExpr:
case symbol_kind::S_AdditiveExpr:
case symbol_kind::S_MultiplicativeExpr:
case symbol_kind::S_UnaryExpr:
value.move< blink::Persistent<blink::xpath::Expression> > (that.value);
break;
case symbol_kind::S_LocationPath:
case symbol_kind::S_AbsoluteLocationPath:
case symbol_kind::S_RelativeLocationPath:
value.move< blink::Persistent<blink::xpath::LocationPath> > (that.value);
break;
case symbol_kind::S_NodeTest:
value.move< blink::Persistent<blink::xpath::Step::NodeTest> > (that.value);
break;
case symbol_kind::S_Step:
case symbol_kind::S_DescendantOrSelf:
case symbol_kind::S_AbbreviatedStep:
value.move< blink::Persistent<blink::xpath::Step> > (that.value);
break;
case symbol_kind::S_kEqOp:
case symbol_kind::S_kRelOp:
value.move< blink::xpath::EqTestOp::Opcode > (that.value);
break;
case symbol_kind::S_kMulOp:
value.move< blink::xpath::NumericOp::Opcode > (that.value);
break;
case symbol_kind::S_kAxisName:
case symbol_kind::S_AxisSpecifier:
value.move< blink::xpath::Step::Axis > (that.value);
break;
default:
break;
}
that.state = empty_state;
return *this;
}
#endif
template <typename Base>
void
YyParser::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
{ … }
#if YYDEBUG
template <typename Base>
void
YyParser::yy_print_ (std::ostream& yyo, const basic_symbol<Base>& 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")
<< ' ' << yysym.name () << " (";
YYUSE (yykind);
yyo << ')';
}
}
#endif
void
YyParser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym)
{ … }
void
YyParser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym)
{ … }
void
YyParser::yypop_ (int n)
{ … }
#if YYDEBUG
std::ostream&
YyParser::debug_stream () const
{
return *yycdebug_;
}
void
YyParser::set_debug_stream (std::ostream& o)
{
yycdebug_ = &o;
}
YyParser::debug_level_type
YyParser::debug_level () const
{
return yydebug_;
}
void
YyParser::set_debug_level (debug_level_type l)
{
yydebug_ = l;
}
#endif
YyParser::state_type
YyParser::yy_lr_goto_state_ (state_type yystate, int yysym)
{ … }
bool
YyParser::yy_pact_value_is_default_ (int yyvalue)
{ … }
bool
YyParser::yy_table_value_is_error_ (int yyvalue)
{ … }
int
YyParser::operator() ()
{ … }
int
YyParser::parse ()
{ … }
void
YyParser::error (const syntax_error& yyexc)
{ … }
#if YYDEBUG || 0
const char *
YyParser::symbol_name (symbol_kind_type yysymbol)
{
return yytname_[yysymbol];
}
#endif
const signed char YyParser::yypact_ninf_ = …;
const signed char YyParser::yytable_ninf_ = …;
const signed char
YyParser::yypact_[] = …;
const signed char
YyParser::yydefact_[] = …;
const signed char
YyParser::yypgoto_[] = …;
const signed char
YyParser::yydefgoto_[] = …;
const signed char
YyParser::yytable_[] = …;
const signed char
YyParser::yycheck_[] = …;
const signed char
YyParser::yystos_[] = …;
const signed char
YyParser::yyr1_[] = …;
const signed char
YyParser::yyr2_[] = …;
#if YYDEBUG
const char*
const YyParser::yytname_[] =
{
"\"end of file\"", "error", "\"invalid token\"", "kMulOp", "kEqOp",
"kRelOp", "kPlus", "kMinus", "kOr", "kAnd", "kAxisName", "kNodeType",
"kPI", "kFunctionName", "kLiteral", "kVariableReference", "kNumber",
"kDotDot", "kSlashSlash", "kNameTest", "kXPathError", "'/'", "'@'",
"'('", "')'", "'['", "']'", "'.'", "','", "'|'", "$accept", "Expr",
"LocationPath", "AbsoluteLocationPath", "RelativeLocationPath", "Step",
"AxisSpecifier", "NodeTest", "OptionalPredicateList", "PredicateList",
"Predicate", "DescendantOrSelf", "AbbreviatedStep", "PrimaryExpr",
"FunctionCall", "ArgumentList", "Argument", "UnionExpr", "PathExpr",
"FilterExpr", "OrExpr", "AndExpr", "EqualityExpr", "RelationalExpr",
"AdditiveExpr", "MultiplicativeExpr", "UnaryExpr", YY_NULLPTR
};
#endif
#if YYDEBUG
const short
YyParser::yyrline_[] =
{
0, 136, 136, 144, 150, 158, 163, 168, 176, 182,
188, 197, 205, 220, 228, 243, 247, 249, 256, 266,
271, 279, 283, 290, 296, 304, 311, 318, 323, 330,
335, 340, 345, 350, 354, 361, 370, 376, 384, 388,
390, 399, 404, 406, 412, 421, 423, 430, 432, 439,
441, 448, 450, 457, 459, 466, 468, 473, 480, 482,
489, 491
};
void
YyParser::yy_stack_print_ () const
{
*yycdebug_ << "Stack now";
for (stack_type::const_iterator
i = yystack_.begin (),
i_end = yystack_.end ();
i != i_end; ++i)
*yycdebug_ << ' ' << int (i->state);
*yycdebug_ << '\n';
}
void
YyParser::yy_reduce_print_ (int yyrule) const
{
int yylno = yyrline_[yyrule];
int yynrhs = yyr2_[yyrule];
*yycdebug_ << "Reducing stack by rule " << yyrule - 1
<< " (line " << yylno << "):\n";
for (int yyi = 0; yyi < yynrhs; yyi++)
YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",
yystack_[(yynrhs) - (yyi + 1)]);
}
#endif
YyParser::symbol_kind_type
YyParser::yytranslate_ (int t)
{ … }
#line 77 "third_party/blink/renderer/core/xml/xpath_grammar.y"
}
#line 2021 "third_party/blink/renderer/core/xml/xpath_grammar_generated.cc"
#line 498 "third_party/blink/renderer/core/xml/xpath_grammar.y"