gsc-tool/src/gsc/parser.cpp

5051 lines
202 KiB
C++

// A Bison parser, made by GNU Bison 3.8.2.
// Skeleton implementation for Bison LALR(1) parsers in C++
// Copyright (C) 2002-2015, 2018-2021 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 <https://www.gnu.org/licenses/>.
// 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.
// "%code top" blocks.
#line 41 "parser.ypp"
#include "stdinc.hpp"
#include "parser.hpp"
#include "preprocessor.hpp"
using namespace xsk::gsc;
namespace xsk::gsc
{
auto GSClex(context const* ctx_, preprocessor& ppr) -> parser::symbol_type;
auto parse_switch(stmt_switch& stm) -> void;
}
#line 51 "parser.cpp"
// Take the name prefix into account.
#define yylex GSClex
#include "parser.hpp"
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> // 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 GSCDEBUG
// 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 // !GSCDEBUG
# define YYCDEBUG if (false) std::cerr
# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
# define YY_STACK_PRINT() static_cast<void> (0)
#endif // !GSCDEBUG
#define yyerrok (yyerrstatus_ = 0)
#define yyclearin (yyla.clear ())
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
#define YYRECOVERING() (!!yyerrstatus_)
#line 13 "parser.ypp"
namespace xsk { namespace gsc {
#line 153 "parser.cpp"
/// Build a parser object.
parser::parser (xsk::gsc::context const* ctx__yyarg, xsk::gsc::preprocessor& ppr_yyarg, xsk::gsc::program::ptr& ast_yyarg, std::uint32_t index_yyarg)
#if GSCDEBUG
: yydebug_ (false),
yycdebug_ (&std::cerr),
#else
:
#endif
yy_lac_established_ (false),
ctx_ (ctx__yyarg),
ppr (ppr_yyarg),
ast (ast_yyarg),
index (index_yyarg)
{}
parser::~parser ()
{}
parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
{}
/*---------.
| symbol. |
`---------*/
// by_state.
parser::by_state::by_state () YY_NOEXCEPT
: state (empty_state)
{}
parser::by_state::by_state (const by_state& that) YY_NOEXCEPT
: state (that.state)
{}
void
parser::by_state::clear () YY_NOEXCEPT
{
state = empty_state;
}
void
parser::by_state::move (by_state& that)
{
state = that.state;
that.clear ();
}
parser::by_state::by_state (state_type s) YY_NOEXCEPT
: state (s)
{}
parser::symbol_kind_type
parser::by_state::kind () const YY_NOEXCEPT
{
if (state == empty_state)
return symbol_kind::S_YYEMPTY;
else
return YY_CAST (symbol_kind_type, yystos_[+state]);
}
parser::stack_symbol_type::stack_symbol_type ()
{}
parser::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 symbol_kind::S_expr_function: // expr_function
case symbol_kind::S_expr_pointer: // expr_pointer
value.YY_MOVE_OR_COPY< call > (YY_MOVE (that.value));
break;
case symbol_kind::S_declaration: // declaration
value.YY_MOVE_OR_COPY< decl > (YY_MOVE (that.value));
break;
case symbol_kind::S_decl_function: // decl_function
value.YY_MOVE_OR_COPY< decl_function::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_decl_usingtree: // decl_usingtree
value.YY_MOVE_OR_COPY< decl_usingtree::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr: // expr
case symbol_kind::S_expr_or_empty: // expr_or_empty
case symbol_kind::S_expr_assign: // expr_assign
case symbol_kind::S_expr_increment: // expr_increment
case symbol_kind::S_expr_decrement: // expr_decrement
case symbol_kind::S_expr_ternary: // expr_ternary
case symbol_kind::S_expr_binary: // expr_binary
case symbol_kind::S_expr_primitive: // expr_primitive
case symbol_kind::S_expr_tuple: // expr_tuple
case symbol_kind::S_expr_tuple_types: // expr_tuple_types
case symbol_kind::S_expr_object: // expr_object
value.YY_MOVE_OR_COPY< expr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_add_array: // expr_add_array
value.YY_MOVE_OR_COPY< expr_add_array::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_anim: // expr_anim
value.YY_MOVE_OR_COPY< expr_anim::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_animation: // expr_animation
value.YY_MOVE_OR_COPY< expr_animation::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_animtree: // expr_animtree
value.YY_MOVE_OR_COPY< expr_animtree::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_arguments: // expr_arguments
case symbol_kind::S_expr_arguments_no_empty: // expr_arguments_no_empty
value.YY_MOVE_OR_COPY< expr_arguments::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_array: // expr_array
value.YY_MOVE_OR_COPY< expr_array::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_call: // expr_call
value.YY_MOVE_OR_COPY< expr_call::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_complement: // expr_complement
value.YY_MOVE_OR_COPY< expr_complement::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_empty_array: // expr_empty_array
value.YY_MOVE_OR_COPY< expr_empty_array::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_false: // expr_false
value.YY_MOVE_OR_COPY< expr_false::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_field: // expr_field
value.YY_MOVE_OR_COPY< expr_field::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_float: // expr_float
value.YY_MOVE_OR_COPY< expr_float::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_game: // expr_game
value.YY_MOVE_OR_COPY< expr_game::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_identifier_nosize: // expr_identifier_nosize
case symbol_kind::S_expr_identifier: // expr_identifier
value.YY_MOVE_OR_COPY< expr_identifier::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_integer: // expr_integer
value.YY_MOVE_OR_COPY< expr_integer::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_isdefined: // expr_isdefined
value.YY_MOVE_OR_COPY< expr_isdefined::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_istring: // expr_istring
value.YY_MOVE_OR_COPY< expr_istring::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_istrue: // expr_istrue
value.YY_MOVE_OR_COPY< expr_istrue::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_level: // expr_level
value.YY_MOVE_OR_COPY< expr_level::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_method: // expr_method
value.YY_MOVE_OR_COPY< expr_method::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_negate: // expr_negate
value.YY_MOVE_OR_COPY< expr_negate::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_not: // expr_not
value.YY_MOVE_OR_COPY< expr_not::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_parameters: // expr_parameters
value.YY_MOVE_OR_COPY< expr_parameters::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_paren: // expr_paren
value.YY_MOVE_OR_COPY< expr_paren::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_path: // expr_path
value.YY_MOVE_OR_COPY< expr_path::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_reference: // expr_reference
value.YY_MOVE_OR_COPY< expr_reference::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_self: // expr_self
value.YY_MOVE_OR_COPY< expr_self::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_size: // expr_size
value.YY_MOVE_OR_COPY< expr_size::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_string: // expr_string
value.YY_MOVE_OR_COPY< expr_string::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_thisthread: // expr_thisthread
value.YY_MOVE_OR_COPY< expr_thisthread::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_true: // expr_true
value.YY_MOVE_OR_COPY< expr_true::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments
value.YY_MOVE_OR_COPY< expr_tuple::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_undefined: // expr_undefined
value.YY_MOVE_OR_COPY< expr_undefined::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_vector: // expr_vector
value.YY_MOVE_OR_COPY< expr_vector::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_include: // include
value.YY_MOVE_OR_COPY< include::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_program: // program
value.YY_MOVE_OR_COPY< program::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_PATH: // "path"
case symbol_kind::S_IDENTIFIER: // "identifier"
case symbol_kind::S_STRING: // "string literal"
case symbol_kind::S_ISTRING: // "localized string"
case symbol_kind::S_FLOAT: // "float"
case symbol_kind::S_INTEGER: // "integer"
value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_stmt_or_dev: // stmt_or_dev
value.YY_MOVE_OR_COPY< stmt > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_assign: // stmt_assign
value.YY_MOVE_OR_COPY< stmt_assign::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_break: // stmt_break
value.YY_MOVE_OR_COPY< stmt_break::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.YY_MOVE_OR_COPY< stmt_breakpoint::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.YY_MOVE_OR_COPY< stmt_call::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_case: // stmt_case
value.YY_MOVE_OR_COPY< stmt_case::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_comp: // stmt_comp
value.YY_MOVE_OR_COPY< stmt_comp::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_continue: // stmt_continue
value.YY_MOVE_OR_COPY< stmt_continue::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_default: // stmt_default
value.YY_MOVE_OR_COPY< stmt_default::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_dev: // stmt_dev
value.YY_MOVE_OR_COPY< stmt_dev::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_dowhile: // stmt_dowhile
value.YY_MOVE_OR_COPY< stmt_dowhile::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_endon: // stmt_endon
value.YY_MOVE_OR_COPY< stmt_endon::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_expr: // stmt_expr
value.YY_MOVE_OR_COPY< stmt_expr::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_for: // stmt_for
value.YY_MOVE_OR_COPY< stmt_for::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_foreach: // stmt_foreach
value.YY_MOVE_OR_COPY< stmt_foreach::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_if: // stmt_if
value.YY_MOVE_OR_COPY< stmt_if::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_ifelse: // stmt_ifelse
value.YY_MOVE_OR_COPY< stmt_ifelse::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_list: // stmt_list
case symbol_kind::S_stmt_or_dev_list: // stmt_or_dev_list
value.YY_MOVE_OR_COPY< stmt_list::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_notify: // stmt_notify
value.YY_MOVE_OR_COPY< stmt_notify::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.YY_MOVE_OR_COPY< stmt_prof_begin::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.YY_MOVE_OR_COPY< stmt_prof_end::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_return: // stmt_return
value.YY_MOVE_OR_COPY< stmt_return::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_switch: // stmt_switch
value.YY_MOVE_OR_COPY< stmt_switch::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_wait: // stmt_wait
value.YY_MOVE_OR_COPY< stmt_wait::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_waitframe: // stmt_waitframe
value.YY_MOVE_OR_COPY< stmt_waitframe::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_waittill: // stmt_waittill
value.YY_MOVE_OR_COPY< stmt_waittill::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_waittillframeend: // stmt_waittillframeend
value.YY_MOVE_OR_COPY< stmt_waittillframeend::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_waittillmatch: // stmt_waittillmatch
value.YY_MOVE_OR_COPY< stmt_waittillmatch::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_while: // stmt_while
value.YY_MOVE_OR_COPY< stmt_while::ptr > (YY_MOVE (that.value));
break;
default:
break;
}
#if 201103L <= YY_CPLUSPLUS
// that is emptied.
that.state = empty_state;
#endif
}
parser::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 symbol_kind::S_expr_function: // expr_function
case symbol_kind::S_expr_pointer: // expr_pointer
value.move< call > (YY_MOVE (that.value));
break;
case symbol_kind::S_declaration: // declaration
value.move< decl > (YY_MOVE (that.value));
break;
case symbol_kind::S_decl_function: // decl_function
value.move< decl_function::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_decl_usingtree: // decl_usingtree
value.move< decl_usingtree::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr: // expr
case symbol_kind::S_expr_or_empty: // expr_or_empty
case symbol_kind::S_expr_assign: // expr_assign
case symbol_kind::S_expr_increment: // expr_increment
case symbol_kind::S_expr_decrement: // expr_decrement
case symbol_kind::S_expr_ternary: // expr_ternary
case symbol_kind::S_expr_binary: // expr_binary
case symbol_kind::S_expr_primitive: // expr_primitive
case symbol_kind::S_expr_tuple: // expr_tuple
case symbol_kind::S_expr_tuple_types: // expr_tuple_types
case symbol_kind::S_expr_object: // expr_object
value.move< expr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_add_array: // expr_add_array
value.move< expr_add_array::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_anim: // expr_anim
value.move< expr_anim::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_animation: // expr_animation
value.move< expr_animation::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_animtree: // expr_animtree
value.move< expr_animtree::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_arguments: // expr_arguments
case symbol_kind::S_expr_arguments_no_empty: // expr_arguments_no_empty
value.move< expr_arguments::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_array: // expr_array
value.move< expr_array::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_call: // expr_call
value.move< expr_call::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_complement: // expr_complement
value.move< expr_complement::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_empty_array: // expr_empty_array
value.move< expr_empty_array::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_false: // expr_false
value.move< expr_false::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_field: // expr_field
value.move< expr_field::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_float: // expr_float
value.move< expr_float::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_game: // expr_game
value.move< expr_game::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_identifier_nosize: // expr_identifier_nosize
case symbol_kind::S_expr_identifier: // expr_identifier
value.move< expr_identifier::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_integer: // expr_integer
value.move< expr_integer::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_isdefined: // expr_isdefined
value.move< expr_isdefined::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_istring: // expr_istring
value.move< expr_istring::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_istrue: // expr_istrue
value.move< expr_istrue::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_level: // expr_level
value.move< expr_level::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_method: // expr_method
value.move< expr_method::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_negate: // expr_negate
value.move< expr_negate::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_not: // expr_not
value.move< expr_not::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_parameters: // expr_parameters
value.move< expr_parameters::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_paren: // expr_paren
value.move< expr_paren::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_path: // expr_path
value.move< expr_path::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_reference: // expr_reference
value.move< expr_reference::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_self: // expr_self
value.move< expr_self::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_size: // expr_size
value.move< expr_size::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_string: // expr_string
value.move< expr_string::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_thisthread: // expr_thisthread
value.move< expr_thisthread::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_true: // expr_true
value.move< expr_true::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments
value.move< expr_tuple::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_undefined: // expr_undefined
value.move< expr_undefined::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_expr_vector: // expr_vector
value.move< expr_vector::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_include: // include
value.move< include::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_program: // program
value.move< program::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_PATH: // "path"
case symbol_kind::S_IDENTIFIER: // "identifier"
case symbol_kind::S_STRING: // "string literal"
case symbol_kind::S_ISTRING: // "localized string"
case symbol_kind::S_FLOAT: // "float"
case symbol_kind::S_INTEGER: // "integer"
value.move< std::string > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_stmt_or_dev: // stmt_or_dev
value.move< stmt > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_assign: // stmt_assign
value.move< stmt_assign::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_break: // stmt_break
value.move< stmt_break::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_case: // stmt_case
value.move< stmt_case::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_comp: // stmt_comp
value.move< stmt_comp::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_continue: // stmt_continue
value.move< stmt_continue::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_default: // stmt_default
value.move< stmt_default::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_dev: // stmt_dev
value.move< stmt_dev::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_dowhile: // stmt_dowhile
value.move< stmt_dowhile::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_endon: // stmt_endon
value.move< stmt_endon::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_expr: // stmt_expr
value.move< stmt_expr::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_for: // stmt_for
value.move< stmt_for::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_foreach: // stmt_foreach
value.move< stmt_foreach::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_if: // stmt_if
value.move< stmt_if::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_ifelse: // stmt_ifelse
value.move< stmt_ifelse::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_list: // stmt_list
case symbol_kind::S_stmt_or_dev_list: // stmt_or_dev_list
value.move< stmt_list::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_notify: // stmt_notify
value.move< stmt_notify::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_return: // stmt_return
value.move< stmt_return::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_switch: // stmt_switch
value.move< stmt_switch::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_wait: // stmt_wait
value.move< stmt_wait::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_waitframe: // stmt_waitframe
value.move< stmt_waitframe::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_waittill: // stmt_waittill
value.move< stmt_waittill::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_waittillframeend: // stmt_waittillframeend
value.move< stmt_waittillframeend::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_waittillmatch: // stmt_waittillmatch
value.move< stmt_waittillmatch::ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_while: // stmt_while
value.move< stmt_while::ptr > (YY_MOVE (that.value));
break;
default:
break;
}
// that is emptied.
that.kind_ = symbol_kind::S_YYEMPTY;
}
#if YY_CPLUSPLUS < 201103L
parser::stack_symbol_type&
parser::stack_symbol_type::operator= (const stack_symbol_type& that)
{
state = that.state;
switch (that.kind ())
{
case symbol_kind::S_expr_function: // expr_function
case symbol_kind::S_expr_pointer: // expr_pointer
value.copy< call > (that.value);
break;
case symbol_kind::S_declaration: // declaration
value.copy< decl > (that.value);
break;
case symbol_kind::S_decl_function: // decl_function
value.copy< decl_function::ptr > (that.value);
break;
case symbol_kind::S_decl_usingtree: // decl_usingtree
value.copy< decl_usingtree::ptr > (that.value);
break;
case symbol_kind::S_expr: // expr
case symbol_kind::S_expr_or_empty: // expr_or_empty
case symbol_kind::S_expr_assign: // expr_assign
case symbol_kind::S_expr_increment: // expr_increment
case symbol_kind::S_expr_decrement: // expr_decrement
case symbol_kind::S_expr_ternary: // expr_ternary
case symbol_kind::S_expr_binary: // expr_binary
case symbol_kind::S_expr_primitive: // expr_primitive
case symbol_kind::S_expr_tuple: // expr_tuple
case symbol_kind::S_expr_tuple_types: // expr_tuple_types
case symbol_kind::S_expr_object: // expr_object
value.copy< expr > (that.value);
break;
case symbol_kind::S_expr_add_array: // expr_add_array
value.copy< expr_add_array::ptr > (that.value);
break;
case symbol_kind::S_expr_anim: // expr_anim
value.copy< expr_anim::ptr > (that.value);
break;
case symbol_kind::S_expr_animation: // expr_animation
value.copy< expr_animation::ptr > (that.value);
break;
case symbol_kind::S_expr_animtree: // expr_animtree
value.copy< expr_animtree::ptr > (that.value);
break;
case symbol_kind::S_expr_arguments: // expr_arguments
case symbol_kind::S_expr_arguments_no_empty: // expr_arguments_no_empty
value.copy< expr_arguments::ptr > (that.value);
break;
case symbol_kind::S_expr_array: // expr_array
value.copy< expr_array::ptr > (that.value);
break;
case symbol_kind::S_expr_call: // expr_call
value.copy< expr_call::ptr > (that.value);
break;
case symbol_kind::S_expr_complement: // expr_complement
value.copy< expr_complement::ptr > (that.value);
break;
case symbol_kind::S_expr_empty_array: // expr_empty_array
value.copy< expr_empty_array::ptr > (that.value);
break;
case symbol_kind::S_expr_false: // expr_false
value.copy< expr_false::ptr > (that.value);
break;
case symbol_kind::S_expr_field: // expr_field
value.copy< expr_field::ptr > (that.value);
break;
case symbol_kind::S_expr_float: // expr_float
value.copy< expr_float::ptr > (that.value);
break;
case symbol_kind::S_expr_game: // expr_game
value.copy< expr_game::ptr > (that.value);
break;
case symbol_kind::S_expr_identifier_nosize: // expr_identifier_nosize
case symbol_kind::S_expr_identifier: // expr_identifier
value.copy< expr_identifier::ptr > (that.value);
break;
case symbol_kind::S_expr_integer: // expr_integer
value.copy< expr_integer::ptr > (that.value);
break;
case symbol_kind::S_expr_isdefined: // expr_isdefined
value.copy< expr_isdefined::ptr > (that.value);
break;
case symbol_kind::S_expr_istring: // expr_istring
value.copy< expr_istring::ptr > (that.value);
break;
case symbol_kind::S_expr_istrue: // expr_istrue
value.copy< expr_istrue::ptr > (that.value);
break;
case symbol_kind::S_expr_level: // expr_level
value.copy< expr_level::ptr > (that.value);
break;
case symbol_kind::S_expr_method: // expr_method
value.copy< expr_method::ptr > (that.value);
break;
case symbol_kind::S_expr_negate: // expr_negate
value.copy< expr_negate::ptr > (that.value);
break;
case symbol_kind::S_expr_not: // expr_not
value.copy< expr_not::ptr > (that.value);
break;
case symbol_kind::S_expr_parameters: // expr_parameters
value.copy< expr_parameters::ptr > (that.value);
break;
case symbol_kind::S_expr_paren: // expr_paren
value.copy< expr_paren::ptr > (that.value);
break;
case symbol_kind::S_expr_path: // expr_path
value.copy< expr_path::ptr > (that.value);
break;
case symbol_kind::S_expr_reference: // expr_reference
value.copy< expr_reference::ptr > (that.value);
break;
case symbol_kind::S_expr_self: // expr_self
value.copy< expr_self::ptr > (that.value);
break;
case symbol_kind::S_expr_size: // expr_size
value.copy< expr_size::ptr > (that.value);
break;
case symbol_kind::S_expr_string: // expr_string
value.copy< expr_string::ptr > (that.value);
break;
case symbol_kind::S_expr_thisthread: // expr_thisthread
value.copy< expr_thisthread::ptr > (that.value);
break;
case symbol_kind::S_expr_true: // expr_true
value.copy< expr_true::ptr > (that.value);
break;
case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments
value.copy< expr_tuple::ptr > (that.value);
break;
case symbol_kind::S_expr_undefined: // expr_undefined
value.copy< expr_undefined::ptr > (that.value);
break;
case symbol_kind::S_expr_vector: // expr_vector
value.copy< expr_vector::ptr > (that.value);
break;
case symbol_kind::S_include: // include
value.copy< include::ptr > (that.value);
break;
case symbol_kind::S_program: // program
value.copy< program::ptr > (that.value);
break;
case symbol_kind::S_PATH: // "path"
case symbol_kind::S_IDENTIFIER: // "identifier"
case symbol_kind::S_STRING: // "string literal"
case symbol_kind::S_ISTRING: // "localized string"
case symbol_kind::S_FLOAT: // "float"
case symbol_kind::S_INTEGER: // "integer"
value.copy< std::string > (that.value);
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_stmt_or_dev: // stmt_or_dev
value.copy< stmt > (that.value);
break;
case symbol_kind::S_stmt_assign: // stmt_assign
value.copy< stmt_assign::ptr > (that.value);
break;
case symbol_kind::S_stmt_break: // stmt_break
value.copy< stmt_break::ptr > (that.value);
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.copy< stmt_breakpoint::ptr > (that.value);
break;
case symbol_kind::S_stmt_call: // stmt_call
value.copy< stmt_call::ptr > (that.value);
break;
case symbol_kind::S_stmt_case: // stmt_case
value.copy< stmt_case::ptr > (that.value);
break;
case symbol_kind::S_stmt_comp: // stmt_comp
value.copy< stmt_comp::ptr > (that.value);
break;
case symbol_kind::S_stmt_continue: // stmt_continue
value.copy< stmt_continue::ptr > (that.value);
break;
case symbol_kind::S_stmt_default: // stmt_default
value.copy< stmt_default::ptr > (that.value);
break;
case symbol_kind::S_stmt_dev: // stmt_dev
value.copy< stmt_dev::ptr > (that.value);
break;
case symbol_kind::S_stmt_dowhile: // stmt_dowhile
value.copy< stmt_dowhile::ptr > (that.value);
break;
case symbol_kind::S_stmt_endon: // stmt_endon
value.copy< stmt_endon::ptr > (that.value);
break;
case symbol_kind::S_stmt_expr: // stmt_expr
value.copy< stmt_expr::ptr > (that.value);
break;
case symbol_kind::S_stmt_for: // stmt_for
value.copy< stmt_for::ptr > (that.value);
break;
case symbol_kind::S_stmt_foreach: // stmt_foreach
value.copy< stmt_foreach::ptr > (that.value);
break;
case symbol_kind::S_stmt_if: // stmt_if
value.copy< stmt_if::ptr > (that.value);
break;
case symbol_kind::S_stmt_ifelse: // stmt_ifelse
value.copy< stmt_ifelse::ptr > (that.value);
break;
case symbol_kind::S_stmt_list: // stmt_list
case symbol_kind::S_stmt_or_dev_list: // stmt_or_dev_list
value.copy< stmt_list::ptr > (that.value);
break;
case symbol_kind::S_stmt_notify: // stmt_notify
value.copy< stmt_notify::ptr > (that.value);
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.copy< stmt_prof_begin::ptr > (that.value);
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.copy< stmt_prof_end::ptr > (that.value);
break;
case symbol_kind::S_stmt_return: // stmt_return
value.copy< stmt_return::ptr > (that.value);
break;
case symbol_kind::S_stmt_switch: // stmt_switch
value.copy< stmt_switch::ptr > (that.value);
break;
case symbol_kind::S_stmt_wait: // stmt_wait
value.copy< stmt_wait::ptr > (that.value);
break;
case symbol_kind::S_stmt_waitframe: // stmt_waitframe
value.copy< stmt_waitframe::ptr > (that.value);
break;
case symbol_kind::S_stmt_waittill: // stmt_waittill
value.copy< stmt_waittill::ptr > (that.value);
break;
case symbol_kind::S_stmt_waittillframeend: // stmt_waittillframeend
value.copy< stmt_waittillframeend::ptr > (that.value);
break;
case symbol_kind::S_stmt_waittillmatch: // stmt_waittillmatch
value.copy< stmt_waittillmatch::ptr > (that.value);
break;
case symbol_kind::S_stmt_while: // stmt_while
value.copy< stmt_while::ptr > (that.value);
break;
default:
break;
}
location = that.location;
return *this;
}
parser::stack_symbol_type&
parser::stack_symbol_type::operator= (stack_symbol_type& that)
{
state = that.state;
switch (that.kind ())
{
case symbol_kind::S_expr_function: // expr_function
case symbol_kind::S_expr_pointer: // expr_pointer
value.move< call > (that.value);
break;
case symbol_kind::S_declaration: // declaration
value.move< decl > (that.value);
break;
case symbol_kind::S_decl_function: // decl_function
value.move< decl_function::ptr > (that.value);
break;
case symbol_kind::S_decl_usingtree: // decl_usingtree
value.move< decl_usingtree::ptr > (that.value);
break;
case symbol_kind::S_expr: // expr
case symbol_kind::S_expr_or_empty: // expr_or_empty
case symbol_kind::S_expr_assign: // expr_assign
case symbol_kind::S_expr_increment: // expr_increment
case symbol_kind::S_expr_decrement: // expr_decrement
case symbol_kind::S_expr_ternary: // expr_ternary
case symbol_kind::S_expr_binary: // expr_binary
case symbol_kind::S_expr_primitive: // expr_primitive
case symbol_kind::S_expr_tuple: // expr_tuple
case symbol_kind::S_expr_tuple_types: // expr_tuple_types
case symbol_kind::S_expr_object: // expr_object
value.move< expr > (that.value);
break;
case symbol_kind::S_expr_add_array: // expr_add_array
value.move< expr_add_array::ptr > (that.value);
break;
case symbol_kind::S_expr_anim: // expr_anim
value.move< expr_anim::ptr > (that.value);
break;
case symbol_kind::S_expr_animation: // expr_animation
value.move< expr_animation::ptr > (that.value);
break;
case symbol_kind::S_expr_animtree: // expr_animtree
value.move< expr_animtree::ptr > (that.value);
break;
case symbol_kind::S_expr_arguments: // expr_arguments
case symbol_kind::S_expr_arguments_no_empty: // expr_arguments_no_empty
value.move< expr_arguments::ptr > (that.value);
break;
case symbol_kind::S_expr_array: // expr_array
value.move< expr_array::ptr > (that.value);
break;
case symbol_kind::S_expr_call: // expr_call
value.move< expr_call::ptr > (that.value);
break;
case symbol_kind::S_expr_complement: // expr_complement
value.move< expr_complement::ptr > (that.value);
break;
case symbol_kind::S_expr_empty_array: // expr_empty_array
value.move< expr_empty_array::ptr > (that.value);
break;
case symbol_kind::S_expr_false: // expr_false
value.move< expr_false::ptr > (that.value);
break;
case symbol_kind::S_expr_field: // expr_field
value.move< expr_field::ptr > (that.value);
break;
case symbol_kind::S_expr_float: // expr_float
value.move< expr_float::ptr > (that.value);
break;
case symbol_kind::S_expr_game: // expr_game
value.move< expr_game::ptr > (that.value);
break;
case symbol_kind::S_expr_identifier_nosize: // expr_identifier_nosize
case symbol_kind::S_expr_identifier: // expr_identifier
value.move< expr_identifier::ptr > (that.value);
break;
case symbol_kind::S_expr_integer: // expr_integer
value.move< expr_integer::ptr > (that.value);
break;
case symbol_kind::S_expr_isdefined: // expr_isdefined
value.move< expr_isdefined::ptr > (that.value);
break;
case symbol_kind::S_expr_istring: // expr_istring
value.move< expr_istring::ptr > (that.value);
break;
case symbol_kind::S_expr_istrue: // expr_istrue
value.move< expr_istrue::ptr > (that.value);
break;
case symbol_kind::S_expr_level: // expr_level
value.move< expr_level::ptr > (that.value);
break;
case symbol_kind::S_expr_method: // expr_method
value.move< expr_method::ptr > (that.value);
break;
case symbol_kind::S_expr_negate: // expr_negate
value.move< expr_negate::ptr > (that.value);
break;
case symbol_kind::S_expr_not: // expr_not
value.move< expr_not::ptr > (that.value);
break;
case symbol_kind::S_expr_parameters: // expr_parameters
value.move< expr_parameters::ptr > (that.value);
break;
case symbol_kind::S_expr_paren: // expr_paren
value.move< expr_paren::ptr > (that.value);
break;
case symbol_kind::S_expr_path: // expr_path
value.move< expr_path::ptr > (that.value);
break;
case symbol_kind::S_expr_reference: // expr_reference
value.move< expr_reference::ptr > (that.value);
break;
case symbol_kind::S_expr_self: // expr_self
value.move< expr_self::ptr > (that.value);
break;
case symbol_kind::S_expr_size: // expr_size
value.move< expr_size::ptr > (that.value);
break;
case symbol_kind::S_expr_string: // expr_string
value.move< expr_string::ptr > (that.value);
break;
case symbol_kind::S_expr_thisthread: // expr_thisthread
value.move< expr_thisthread::ptr > (that.value);
break;
case symbol_kind::S_expr_true: // expr_true
value.move< expr_true::ptr > (that.value);
break;
case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments
value.move< expr_tuple::ptr > (that.value);
break;
case symbol_kind::S_expr_undefined: // expr_undefined
value.move< expr_undefined::ptr > (that.value);
break;
case symbol_kind::S_expr_vector: // expr_vector
value.move< expr_vector::ptr > (that.value);
break;
case symbol_kind::S_include: // include
value.move< include::ptr > (that.value);
break;
case symbol_kind::S_program: // program
value.move< program::ptr > (that.value);
break;
case symbol_kind::S_PATH: // "path"
case symbol_kind::S_IDENTIFIER: // "identifier"
case symbol_kind::S_STRING: // "string literal"
case symbol_kind::S_ISTRING: // "localized string"
case symbol_kind::S_FLOAT: // "float"
case symbol_kind::S_INTEGER: // "integer"
value.move< std::string > (that.value);
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_stmt_or_dev: // stmt_or_dev
value.move< stmt > (that.value);
break;
case symbol_kind::S_stmt_assign: // stmt_assign
value.move< stmt_assign::ptr > (that.value);
break;
case symbol_kind::S_stmt_break: // stmt_break
value.move< stmt_break::ptr > (that.value);
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint::ptr > (that.value);
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call::ptr > (that.value);
break;
case symbol_kind::S_stmt_case: // stmt_case
value.move< stmt_case::ptr > (that.value);
break;
case symbol_kind::S_stmt_comp: // stmt_comp
value.move< stmt_comp::ptr > (that.value);
break;
case symbol_kind::S_stmt_continue: // stmt_continue
value.move< stmt_continue::ptr > (that.value);
break;
case symbol_kind::S_stmt_default: // stmt_default
value.move< stmt_default::ptr > (that.value);
break;
case symbol_kind::S_stmt_dev: // stmt_dev
value.move< stmt_dev::ptr > (that.value);
break;
case symbol_kind::S_stmt_dowhile: // stmt_dowhile
value.move< stmt_dowhile::ptr > (that.value);
break;
case symbol_kind::S_stmt_endon: // stmt_endon
value.move< stmt_endon::ptr > (that.value);
break;
case symbol_kind::S_stmt_expr: // stmt_expr
value.move< stmt_expr::ptr > (that.value);
break;
case symbol_kind::S_stmt_for: // stmt_for
value.move< stmt_for::ptr > (that.value);
break;
case symbol_kind::S_stmt_foreach: // stmt_foreach
value.move< stmt_foreach::ptr > (that.value);
break;
case symbol_kind::S_stmt_if: // stmt_if
value.move< stmt_if::ptr > (that.value);
break;
case symbol_kind::S_stmt_ifelse: // stmt_ifelse
value.move< stmt_ifelse::ptr > (that.value);
break;
case symbol_kind::S_stmt_list: // stmt_list
case symbol_kind::S_stmt_or_dev_list: // stmt_or_dev_list
value.move< stmt_list::ptr > (that.value);
break;
case symbol_kind::S_stmt_notify: // stmt_notify
value.move< stmt_notify::ptr > (that.value);
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin::ptr > (that.value);
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end::ptr > (that.value);
break;
case symbol_kind::S_stmt_return: // stmt_return
value.move< stmt_return::ptr > (that.value);
break;
case symbol_kind::S_stmt_switch: // stmt_switch
value.move< stmt_switch::ptr > (that.value);
break;
case symbol_kind::S_stmt_wait: // stmt_wait
value.move< stmt_wait::ptr > (that.value);
break;
case symbol_kind::S_stmt_waitframe: // stmt_waitframe
value.move< stmt_waitframe::ptr > (that.value);
break;
case symbol_kind::S_stmt_waittill: // stmt_waittill
value.move< stmt_waittill::ptr > (that.value);
break;
case symbol_kind::S_stmt_waittillframeend: // stmt_waittillframeend
value.move< stmt_waittillframeend::ptr > (that.value);
break;
case symbol_kind::S_stmt_waittillmatch: // stmt_waittillmatch
value.move< stmt_waittillmatch::ptr > (that.value);
break;
case symbol_kind::S_stmt_while: // stmt_while
value.move< stmt_while::ptr > (that.value);
break;
default:
break;
}
location = that.location;
// that is emptied.
that.state = empty_state;
return *this;
}
#endif
template <typename Base>
void
parser::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
{
if (yymsg)
YY_SYMBOL_PRINT (yymsg, yysym);
}
#if GSCDEBUG
template <typename Base>
void
parser::yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const
{
std::ostream& yyoutput = yyo;
YY_USE (yyoutput);
if (yysym.empty ())
yyo << "empty symbol";
else
{
symbol_kind_type yykind = yysym.kind ();
yyo << (yykind < YYNTOKENS ? "token" : "nterm")
<< ' ' << yysym.name () << " ("
<< yysym.location << ": ";
YY_USE (yykind);
yyo << ')';
}
}
#endif
void
parser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym)
{
if (m)
YY_SYMBOL_PRINT (m, sym);
yystack_.push (YY_MOVE (sym));
}
void
parser::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
parser::yypop_ (int n) YY_NOEXCEPT
{
yystack_.pop (n);
}
#if GSCDEBUG
std::ostream&
parser::debug_stream () const
{
return *yycdebug_;
}
void
parser::set_debug_stream (std::ostream& o)
{
yycdebug_ = &o;
}
parser::debug_level_type
parser::debug_level () const
{
return yydebug_;
}
void
parser::set_debug_level (debug_level_type l)
{
yydebug_ = l;
}
#endif // GSCDEBUG
parser::state_type
parser::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
parser::yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT
{
return yyvalue == yypact_ninf_;
}
bool
parser::yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT
{
return yyvalue == yytable_ninf_;
}
int
parser::operator() ()
{
return parse ();
}
int
parser::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;
// Discard the LAC context in case there still is one left from a
// previous invocation.
yy_lac_discard_ ("init");
#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 (ctx_, ppr));
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 ())
{
if (!yy_lac_establish_ (yyla.kind ()))
goto yyerrlab;
goto yydefault;
}
// Reduce or error.
yyn = yytable_[yyn];
if (yyn <= 0)
{
if (yy_table_value_is_error_ (yyn))
goto yyerrlab;
if (!yy_lac_establish_ (yyla.kind ()))
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));
yy_lac_discard_ ("shift");
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 symbol_kind::S_expr_function: // expr_function
case symbol_kind::S_expr_pointer: // expr_pointer
yylhs.value.emplace< call > ();
break;
case symbol_kind::S_declaration: // declaration
yylhs.value.emplace< decl > ();
break;
case symbol_kind::S_decl_function: // decl_function
yylhs.value.emplace< decl_function::ptr > ();
break;
case symbol_kind::S_decl_usingtree: // decl_usingtree
yylhs.value.emplace< decl_usingtree::ptr > ();
break;
case symbol_kind::S_expr: // expr
case symbol_kind::S_expr_or_empty: // expr_or_empty
case symbol_kind::S_expr_assign: // expr_assign
case symbol_kind::S_expr_increment: // expr_increment
case symbol_kind::S_expr_decrement: // expr_decrement
case symbol_kind::S_expr_ternary: // expr_ternary
case symbol_kind::S_expr_binary: // expr_binary
case symbol_kind::S_expr_primitive: // expr_primitive
case symbol_kind::S_expr_tuple: // expr_tuple
case symbol_kind::S_expr_tuple_types: // expr_tuple_types
case symbol_kind::S_expr_object: // expr_object
yylhs.value.emplace< expr > ();
break;
case symbol_kind::S_expr_add_array: // expr_add_array
yylhs.value.emplace< expr_add_array::ptr > ();
break;
case symbol_kind::S_expr_anim: // expr_anim
yylhs.value.emplace< expr_anim::ptr > ();
break;
case symbol_kind::S_expr_animation: // expr_animation
yylhs.value.emplace< expr_animation::ptr > ();
break;
case symbol_kind::S_expr_animtree: // expr_animtree
yylhs.value.emplace< expr_animtree::ptr > ();
break;
case symbol_kind::S_expr_arguments: // expr_arguments
case symbol_kind::S_expr_arguments_no_empty: // expr_arguments_no_empty
yylhs.value.emplace< expr_arguments::ptr > ();
break;
case symbol_kind::S_expr_array: // expr_array
yylhs.value.emplace< expr_array::ptr > ();
break;
case symbol_kind::S_expr_call: // expr_call
yylhs.value.emplace< expr_call::ptr > ();
break;
case symbol_kind::S_expr_complement: // expr_complement
yylhs.value.emplace< expr_complement::ptr > ();
break;
case symbol_kind::S_expr_empty_array: // expr_empty_array
yylhs.value.emplace< expr_empty_array::ptr > ();
break;
case symbol_kind::S_expr_false: // expr_false
yylhs.value.emplace< expr_false::ptr > ();
break;
case symbol_kind::S_expr_field: // expr_field
yylhs.value.emplace< expr_field::ptr > ();
break;
case symbol_kind::S_expr_float: // expr_float
yylhs.value.emplace< expr_float::ptr > ();
break;
case symbol_kind::S_expr_game: // expr_game
yylhs.value.emplace< expr_game::ptr > ();
break;
case symbol_kind::S_expr_identifier_nosize: // expr_identifier_nosize
case symbol_kind::S_expr_identifier: // expr_identifier
yylhs.value.emplace< expr_identifier::ptr > ();
break;
case symbol_kind::S_expr_integer: // expr_integer
yylhs.value.emplace< expr_integer::ptr > ();
break;
case symbol_kind::S_expr_isdefined: // expr_isdefined
yylhs.value.emplace< expr_isdefined::ptr > ();
break;
case symbol_kind::S_expr_istring: // expr_istring
yylhs.value.emplace< expr_istring::ptr > ();
break;
case symbol_kind::S_expr_istrue: // expr_istrue
yylhs.value.emplace< expr_istrue::ptr > ();
break;
case symbol_kind::S_expr_level: // expr_level
yylhs.value.emplace< expr_level::ptr > ();
break;
case symbol_kind::S_expr_method: // expr_method
yylhs.value.emplace< expr_method::ptr > ();
break;
case symbol_kind::S_expr_negate: // expr_negate
yylhs.value.emplace< expr_negate::ptr > ();
break;
case symbol_kind::S_expr_not: // expr_not
yylhs.value.emplace< expr_not::ptr > ();
break;
case symbol_kind::S_expr_parameters: // expr_parameters
yylhs.value.emplace< expr_parameters::ptr > ();
break;
case symbol_kind::S_expr_paren: // expr_paren
yylhs.value.emplace< expr_paren::ptr > ();
break;
case symbol_kind::S_expr_path: // expr_path
yylhs.value.emplace< expr_path::ptr > ();
break;
case symbol_kind::S_expr_reference: // expr_reference
yylhs.value.emplace< expr_reference::ptr > ();
break;
case symbol_kind::S_expr_self: // expr_self
yylhs.value.emplace< expr_self::ptr > ();
break;
case symbol_kind::S_expr_size: // expr_size
yylhs.value.emplace< expr_size::ptr > ();
break;
case symbol_kind::S_expr_string: // expr_string
yylhs.value.emplace< expr_string::ptr > ();
break;
case symbol_kind::S_expr_thisthread: // expr_thisthread
yylhs.value.emplace< expr_thisthread::ptr > ();
break;
case symbol_kind::S_expr_true: // expr_true
yylhs.value.emplace< expr_true::ptr > ();
break;
case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments
yylhs.value.emplace< expr_tuple::ptr > ();
break;
case symbol_kind::S_expr_undefined: // expr_undefined
yylhs.value.emplace< expr_undefined::ptr > ();
break;
case symbol_kind::S_expr_vector: // expr_vector
yylhs.value.emplace< expr_vector::ptr > ();
break;
case symbol_kind::S_include: // include
yylhs.value.emplace< include::ptr > ();
break;
case symbol_kind::S_program: // program
yylhs.value.emplace< program::ptr > ();
break;
case symbol_kind::S_PATH: // "path"
case symbol_kind::S_IDENTIFIER: // "identifier"
case symbol_kind::S_STRING: // "string literal"
case symbol_kind::S_ISTRING: // "localized string"
case symbol_kind::S_FLOAT: // "float"
case symbol_kind::S_INTEGER: // "integer"
yylhs.value.emplace< std::string > ();
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_stmt_or_dev: // stmt_or_dev
yylhs.value.emplace< stmt > ();
break;
case symbol_kind::S_stmt_assign: // stmt_assign
yylhs.value.emplace< stmt_assign::ptr > ();
break;
case symbol_kind::S_stmt_break: // stmt_break
yylhs.value.emplace< stmt_break::ptr > ();
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
yylhs.value.emplace< stmt_breakpoint::ptr > ();
break;
case symbol_kind::S_stmt_call: // stmt_call
yylhs.value.emplace< stmt_call::ptr > ();
break;
case symbol_kind::S_stmt_case: // stmt_case
yylhs.value.emplace< stmt_case::ptr > ();
break;
case symbol_kind::S_stmt_comp: // stmt_comp
yylhs.value.emplace< stmt_comp::ptr > ();
break;
case symbol_kind::S_stmt_continue: // stmt_continue
yylhs.value.emplace< stmt_continue::ptr > ();
break;
case symbol_kind::S_stmt_default: // stmt_default
yylhs.value.emplace< stmt_default::ptr > ();
break;
case symbol_kind::S_stmt_dev: // stmt_dev
yylhs.value.emplace< stmt_dev::ptr > ();
break;
case symbol_kind::S_stmt_dowhile: // stmt_dowhile
yylhs.value.emplace< stmt_dowhile::ptr > ();
break;
case symbol_kind::S_stmt_endon: // stmt_endon
yylhs.value.emplace< stmt_endon::ptr > ();
break;
case symbol_kind::S_stmt_expr: // stmt_expr
yylhs.value.emplace< stmt_expr::ptr > ();
break;
case symbol_kind::S_stmt_for: // stmt_for
yylhs.value.emplace< stmt_for::ptr > ();
break;
case symbol_kind::S_stmt_foreach: // stmt_foreach
yylhs.value.emplace< stmt_foreach::ptr > ();
break;
case symbol_kind::S_stmt_if: // stmt_if
yylhs.value.emplace< stmt_if::ptr > ();
break;
case symbol_kind::S_stmt_ifelse: // stmt_ifelse
yylhs.value.emplace< stmt_ifelse::ptr > ();
break;
case symbol_kind::S_stmt_list: // stmt_list
case symbol_kind::S_stmt_or_dev_list: // stmt_or_dev_list
yylhs.value.emplace< stmt_list::ptr > ();
break;
case symbol_kind::S_stmt_notify: // stmt_notify
yylhs.value.emplace< stmt_notify::ptr > ();
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
yylhs.value.emplace< stmt_prof_begin::ptr > ();
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
yylhs.value.emplace< stmt_prof_end::ptr > ();
break;
case symbol_kind::S_stmt_return: // stmt_return
yylhs.value.emplace< stmt_return::ptr > ();
break;
case symbol_kind::S_stmt_switch: // stmt_switch
yylhs.value.emplace< stmt_switch::ptr > ();
break;
case symbol_kind::S_stmt_wait: // stmt_wait
yylhs.value.emplace< stmt_wait::ptr > ();
break;
case symbol_kind::S_stmt_waitframe: // stmt_waitframe
yylhs.value.emplace< stmt_waitframe::ptr > ();
break;
case symbol_kind::S_stmt_waittill: // stmt_waittill
yylhs.value.emplace< stmt_waittill::ptr > ();
break;
case symbol_kind::S_stmt_waittillframeend: // stmt_waittillframeend
yylhs.value.emplace< stmt_waittillframeend::ptr > ();
break;
case symbol_kind::S_stmt_waittillmatch: // stmt_waittillmatch
yylhs.value.emplace< stmt_waittillmatch::ptr > ();
break;
case symbol_kind::S_stmt_while: // stmt_while
yylhs.value.emplace< stmt_while::ptr > ();
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 2: // root: program
#line 267 "parser.ypp"
{ ast = std::move(yystack_[0].value.as < program::ptr > ()); }
#line 2081 "parser.cpp"
break;
case 3: // root: %empty
#line 268 "parser.ypp"
{ ast = make_program(yylhs.location); }
#line 2087 "parser.cpp"
break;
case 4: // program: program inline
#line 273 "parser.ypp"
{ yylhs.value.as < program::ptr > () = std::move(yystack_[1].value.as < program::ptr > ()); }
#line 2093 "parser.cpp"
break;
case 5: // program: program include
#line 275 "parser.ypp"
{ yylhs.value.as < program::ptr > () = std::move(yystack_[1].value.as < program::ptr > ()); yylhs.value.as < program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < include::ptr > ())); }
#line 2099 "parser.cpp"
break;
case 6: // program: program declaration
#line 277 "parser.ypp"
{ yylhs.value.as < program::ptr > () = std::move(yystack_[1].value.as < program::ptr > ()); yylhs.value.as < program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < decl > ())); }
#line 2105 "parser.cpp"
break;
case 7: // program: inline
#line 279 "parser.ypp"
{ yylhs.value.as < program::ptr > () = make_program(yylhs.location); }
#line 2111 "parser.cpp"
break;
case 8: // program: include
#line 281 "parser.ypp"
{ yylhs.value.as < program::ptr > () = make_program(yylhs.location); yylhs.value.as < program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < include::ptr > ())); }
#line 2117 "parser.cpp"
break;
case 9: // program: declaration
#line 283 "parser.ypp"
{ yylhs.value.as < program::ptr > () = make_program(yylhs.location); yylhs.value.as < program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < decl > ())); }
#line 2123 "parser.cpp"
break;
case 10: // inline: "#inline" expr_path ";"
#line 287 "parser.ypp"
{ ppr.push_header(yystack_[1].value.as < expr_path::ptr > ()->value); }
#line 2129 "parser.cpp"
break;
case 11: // include: "#include" expr_path ";"
#line 292 "parser.ypp"
{ yylhs.value.as < include::ptr > () = make_include(yylhs.location, std::move(yystack_[1].value.as < expr_path::ptr > ())); }
#line 2135 "parser.cpp"
break;
case 12: // declaration: "/#"
#line 296 "parser.ypp"
{ yylhs.value.as < decl > ().as_dev_begin = make_decl_dev_begin(yylhs.location); }
#line 2141 "parser.cpp"
break;
case 13: // declaration: "#/"
#line 297 "parser.ypp"
{ yylhs.value.as < decl > ().as_dev_end = make_decl_dev_end(yylhs.location); }
#line 2147 "parser.cpp"
break;
case 14: // declaration: decl_usingtree
#line 298 "parser.ypp"
{ yylhs.value.as < decl > ().as_usingtree = std::move(yystack_[0].value.as < decl_usingtree::ptr > ()); }
#line 2153 "parser.cpp"
break;
case 15: // declaration: decl_function
#line 299 "parser.ypp"
{ yylhs.value.as < decl > ().as_function = std::move(yystack_[0].value.as < decl_function::ptr > ()); }
#line 2159 "parser.cpp"
break;
case 16: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";"
#line 304 "parser.ypp"
{ ppr.ban_header(yylhs.location); yylhs.value.as < decl_usingtree::ptr > () = make_decl_usingtree(yylhs.location, std::move(yystack_[2].value.as < expr_string::ptr > ())); }
#line 2165 "parser.cpp"
break;
case 17: // decl_function: expr_identifier "(" expr_parameters ")" stmt_comp
#line 309 "parser.ypp"
{ ppr.ban_header(yylhs.location); yylhs.value.as < decl_function::ptr > () = make_decl_function(yylhs.location, std::move(yystack_[4].value.as < expr_identifier::ptr > ()), std::move(yystack_[2].value.as < expr_parameters::ptr > ()), std::move(yystack_[0].value.as < stmt_comp::ptr > ())); }
#line 2171 "parser.cpp"
break;
case 18: // stmt: stmt_comp
#line 313 "parser.ypp"
{ yylhs.value.as < stmt > ().as_comp = std::move(yystack_[0].value.as < stmt_comp::ptr > ()); }
#line 2177 "parser.cpp"
break;
case 19: // stmt: stmt_call
#line 314 "parser.ypp"
{ yylhs.value.as < stmt > ().as_call = std::move(yystack_[0].value.as < stmt_call::ptr > ()); }
#line 2183 "parser.cpp"
break;
case 20: // stmt: stmt_assign
#line 315 "parser.ypp"
{ yylhs.value.as < stmt > ().as_assign = std::move(yystack_[0].value.as < stmt_assign::ptr > ()); }
#line 2189 "parser.cpp"
break;
case 21: // stmt: stmt_endon
#line 316 "parser.ypp"
{ yylhs.value.as < stmt > ().as_endon = std::move(yystack_[0].value.as < stmt_endon::ptr > ()); }
#line 2195 "parser.cpp"
break;
case 22: // stmt: stmt_notify
#line 317 "parser.ypp"
{ yylhs.value.as < stmt > ().as_notify = std::move(yystack_[0].value.as < stmt_notify::ptr > ()); }
#line 2201 "parser.cpp"
break;
case 23: // stmt: stmt_wait
#line 318 "parser.ypp"
{ yylhs.value.as < stmt > ().as_wait = std::move(yystack_[0].value.as < stmt_wait::ptr > ()); }
#line 2207 "parser.cpp"
break;
case 24: // stmt: stmt_waittill
#line 319 "parser.ypp"
{ yylhs.value.as < stmt > ().as_waittill = std::move(yystack_[0].value.as < stmt_waittill::ptr > ()); }
#line 2213 "parser.cpp"
break;
case 25: // stmt: stmt_waittillmatch
#line 320 "parser.ypp"
{ yylhs.value.as < stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < stmt_waittillmatch::ptr > ()); }
#line 2219 "parser.cpp"
break;
case 26: // stmt: stmt_waittillframeend
#line 321 "parser.ypp"
{ yylhs.value.as < stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < stmt_waittillframeend::ptr > ()); }
#line 2225 "parser.cpp"
break;
case 27: // stmt: stmt_waitframe
#line 322 "parser.ypp"
{ yylhs.value.as < stmt > ().as_waitframe = std::move(yystack_[0].value.as < stmt_waitframe::ptr > ()); }
#line 2231 "parser.cpp"
break;
case 28: // stmt: stmt_if
#line 323 "parser.ypp"
{ yylhs.value.as < stmt > ().as_if = std::move(yystack_[0].value.as < stmt_if::ptr > ()); }
#line 2237 "parser.cpp"
break;
case 29: // stmt: stmt_ifelse
#line 324 "parser.ypp"
{ yylhs.value.as < stmt > ().as_ifelse = std::move(yystack_[0].value.as < stmt_ifelse::ptr > ()); }
#line 2243 "parser.cpp"
break;
case 30: // stmt: stmt_while
#line 325 "parser.ypp"
{ yylhs.value.as < stmt > ().as_while = std::move(yystack_[0].value.as < stmt_while::ptr > ()); }
#line 2249 "parser.cpp"
break;
case 31: // stmt: stmt_dowhile
#line 326 "parser.ypp"
{ yylhs.value.as < stmt > ().as_dowhile = std::move(yystack_[0].value.as < stmt_dowhile::ptr > ()); }
#line 2255 "parser.cpp"
break;
case 32: // stmt: stmt_for
#line 327 "parser.ypp"
{ yylhs.value.as < stmt > ().as_for = std::move(yystack_[0].value.as < stmt_for::ptr > ()); }
#line 2261 "parser.cpp"
break;
case 33: // stmt: stmt_foreach
#line 328 "parser.ypp"
{ yylhs.value.as < stmt > ().as_foreach = std::move(yystack_[0].value.as < stmt_foreach::ptr > ()); }
#line 2267 "parser.cpp"
break;
case 34: // stmt: stmt_switch
#line 329 "parser.ypp"
{ yylhs.value.as < stmt > ().as_switch = std::move(yystack_[0].value.as < stmt_switch::ptr > ()); }
#line 2273 "parser.cpp"
break;
case 35: // stmt: stmt_case
#line 330 "parser.ypp"
{ yylhs.value.as < stmt > ().as_case = std::move(yystack_[0].value.as < stmt_case::ptr > ()); }
#line 2279 "parser.cpp"
break;
case 36: // stmt: stmt_default
#line 331 "parser.ypp"
{ yylhs.value.as < stmt > ().as_default = std::move(yystack_[0].value.as < stmt_default::ptr > ()); }
#line 2285 "parser.cpp"
break;
case 37: // stmt: stmt_break
#line 332 "parser.ypp"
{ yylhs.value.as < stmt > ().as_break = std::move(yystack_[0].value.as < stmt_break::ptr > ()); }
#line 2291 "parser.cpp"
break;
case 38: // stmt: stmt_continue
#line 333 "parser.ypp"
{ yylhs.value.as < stmt > ().as_continue = std::move(yystack_[0].value.as < stmt_continue::ptr > ()); }
#line 2297 "parser.cpp"
break;
case 39: // stmt: stmt_return
#line 334 "parser.ypp"
{ yylhs.value.as < stmt > ().as_return = std::move(yystack_[0].value.as < stmt_return::ptr > ()); }
#line 2303 "parser.cpp"
break;
case 40: // stmt: stmt_breakpoint
#line 335 "parser.ypp"
{ yylhs.value.as < stmt > ().as_breakpoint = std::move(yystack_[0].value.as < stmt_breakpoint::ptr > ()); }
#line 2309 "parser.cpp"
break;
case 41: // stmt: stmt_prof_begin
#line 336 "parser.ypp"
{ yylhs.value.as < stmt > ().as_prof_begin = std::move(yystack_[0].value.as < stmt_prof_begin::ptr > ()); }
#line 2315 "parser.cpp"
break;
case 42: // stmt: stmt_prof_end
#line 337 "parser.ypp"
{ yylhs.value.as < stmt > ().as_prof_end = std::move(yystack_[0].value.as < stmt_prof_end::ptr > ()); }
#line 2321 "parser.cpp"
break;
case 43: // stmt_or_dev: stmt
#line 341 "parser.ypp"
{ yylhs.value.as < stmt > () = std::move(yystack_[0].value.as < stmt > ()); }
#line 2327 "parser.cpp"
break;
case 44: // stmt_or_dev: stmt_dev
#line 342 "parser.ypp"
{ yylhs.value.as < stmt > ().as_dev = std::move(yystack_[0].value.as < stmt_dev::ptr > ()); }
#line 2333 "parser.cpp"
break;
case 45: // stmt_list: stmt_list stmt
#line 347 "parser.ypp"
{ yylhs.value.as < stmt_list::ptr > () = std::move(yystack_[1].value.as < stmt_list::ptr > ()); yylhs.value.as < stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < stmt > ())); }
#line 2339 "parser.cpp"
break;
case 46: // stmt_list: stmt
#line 349 "parser.ypp"
{ yylhs.value.as < stmt_list::ptr > () = make_stmt_list(yylhs.location); yylhs.value.as < stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < stmt > ())); }
#line 2345 "parser.cpp"
break;
case 47: // stmt_list: stmt_list ";"
#line 351 "parser.ypp"
{ yylhs.value.as < stmt_list::ptr > () = std::move(yystack_[1].value.as < stmt_list::ptr > ()); }
#line 2351 "parser.cpp"
break;
case 48: // stmt_list: ";"
#line 353 "parser.ypp"
{ yylhs.value.as < stmt_list::ptr > () = make_stmt_list(yylhs.location); }
#line 2357 "parser.cpp"
break;
case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev
#line 358 "parser.ypp"
{ yylhs.value.as < stmt_list::ptr > () = std::move(yystack_[1].value.as < stmt_list::ptr > ()); yylhs.value.as < stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < stmt > ())); }
#line 2363 "parser.cpp"
break;
case 50: // stmt_or_dev_list: stmt_or_dev
#line 360 "parser.ypp"
{ yylhs.value.as < stmt_list::ptr > () = make_stmt_list(yylhs.location); yylhs.value.as < stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < stmt > ())); }
#line 2369 "parser.cpp"
break;
case 51: // stmt_or_dev_list: stmt_or_dev_list ";"
#line 362 "parser.ypp"
{ yylhs.value.as < stmt_list::ptr > () = std::move(yystack_[1].value.as < stmt_list::ptr > ()); }
#line 2375 "parser.cpp"
break;
case 52: // stmt_or_dev_list: ";"
#line 364 "parser.ypp"
{ yylhs.value.as < stmt_list::ptr > () = make_stmt_list(yylhs.location); }
#line 2381 "parser.cpp"
break;
case 53: // stmt_dev: "/#" stmt_list "#/"
#line 368 "parser.ypp"
{ yylhs.value.as < stmt_dev::ptr > () = make_stmt_dev(yylhs.location, std::move(yystack_[1].value.as < stmt_list::ptr > ())); }
#line 2387 "parser.cpp"
break;
case 54: // stmt_dev: "/#" "#/"
#line 369 "parser.ypp"
{ yylhs.value.as < stmt_dev::ptr > () = make_stmt_dev(yylhs.location, make_stmt_list(yylhs.location)); }
#line 2393 "parser.cpp"
break;
case 55: // stmt_comp: "{" stmt_or_dev_list "}"
#line 373 "parser.ypp"
{ yylhs.value.as < stmt_comp::ptr > () = make_stmt_comp(yylhs.location, std::move(yystack_[1].value.as < stmt_list::ptr > ())); }
#line 2399 "parser.cpp"
break;
case 56: // stmt_comp: "{" "}"
#line 374 "parser.ypp"
{ yylhs.value.as < stmt_comp::ptr > () = make_stmt_comp(yylhs.location, make_stmt_list(yylhs.location)); }
#line 2405 "parser.cpp"
break;
case 57: // stmt_expr: expr_assign
#line 379 "parser.ypp"
{ yylhs.value.as < stmt_expr::ptr > () = make_stmt_expr(yylhs.location, std::move(yystack_[0].value.as < expr > ())); }
#line 2411 "parser.cpp"
break;
case 58: // stmt_expr: expr_increment
#line 381 "parser.ypp"
{ yylhs.value.as < stmt_expr::ptr > () = make_stmt_expr(yylhs.location, std::move(yystack_[0].value.as < expr > ())); }
#line 2417 "parser.cpp"
break;
case 59: // stmt_expr: expr_decrement
#line 383 "parser.ypp"
{ yylhs.value.as < stmt_expr::ptr > () = make_stmt_expr(yylhs.location, std::move(yystack_[0].value.as < expr > ())); }
#line 2423 "parser.cpp"
break;
case 60: // stmt_expr: %empty
#line 385 "parser.ypp"
{ yylhs.value.as < stmt_expr::ptr > () = make_stmt_expr(yylhs.location, make_node(yylhs.location)); }
#line 2429 "parser.cpp"
break;
case 61: // stmt_call: expr_call ";"
#line 390 "parser.ypp"
{ yylhs.value.as < stmt_call::ptr > () = make_stmt_call(yylhs.location, expr{ std::move(yystack_[1].value.as < expr_call::ptr > ()) }); }
#line 2435 "parser.cpp"
break;
case 62: // stmt_call: expr_method ";"
#line 392 "parser.ypp"
{ yylhs.value.as < stmt_call::ptr > () = make_stmt_call(yylhs.location, expr{ std::move(yystack_[1].value.as < expr_method::ptr > ()) }); }
#line 2441 "parser.cpp"
break;
case 63: // stmt_assign: expr_assign ";"
#line 397 "parser.ypp"
{ yylhs.value.as < stmt_assign::ptr > () = make_stmt_assign(yylhs.location, std::move(yystack_[1].value.as < expr > ())); }
#line 2447 "parser.cpp"
break;
case 64: // stmt_assign: expr_increment ";"
#line 399 "parser.ypp"
{ yylhs.value.as < stmt_assign::ptr > () = make_stmt_assign(yylhs.location, std::move(yystack_[1].value.as < expr > ())); }
#line 2453 "parser.cpp"
break;
case 65: // stmt_assign: expr_decrement ";"
#line 401 "parser.ypp"
{ yylhs.value.as < stmt_assign::ptr > () = make_stmt_assign(yylhs.location, std::move(yystack_[1].value.as < expr > ())); }
#line 2459 "parser.cpp"
break;
case 66: // stmt_endon: expr_object "endon" "(" expr ")" ";"
#line 406 "parser.ypp"
{ yylhs.value.as < stmt_endon::ptr > () = make_stmt_endon(yylhs.location, std::move(yystack_[5].value.as < expr > ()), std::move(yystack_[2].value.as < expr > ())); }
#line 2465 "parser.cpp"
break;
case 67: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";"
#line 411 "parser.ypp"
{ yylhs.value.as < stmt_notify::ptr > () = make_stmt_notify(yylhs.location, std::move(yystack_[7].value.as < expr > ()), std::move(yystack_[4].value.as < expr > ()), std::move(yystack_[2].value.as < expr_arguments::ptr > ())); }
#line 2471 "parser.cpp"
break;
case 68: // stmt_notify: expr_object "notify" "(" expr ")" ";"
#line 413 "parser.ypp"
{ yylhs.value.as < stmt_notify::ptr > () = make_stmt_notify(yylhs.location, std::move(yystack_[5].value.as < expr > ()), std::move(yystack_[2].value.as < expr > ()), make_expr_arguments(yylhs.location)); }
#line 2477 "parser.cpp"
break;
case 69: // stmt_wait: "wait" expr ";"
#line 418 "parser.ypp"
{ yylhs.value.as < stmt_wait::ptr > () = make_stmt_wait(yylhs.location, std::move(yystack_[1].value.as < expr > ())); }
#line 2483 "parser.cpp"
break;
case 70: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";"
#line 423 "parser.ypp"
{ yylhs.value.as < stmt_waittill::ptr > () = make_stmt_waittill(yylhs.location, std::move(yystack_[7].value.as < expr > ()), std::move(yystack_[4].value.as < expr > ()), std::move(yystack_[2].value.as < expr_arguments::ptr > ())); }
#line 2489 "parser.cpp"
break;
case 71: // stmt_waittill: expr_object "waittill" "(" expr ")" ";"
#line 425 "parser.ypp"
{ yylhs.value.as < stmt_waittill::ptr > () = make_stmt_waittill(yylhs.location, std::move(yystack_[5].value.as < expr > ()), std::move(yystack_[2].value.as < expr > ()), make_expr_arguments(yylhs.location)); }
#line 2495 "parser.cpp"
break;
case 72: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";"
#line 430 "parser.ypp"
{ yylhs.value.as < stmt_waittillmatch::ptr > () = make_stmt_waittillmatch(yylhs.location, std::move(yystack_[7].value.as < expr > ()), std::move(yystack_[4].value.as < expr > ()), std::move(yystack_[2].value.as < expr_arguments::ptr > ())); }
#line 2501 "parser.cpp"
break;
case 73: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";"
#line 432 "parser.ypp"
{ yylhs.value.as < stmt_waittillmatch::ptr > () = make_stmt_waittillmatch(yylhs.location, std::move(yystack_[5].value.as < expr > ()), std::move(yystack_[2].value.as < expr > ()), make_expr_arguments(yylhs.location)); }
#line 2507 "parser.cpp"
break;
case 74: // stmt_waittillframeend: "waittillframeend" ";"
#line 437 "parser.ypp"
{ yylhs.value.as < stmt_waittillframeend::ptr > () = make_stmt_waittillframeend(yylhs.location); }
#line 2513 "parser.cpp"
break;
case 75: // stmt_waitframe: "waitframe" ";"
#line 442 "parser.ypp"
{ yylhs.value.as < stmt_waitframe::ptr > () = make_stmt_waitframe(yylhs.location); }
#line 2519 "parser.cpp"
break;
case 76: // stmt_waitframe: "waitframe" "(" ")" ";"
#line 444 "parser.ypp"
{ yylhs.value.as < stmt_waitframe::ptr > () = make_stmt_waitframe(yylhs.location); }
#line 2525 "parser.cpp"
break;
case 77: // stmt_if: "if" "(" expr ")" stmt
#line 449 "parser.ypp"
{ yylhs.value.as < stmt_if::ptr > () = make_stmt_if(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < stmt > ())); }
#line 2531 "parser.cpp"
break;
case 78: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt
#line 454 "parser.ypp"
{ yylhs.value.as < stmt_ifelse::ptr > () = make_stmt_ifelse(yylhs.location, std::move(yystack_[4].value.as < expr > ()), std::move(yystack_[2].value.as < stmt > ()), std::move(yystack_[0].value.as < stmt > ())); }
#line 2537 "parser.cpp"
break;
case 79: // stmt_while: "while" "(" expr ")" stmt
#line 459 "parser.ypp"
{ yylhs.value.as < stmt_while::ptr > () = make_stmt_while(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < stmt > ())); }
#line 2543 "parser.cpp"
break;
case 80: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";"
#line 464 "parser.ypp"
{ yylhs.value.as < stmt_dowhile::ptr > () = make_stmt_dowhile(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[5].value.as < stmt > ())); }
#line 2549 "parser.cpp"
break;
case 81: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt
#line 469 "parser.ypp"
{ yylhs.value.as < stmt_for::ptr > () = make_stmt_for(yylhs.location, stmt{ std::move(yystack_[6].value.as < stmt_expr::ptr > ()) }, std::move(yystack_[4].value.as < expr > ()), stmt{ std::move(yystack_[2].value.as < stmt_expr::ptr > ()) }, std::move(yystack_[0].value.as < stmt > ())); }
#line 2555 "parser.cpp"
break;
case 82: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt
#line 474 "parser.ypp"
{
auto array = expr{ make_expr_identifier(yylhs.location, fmt::format("_temp_{}", ++index)) };
auto key = expr{ make_expr_identifier(yylhs.location, fmt::format("_temp_{}", ++index)) };
yylhs.value.as < stmt_foreach::ptr > () = make_stmt_foreach(yylhs.location, std::move(yystack_[2].value.as < expr > ()), expr{ std::move(yystack_[4].value.as < expr_identifier::ptr > ()) }, expr{ make_node(yylhs.location) }, std::move(array), std::move(key), std::move(yystack_[0].value.as < stmt > ()), false); }
#line 2564 "parser.cpp"
break;
case 83: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt
#line 479 "parser.ypp"
{
auto array = expr{ make_expr_identifier(yylhs.location, fmt::format("_temp_{}", ++index)) };
auto key = (ctx_->props() & props::foreach) ? expr{ make_expr_identifier(yylhs.location, fmt::format("_temp_{}", ++index)) } : expr{ std::move(yystack_[6].value.as < expr_identifier::ptr > ()) };
yylhs.value.as < stmt_foreach::ptr > () = make_stmt_foreach(yylhs.location, std::move(yystack_[2].value.as < expr > ()), expr{ std::move(yystack_[4].value.as < expr_identifier::ptr > ()) }, (ctx_->props() & props::foreach) ? expr{ std::move(yystack_[6].value.as < expr_identifier::ptr > ()) } : expr{ make_node(yylhs.location) }, std::move(array), std::move(key), std::move(yystack_[0].value.as < stmt > ()), true);
}
#line 2574 "parser.cpp"
break;
case 84: // stmt_switch: "switch" "(" expr ")" stmt_comp
#line 488 "parser.ypp"
{ yylhs.value.as < stmt_switch::ptr > () = make_stmt_switch(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < stmt_comp::ptr > ()));
parse_switch(*yylhs.value.as < stmt_switch::ptr > ());
}
#line 2582 "parser.cpp"
break;
case 85: // stmt_case: "case" expr_integer ":"
#line 495 "parser.ypp"
{ yylhs.value.as < stmt_case::ptr > () = make_stmt_case(yylhs.location, expr{ std::move(yystack_[1].value.as < expr_integer::ptr > ()) }, make_stmt_list(yylhs.location)); }
#line 2588 "parser.cpp"
break;
case 86: // stmt_case: "case" expr_string ":"
#line 497 "parser.ypp"
{ yylhs.value.as < stmt_case::ptr > () = make_stmt_case(yylhs.location, expr{ std::move(yystack_[1].value.as < expr_string::ptr > ()) }, make_stmt_list(yylhs.location)); }
#line 2594 "parser.cpp"
break;
case 87: // stmt_default: "default" ":"
#line 502 "parser.ypp"
{ yylhs.value.as < stmt_default::ptr > () = make_stmt_default(yylhs.location, make_stmt_list(yylhs.location)); }
#line 2600 "parser.cpp"
break;
case 88: // stmt_break: "break" ";"
#line 507 "parser.ypp"
{ yylhs.value.as < stmt_break::ptr > () = make_stmt_break(yylhs.location); }
#line 2606 "parser.cpp"
break;
case 89: // stmt_continue: "continue" ";"
#line 512 "parser.ypp"
{ yylhs.value.as < stmt_continue::ptr > () = make_stmt_continue(yylhs.location); }
#line 2612 "parser.cpp"
break;
case 90: // stmt_return: "return" expr ";"
#line 517 "parser.ypp"
{ yylhs.value.as < stmt_return::ptr > () = make_stmt_return(yylhs.location, std::move(yystack_[1].value.as < expr > ())); }
#line 2618 "parser.cpp"
break;
case 91: // stmt_return: "return" ";"
#line 519 "parser.ypp"
{ yylhs.value.as < stmt_return::ptr > () = make_stmt_return(yylhs.location, make_node(yylhs.location)); }
#line 2624 "parser.cpp"
break;
case 92: // stmt_breakpoint: "breakpoint" ";"
#line 524 "parser.ypp"
{ yylhs.value.as < stmt_breakpoint::ptr > () = make_stmt_breakpoint(yylhs.location); }
#line 2630 "parser.cpp"
break;
case 93: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";"
#line 529 "parser.ypp"
{ yylhs.value.as < stmt_prof_begin::ptr > () = make_stmt_prof_begin(yylhs.location, std::move(yystack_[2].value.as < expr_arguments::ptr > ())); }
#line 2636 "parser.cpp"
break;
case 94: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";"
#line 534 "parser.ypp"
{ yylhs.value.as < stmt_prof_end::ptr > () = make_stmt_prof_end(yylhs.location, std::move(yystack_[2].value.as < expr_arguments::ptr > ())); }
#line 2642 "parser.cpp"
break;
case 95: // expr: expr_ternary
#line 538 "parser.ypp"
{ yylhs.value.as < expr > () = std::move(yystack_[0].value.as < expr > ()); }
#line 2648 "parser.cpp"
break;
case 96: // expr: expr_binary
#line 539 "parser.ypp"
{ yylhs.value.as < expr > () = std::move(yystack_[0].value.as < expr > ()); }
#line 2654 "parser.cpp"
break;
case 97: // expr: expr_primitive
#line 540 "parser.ypp"
{ yylhs.value.as < expr > () = std::move(yystack_[0].value.as < expr > ()); }
#line 2660 "parser.cpp"
break;
case 98: // expr_or_empty: expr
#line 544 "parser.ypp"
{ yylhs.value.as < expr > () = std::move(yystack_[0].value.as < expr > ()); }
#line 2666 "parser.cpp"
break;
case 99: // expr_or_empty: %empty
#line 545 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_node(yylhs.location); }
#line 2672 "parser.cpp"
break;
case 100: // expr_assign: expr_tuple "=" expr
#line 550 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_equal(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2678 "parser.cpp"
break;
case 101: // expr_assign: expr_object "=" expr
#line 552 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_equal(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2684 "parser.cpp"
break;
case 102: // expr_assign: expr_object "|=" expr
#line 554 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_bitwise_or(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2690 "parser.cpp"
break;
case 103: // expr_assign: expr_object "&=" expr
#line 556 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_bitwise_and(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2696 "parser.cpp"
break;
case 104: // expr_assign: expr_object "^=" expr
#line 558 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_bitwise_exor(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2702 "parser.cpp"
break;
case 105: // expr_assign: expr_object "<<=" expr
#line 560 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_shift_left(yylhs.location, std::move(yystack_[2].value.as < expr > ()),std::move( yystack_[0].value.as < expr > ())); }
#line 2708 "parser.cpp"
break;
case 106: // expr_assign: expr_object ">>=" expr
#line 562 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_shift_right(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2714 "parser.cpp"
break;
case 107: // expr_assign: expr_object "+=" expr
#line 564 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_add(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2720 "parser.cpp"
break;
case 108: // expr_assign: expr_object "-=" expr
#line 566 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_sub(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2726 "parser.cpp"
break;
case 109: // expr_assign: expr_object "*=" expr
#line 568 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_mul(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2732 "parser.cpp"
break;
case 110: // expr_assign: expr_object "/=" expr
#line 570 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_div(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2738 "parser.cpp"
break;
case 111: // expr_assign: expr_object "%=" expr
#line 572 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_assign_mod(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2744 "parser.cpp"
break;
case 112: // expr_increment: "++" expr_object
#line 577 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_increment(yylhs.location, std::move(yystack_[0].value.as < expr > ()), true); }
#line 2750 "parser.cpp"
break;
case 113: // expr_increment: expr_object "++"
#line 579 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_increment(yylhs.location, std::move(yystack_[1].value.as < expr > ()), false); }
#line 2756 "parser.cpp"
break;
case 114: // expr_decrement: "--" expr_object
#line 584 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_decrement(yylhs.location, std::move(yystack_[0].value.as < expr > ()), true); }
#line 2762 "parser.cpp"
break;
case 115: // expr_decrement: expr_object "--"
#line 586 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_decrement(yylhs.location, std::move(yystack_[1].value.as < expr > ()), false); }
#line 2768 "parser.cpp"
break;
case 116: // expr_ternary: expr "?" expr ":" expr
#line 591 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_ternary(yylhs.location, std::move(yystack_[4].value.as < expr > ()), std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2774 "parser.cpp"
break;
case 117: // expr_binary: expr "||" expr
#line 596 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_or(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2780 "parser.cpp"
break;
case 118: // expr_binary: expr "&&" expr
#line 598 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_and(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2786 "parser.cpp"
break;
case 119: // expr_binary: expr "==" expr
#line 600 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_equality(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2792 "parser.cpp"
break;
case 120: // expr_binary: expr "!=" expr
#line 602 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_inequality(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2798 "parser.cpp"
break;
case 121: // expr_binary: expr "<=" expr
#line 604 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_less_equal(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2804 "parser.cpp"
break;
case 122: // expr_binary: expr ">=" expr
#line 606 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_greater_equal(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2810 "parser.cpp"
break;
case 123: // expr_binary: expr "<" expr
#line 608 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_less(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2816 "parser.cpp"
break;
case 124: // expr_binary: expr ">" expr
#line 610 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_greater(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2822 "parser.cpp"
break;
case 125: // expr_binary: expr "|" expr
#line 612 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_bitwise_or(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2828 "parser.cpp"
break;
case 126: // expr_binary: expr "&" expr
#line 614 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_bitwise_and(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2834 "parser.cpp"
break;
case 127: // expr_binary: expr "^" expr
#line 616 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_bitwise_exor(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2840 "parser.cpp"
break;
case 128: // expr_binary: expr "<<" expr
#line 618 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_shift_left(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2846 "parser.cpp"
break;
case 129: // expr_binary: expr ">>" expr
#line 620 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_shift_right(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2852 "parser.cpp"
break;
case 130: // expr_binary: expr "+" expr
#line 622 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_add(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2858 "parser.cpp"
break;
case 131: // expr_binary: expr "-" expr
#line 624 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_sub(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2864 "parser.cpp"
break;
case 132: // expr_binary: expr "*" expr
#line 626 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_mul(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2870 "parser.cpp"
break;
case 133: // expr_binary: expr "/" expr
#line 628 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_div(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2876 "parser.cpp"
break;
case 134: // expr_binary: expr "%" expr
#line 630 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = make_expr_mod(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr > ())); }
#line 2882 "parser.cpp"
break;
case 135: // expr_primitive: expr_complement
#line 634 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_complement::ptr > ()); }
#line 2888 "parser.cpp"
break;
case 136: // expr_primitive: expr_negate
#line 635 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_negate::ptr > ()); }
#line 2894 "parser.cpp"
break;
case 137: // expr_primitive: expr_not
#line 636 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_not::ptr > ()); }
#line 2900 "parser.cpp"
break;
case 138: // expr_primitive: expr_call
#line 637 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_call::ptr > ()); }
#line 2906 "parser.cpp"
break;
case 139: // expr_primitive: expr_method
#line 638 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_method::ptr > ()); }
#line 2912 "parser.cpp"
break;
case 140: // expr_primitive: expr_add_array
#line 639 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_add_array::ptr > ()); }
#line 2918 "parser.cpp"
break;
case 141: // expr_primitive: expr_isdefined
#line 640 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_isdefined::ptr > ()); }
#line 2924 "parser.cpp"
break;
case 142: // expr_primitive: expr_istrue
#line 641 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_istrue::ptr > ()); }
#line 2930 "parser.cpp"
break;
case 143: // expr_primitive: expr_reference
#line 642 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_reference::ptr > ()); }
#line 2936 "parser.cpp"
break;
case 144: // expr_primitive: expr_array
#line 643 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_array::ptr > ()); }
#line 2942 "parser.cpp"
break;
case 145: // expr_primitive: expr_field
#line 644 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_field::ptr > ()); }
#line 2948 "parser.cpp"
break;
case 146: // expr_primitive: expr_size
#line 645 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_size::ptr > ()); }
#line 2954 "parser.cpp"
break;
case 147: // expr_primitive: expr_paren
#line 646 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_paren::ptr > ()); }
#line 2960 "parser.cpp"
break;
case 148: // expr_primitive: expr_thisthread
#line 647 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_thisthread::ptr > ()); }
#line 2966 "parser.cpp"
break;
case 149: // expr_primitive: expr_empty_array
#line 648 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_empty_array::ptr > ()); }
#line 2972 "parser.cpp"
break;
case 150: // expr_primitive: expr_undefined
#line 649 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_undefined::ptr > ()); }
#line 2978 "parser.cpp"
break;
case 151: // expr_primitive: expr_game
#line 650 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_game::ptr > ()); }
#line 2984 "parser.cpp"
break;
case 152: // expr_primitive: expr_self
#line 651 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_self::ptr > ()); }
#line 2990 "parser.cpp"
break;
case 153: // expr_primitive: expr_anim
#line 652 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_anim::ptr > ()); }
#line 2996 "parser.cpp"
break;
case 154: // expr_primitive: expr_level
#line 653 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_level::ptr > ()); }
#line 3002 "parser.cpp"
break;
case 155: // expr_primitive: expr_animation
#line 654 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_animation::ptr > ()); }
#line 3008 "parser.cpp"
break;
case 156: // expr_primitive: expr_animtree
#line 655 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_animtree::ptr > ()); }
#line 3014 "parser.cpp"
break;
case 157: // expr_primitive: expr_identifier
#line 656 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_identifier::ptr > ()); }
#line 3020 "parser.cpp"
break;
case 158: // expr_primitive: expr_istring
#line 657 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_istring::ptr > ()); }
#line 3026 "parser.cpp"
break;
case 159: // expr_primitive: expr_string
#line 658 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_string::ptr > ()); }
#line 3032 "parser.cpp"
break;
case 160: // expr_primitive: expr_vector
#line 659 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_vector::ptr > ()); }
#line 3038 "parser.cpp"
break;
case 161: // expr_primitive: expr_float
#line 660 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_float::ptr > ()); }
#line 3044 "parser.cpp"
break;
case 162: // expr_primitive: expr_integer
#line 661 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_integer::ptr > ()); }
#line 3050 "parser.cpp"
break;
case 163: // expr_primitive: expr_false
#line 662 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_false::ptr > ()); }
#line 3056 "parser.cpp"
break;
case 164: // expr_primitive: expr_true
#line 663 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_true::ptr > ()); }
#line 3062 "parser.cpp"
break;
case 165: // expr_complement: "~" expr
#line 668 "parser.ypp"
{ yylhs.value.as < expr_complement::ptr > () = make_expr_complement(yylhs.location, std::move(yystack_[0].value.as < expr > ())); }
#line 3068 "parser.cpp"
break;
case 166: // expr_negate: "-" expr_identifier
#line 673 "parser.ypp"
{ yylhs.value.as < expr_negate::ptr > () = make_expr_negate(yylhs.location, expr{ std::move(yystack_[0].value.as < expr_identifier::ptr > ()) }); }
#line 3074 "parser.cpp"
break;
case 167: // expr_negate: "-" expr_paren
#line 675 "parser.ypp"
{ yylhs.value.as < expr_negate::ptr > () = make_expr_negate(yylhs.location, expr{ std::move(yystack_[0].value.as < expr_paren::ptr > ()) }); }
#line 3080 "parser.cpp"
break;
case 168: // expr_negate: "-" expr_array
#line 677 "parser.ypp"
{ yylhs.value.as < expr_negate::ptr > () = make_expr_negate(yylhs.location, expr{ std::move(yystack_[0].value.as < expr_array::ptr > ()) }); }
#line 3086 "parser.cpp"
break;
case 169: // expr_negate: "-" expr_field
#line 679 "parser.ypp"
{ yylhs.value.as < expr_negate::ptr > () = make_expr_negate(yylhs.location, expr{ std::move(yystack_[0].value.as < expr_field::ptr > ()) }); }
#line 3092 "parser.cpp"
break;
case 170: // expr_not: "!" expr
#line 684 "parser.ypp"
{ yylhs.value.as < expr_not::ptr > () = make_expr_not(yylhs.location, std::move(yystack_[0].value.as < expr > ())); }
#line 3098 "parser.cpp"
break;
case 171: // expr_call: expr_function
#line 688 "parser.ypp"
{ yylhs.value.as < expr_call::ptr > () = make_expr_call(yylhs.location, std::move(yystack_[0].value.as < call > ())); }
#line 3104 "parser.cpp"
break;
case 172: // expr_call: expr_pointer
#line 689 "parser.ypp"
{ yylhs.value.as < expr_call::ptr > () = make_expr_call(yylhs.location, std::move(yystack_[0].value.as < call > ())); }
#line 3110 "parser.cpp"
break;
case 173: // expr_method: expr_object expr_function
#line 692 "parser.ypp"
{ yylhs.value.as < expr_method::ptr > () = make_expr_method(yylhs.location, std::move(yystack_[1].value.as < expr > ()), std::move(yystack_[0].value.as < call > ())); }
#line 3116 "parser.cpp"
break;
case 174: // expr_method: expr_object expr_pointer
#line 693 "parser.ypp"
{ yylhs.value.as < expr_method::ptr > () = make_expr_method(yylhs.location, std::move(yystack_[1].value.as < expr > ()), std::move(yystack_[0].value.as < call > ())); }
#line 3122 "parser.cpp"
break;
case 175: // expr_function: expr_identifier "(" expr_arguments ")"
#line 698 "parser.ypp"
{ yylhs.value.as < call > ().as_function = make_expr_function(yylhs.location, make_expr_path(yylhs.location), std::move(yystack_[3].value.as < expr_identifier::ptr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::normal); }
#line 3128 "parser.cpp"
break;
case 176: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")"
#line 700 "parser.ypp"
{ yylhs.value.as < call > ().as_function = make_expr_function(yylhs.location, std::move(yystack_[5].value.as < expr_path::ptr > ()), std::move(yystack_[3].value.as < expr_identifier::ptr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::normal); }
#line 3134 "parser.cpp"
break;
case 177: // expr_function: "thread" expr_identifier "(" expr_arguments ")"
#line 702 "parser.ypp"
{ yylhs.value.as < call > ().as_function = make_expr_function(yylhs.location, make_expr_path(yylhs.location), std::move(yystack_[3].value.as < expr_identifier::ptr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::thread); }
#line 3140 "parser.cpp"
break;
case 178: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")"
#line 704 "parser.ypp"
{ yylhs.value.as < call > ().as_function = make_expr_function(yylhs.location, std::move(yystack_[5].value.as < expr_path::ptr > ()), std::move(yystack_[3].value.as < expr_identifier::ptr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::thread); }
#line 3146 "parser.cpp"
break;
case 179: // expr_function: "childthread" expr_identifier "(" expr_arguments ")"
#line 706 "parser.ypp"
{ yylhs.value.as < call > ().as_function = make_expr_function(yylhs.location, make_expr_path(yylhs.location), std::move(yystack_[3].value.as < expr_identifier::ptr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::childthread); }
#line 3152 "parser.cpp"
break;
case 180: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")"
#line 708 "parser.ypp"
{ yylhs.value.as < call > ().as_function = make_expr_function(yylhs.location, std::move(yystack_[5].value.as < expr_path::ptr > ()), std::move(yystack_[3].value.as < expr_identifier::ptr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::childthread); }
#line 3158 "parser.cpp"
break;
case 181: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")"
#line 713 "parser.ypp"
{ yylhs.value.as < call > ().as_pointer = make_expr_pointer(yylhs.location, std::move(yystack_[5].value.as < expr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::normal); }
#line 3164 "parser.cpp"
break;
case 182: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")"
#line 715 "parser.ypp"
{ yylhs.value.as < call > ().as_pointer = make_expr_pointer(yylhs.location, std::move(yystack_[5].value.as < expr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::thread); }
#line 3170 "parser.cpp"
break;
case 183: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")"
#line 717 "parser.ypp"
{ yylhs.value.as < call > ().as_pointer = make_expr_pointer(yylhs.location, std::move(yystack_[5].value.as < expr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::childthread); }
#line 3176 "parser.cpp"
break;
case 184: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")"
#line 719 "parser.ypp"
{ yylhs.value.as < call > ().as_pointer = make_expr_pointer(yylhs.location, std::move(yystack_[5].value.as < expr > ()), std::move(yystack_[1].value.as < expr_arguments::ptr > ()), call::mode::builtin); }
#line 3182 "parser.cpp"
break;
case 185: // expr_add_array: "[" expr_arguments_no_empty "]"
#line 724 "parser.ypp"
{ yylhs.value.as < expr_add_array::ptr > () = make_expr_add_array(yylhs.location, std::move(yystack_[1].value.as < expr_arguments::ptr > ())); }
#line 3188 "parser.cpp"
break;
case 186: // expr_parameters: expr_parameters "," expr_identifier
#line 729 "parser.ypp"
{ yylhs.value.as < expr_parameters::ptr > () = std::move(yystack_[2].value.as < expr_parameters::ptr > ()); yylhs.value.as < expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < expr_identifier::ptr > ())); }
#line 3194 "parser.cpp"
break;
case 187: // expr_parameters: expr_identifier
#line 731 "parser.ypp"
{ yylhs.value.as < expr_parameters::ptr > () = make_expr_parameters(yylhs.location); yylhs.value.as < expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < expr_identifier::ptr > ())); }
#line 3200 "parser.cpp"
break;
case 188: // expr_parameters: %empty
#line 733 "parser.ypp"
{ yylhs.value.as < expr_parameters::ptr > () = make_expr_parameters(yylhs.location); }
#line 3206 "parser.cpp"
break;
case 189: // expr_arguments: expr_arguments_no_empty
#line 738 "parser.ypp"
{ yylhs.value.as < expr_arguments::ptr > () = std::move(yystack_[0].value.as < expr_arguments::ptr > ()); }
#line 3212 "parser.cpp"
break;
case 190: // expr_arguments: %empty
#line 740 "parser.ypp"
{ yylhs.value.as < expr_arguments::ptr > () = make_expr_arguments(yylhs.location); }
#line 3218 "parser.cpp"
break;
case 191: // expr_arguments_no_empty: expr_arguments "," expr
#line 745 "parser.ypp"
{ yylhs.value.as < expr_arguments::ptr > () = std::move(yystack_[2].value.as < expr_arguments::ptr > ()); yylhs.value.as < expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < expr > ())); }
#line 3224 "parser.cpp"
break;
case 192: // expr_arguments_no_empty: expr
#line 747 "parser.ypp"
{ yylhs.value.as < expr_arguments::ptr > () = make_expr_arguments(yylhs.location); yylhs.value.as < expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < expr > ())); }
#line 3230 "parser.cpp"
break;
case 193: // expr_isdefined: "isdefined" "(" expr ")"
#line 752 "parser.ypp"
{ yylhs.value.as < expr_isdefined::ptr > () = make_expr_isdefined(yylhs.location, std::move(yystack_[1].value.as < expr > ())); }
#line 3236 "parser.cpp"
break;
case 194: // expr_istrue: "istrue" "(" expr ")"
#line 757 "parser.ypp"
{ yylhs.value.as < expr_istrue::ptr > () = make_expr_istrue(yylhs.location, std::move(yystack_[1].value.as < expr > ())); }
#line 3242 "parser.cpp"
break;
case 195: // expr_reference: "::" expr_identifier
#line 762 "parser.ypp"
{ yylhs.value.as < expr_reference::ptr > () = make_expr_reference(yylhs.location, make_expr_path(yylhs.location), std::move(yystack_[0].value.as < expr_identifier::ptr > ())); }
#line 3248 "parser.cpp"
break;
case 196: // expr_reference: expr_path "::" expr_identifier
#line 764 "parser.ypp"
{ yylhs.value.as < expr_reference::ptr > () = make_expr_reference(yylhs.location, std::move(yystack_[2].value.as < expr_path::ptr > ()), std::move(yystack_[0].value.as < expr_identifier::ptr > ())); }
#line 3254 "parser.cpp"
break;
case 197: // expr_tuple: "[" expr_tuple_arguments "]"
#line 769 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[1].value.as < expr_tuple::ptr > ());
yylhs.value.as < expr > ().as_tuple->temp = expr{ std::make_unique<expr_identifier>(yylhs.value.as < expr > ().loc(), fmt::format("_temp_{}", ++index)) };
}
#line 3262 "parser.cpp"
break;
case 198: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types
#line 776 "parser.ypp"
{ yylhs.value.as < expr_tuple::ptr > () = std::move(yystack_[2].value.as < expr_tuple::ptr > ()); yylhs.value.as < expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < expr > ())); }
#line 3268 "parser.cpp"
break;
case 199: // expr_tuple_arguments: expr_tuple_types
#line 778 "parser.ypp"
{ yylhs.value.as < expr_tuple::ptr > () = make_expr_tuple(yylhs.location); yylhs.value.as < expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < expr > ())); }
#line 3274 "parser.cpp"
break;
case 200: // expr_tuple_types: expr_array
#line 782 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_array::ptr > ()); }
#line 3280 "parser.cpp"
break;
case 201: // expr_tuple_types: expr_field
#line 783 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_field::ptr > ()); }
#line 3286 "parser.cpp"
break;
case 202: // expr_tuple_types: expr_identifier
#line 784 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_identifier::ptr > ()); }
#line 3292 "parser.cpp"
break;
case 203: // expr_array: expr_object "[" expr "]"
#line 789 "parser.ypp"
{ yylhs.value.as < expr_array::ptr > () = make_expr_array(yylhs.location, std::move(yystack_[3].value.as < expr > ()), std::move(yystack_[1].value.as < expr > ())); }
#line 3298 "parser.cpp"
break;
case 204: // expr_field: expr_object "." expr_identifier_nosize
#line 794 "parser.ypp"
{ yylhs.value.as < expr_field::ptr > () = make_expr_field(yylhs.location, std::move(yystack_[2].value.as < expr > ()), std::move(yystack_[0].value.as < expr_identifier::ptr > ())); }
#line 3304 "parser.cpp"
break;
case 205: // expr_size: expr_object "." "size"
#line 799 "parser.ypp"
{ yylhs.value.as < expr_size::ptr > () = make_expr_size(yylhs.location, std::move(yystack_[2].value.as < expr > ())); }
#line 3310 "parser.cpp"
break;
case 206: // expr_paren: "(" expr ")"
#line 804 "parser.ypp"
{ yylhs.value.as < expr_paren::ptr > () = make_expr_paren(yylhs.location, std::move(yystack_[1].value.as < expr > ())); }
#line 3316 "parser.cpp"
break;
case 207: // expr_object: expr_call
#line 808 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_call::ptr > ()); }
#line 3322 "parser.cpp"
break;
case 208: // expr_object: expr_method
#line 809 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_method::ptr > ()); }
#line 3328 "parser.cpp"
break;
case 209: // expr_object: expr_array
#line 810 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_array::ptr > ()); }
#line 3334 "parser.cpp"
break;
case 210: // expr_object: expr_field
#line 811 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_field::ptr > ()); }
#line 3340 "parser.cpp"
break;
case 211: // expr_object: expr_game
#line 812 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_game::ptr > ()); }
#line 3346 "parser.cpp"
break;
case 212: // expr_object: expr_self
#line 813 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_self::ptr > ()); }
#line 3352 "parser.cpp"
break;
case 213: // expr_object: expr_anim
#line 814 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_anim::ptr > ()); }
#line 3358 "parser.cpp"
break;
case 214: // expr_object: expr_level
#line 815 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_level::ptr > ()); }
#line 3364 "parser.cpp"
break;
case 215: // expr_object: expr_identifier
#line 816 "parser.ypp"
{ yylhs.value.as < expr > ().as_node = std::move(yystack_[0].value.as < expr_identifier::ptr > ()); }
#line 3370 "parser.cpp"
break;
case 216: // expr_thisthread: "thisthread"
#line 821 "parser.ypp"
{ yylhs.value.as < expr_thisthread::ptr > () = make_expr_thisthread(yylhs.location); }
#line 3376 "parser.cpp"
break;
case 217: // expr_empty_array: "[" "]"
#line 826 "parser.ypp"
{ yylhs.value.as < expr_empty_array::ptr > () = make_expr_empty_array(yylhs.location); }
#line 3382 "parser.cpp"
break;
case 218: // expr_undefined: "undefined"
#line 831 "parser.ypp"
{ yylhs.value.as < expr_undefined::ptr > () = make_expr_undefined(yylhs.location); }
#line 3388 "parser.cpp"
break;
case 219: // expr_game: "game"
#line 836 "parser.ypp"
{ yylhs.value.as < expr_game::ptr > () = make_expr_game(yylhs.location); }
#line 3394 "parser.cpp"
break;
case 220: // expr_self: "self"
#line 841 "parser.ypp"
{ yylhs.value.as < expr_self::ptr > () = make_expr_self(yylhs.location); }
#line 3400 "parser.cpp"
break;
case 221: // expr_anim: "anim"
#line 846 "parser.ypp"
{ yylhs.value.as < expr_anim::ptr > () = make_expr_anim(yylhs.location); }
#line 3406 "parser.cpp"
break;
case 222: // expr_level: "level"
#line 851 "parser.ypp"
{ yylhs.value.as < expr_level::ptr > () = make_expr_level(yylhs.location); }
#line 3412 "parser.cpp"
break;
case 223: // expr_animation: "%" "identifier"
#line 856 "parser.ypp"
{ yylhs.value.as < expr_animation::ptr > () = make_expr_animation(yylhs.location, yystack_[0].value.as < std::string > ()); }
#line 3418 "parser.cpp"
break;
case 224: // expr_animtree: "#animtree"
#line 861 "parser.ypp"
{ yylhs.value.as < expr_animtree::ptr > () = make_expr_animtree(yylhs.location); }
#line 3424 "parser.cpp"
break;
case 225: // expr_identifier_nosize: "identifier"
#line 866 "parser.ypp"
{ yylhs.value.as < expr_identifier::ptr > () = make_expr_identifier(yylhs.location, yystack_[0].value.as < std::string > ()); }
#line 3430 "parser.cpp"
break;
case 226: // expr_identifier: "identifier"
#line 871 "parser.ypp"
{ yylhs.value.as < expr_identifier::ptr > () = make_expr_identifier(yylhs.location, yystack_[0].value.as < std::string > ()); }
#line 3436 "parser.cpp"
break;
case 227: // expr_identifier: "size"
#line 873 "parser.ypp"
{ yylhs.value.as < expr_identifier::ptr > () = make_expr_identifier(yylhs.location, "size"); }
#line 3442 "parser.cpp"
break;
case 228: // expr_path: "path" "/" "identifier"
#line 878 "parser.ypp"
{ yylhs.value.as < expr_path::ptr > () = make_expr_path(yylhs.location, yystack_[2].value.as < std::string > () + "/" + yystack_[0].value.as < std::string > ()); }
#line 3448 "parser.cpp"
break;
case 229: // expr_path: "identifier"
#line 880 "parser.ypp"
{ yylhs.value.as < expr_path::ptr > () = make_expr_path(yylhs.location, yystack_[0].value.as < std::string > ()); }
#line 3454 "parser.cpp"
break;
case 230: // expr_path: "path"
#line 882 "parser.ypp"
{ yylhs.value.as < expr_path::ptr > () = make_expr_path(yylhs.location, yystack_[0].value.as < std::string > ()); }
#line 3460 "parser.cpp"
break;
case 231: // expr_istring: "localized string"
#line 887 "parser.ypp"
{ yylhs.value.as < expr_istring::ptr > () = make_expr_istring(yylhs.location, yystack_[0].value.as < std::string > ()); }
#line 3466 "parser.cpp"
break;
case 232: // expr_string: "string literal"
#line 892 "parser.ypp"
{ yylhs.value.as < expr_string::ptr > () = make_expr_string(yylhs.location, yystack_[0].value.as < std::string > ()); }
#line 3472 "parser.cpp"
break;
case 233: // expr_vector: "(" expr "," expr "," expr ")"
#line 897 "parser.ypp"
{ yylhs.value.as < expr_vector::ptr > () = make_expr_vector(yylhs.location, std::move(yystack_[5].value.as < expr > ()), std::move(yystack_[3].value.as < expr > ()), std::move(yystack_[1].value.as < expr > ())); }
#line 3478 "parser.cpp"
break;
case 234: // expr_float: "-" "float"
#line 902 "parser.ypp"
{ yylhs.value.as < expr_float::ptr > () = make_expr_float(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); }
#line 3484 "parser.cpp"
break;
case 235: // expr_float: "float"
#line 904 "parser.ypp"
{ yylhs.value.as < expr_float::ptr > () = make_expr_float(yylhs.location, yystack_[0].value.as < std::string > ()); }
#line 3490 "parser.cpp"
break;
case 236: // expr_integer: "-" "integer"
#line 909 "parser.ypp"
{ yylhs.value.as < expr_integer::ptr > () = make_expr_integer(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); }
#line 3496 "parser.cpp"
break;
case 237: // expr_integer: "integer"
#line 911 "parser.ypp"
{ yylhs.value.as < expr_integer::ptr > () = make_expr_integer(yylhs.location, yystack_[0].value.as < std::string > ()); }
#line 3502 "parser.cpp"
break;
case 238: // expr_false: "false"
#line 916 "parser.ypp"
{ yylhs.value.as < expr_false::ptr > () = make_expr_false(yylhs.location); }
#line 3508 "parser.cpp"
break;
case 239: // expr_true: "true"
#line 921 "parser.ypp"
{ yylhs.value.as < expr_true::ptr > () = make_expr_true(yylhs.location); }
#line 3514 "parser.cpp"
break;
#line 3518 "parser.cpp"
default:
break;
}
}
#if YY_EXCEPTIONS
catch (const syntax_error& yyexc)
{
YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
error (yyexc);
YYERROR;
}
#endif // YY_EXCEPTIONS
YY_SYMBOL_PRINT ("-> $$ =", yylhs);
yypop_ (yylen);
yylen = 0;
// Shift the result of the reduction.
yypush_ (YY_NULLPTR, YY_MOVE (yylhs));
}
goto yynewstate;
/*--------------------------------------.
| yyerrlab -- here on detecting error. |
`--------------------------------------*/
yyerrlab:
// If not already recovering from an error, report this error.
if (!yyerrstatus_)
{
++yynerrs_;
context yyctx (*this, yyla);
std::string msg = yysyntax_error_ (yyctx);
error (yyla.location, YY_MOVE (msg));
}
yyerror_range[1].location = yyla.location;
if (yyerrstatus_ == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
// Return failure if at end of input.
if (yyla.kind () == symbol_kind::S_YYEOF)
YYABORT;
else if (!yyla.empty ())
{
yy_destroy_ ("Error: discarding", yyla);
yyla.clear ();
}
}
// Else will try to reuse lookahead token after shifting the error token.
goto yyerrlab1;
/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
/* Pacify compilers when the user code never invokes YYERROR and
the label yyerrorlab therefore never appears in user code. */
if (false)
YYERROR;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
yypop_ (yylen);
yylen = 0;
YY_STACK_PRINT ();
goto yyerrlab1;
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
yyerrstatus_ = 3; // Each real token shifted decrements this.
// Pop stack until we find a state that shifts the error token.
for (;;)
{
yyn = yypact_[+yystack_[0].state];
if (!yy_pact_value_is_default_ (yyn))
{
yyn += symbol_kind::S_YYerror;
if (0 <= yyn && yyn <= yylast_
&& yycheck_[yyn] == symbol_kind::S_YYerror)
{
yyn = yytable_[yyn];
if (0 < yyn)
break;
}
}
// Pop the current state because it cannot handle the error token.
if (yystack_.size () == 1)
YYABORT;
yyerror_range[1].location = yystack_[0].location;
yy_destroy_ ("Error: popping", yystack_[0]);
yypop_ ();
YY_STACK_PRINT ();
}
{
stack_symbol_type error_token;
yyerror_range[2].location = yyla.location;
YYLLOC_DEFAULT (error_token.location, yyerror_range, 2);
// Shift the error token.
yy_lac_discard_ ("error recovery");
error_token.state = state_type (yyn);
yypush_ ("Shifting", YY_MOVE (error_token));
}
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
/*-----------------------------------------------------.
| yyreturn -- parsing is finished, return the result. |
`-----------------------------------------------------*/
yyreturn:
if (!yyla.empty ())
yy_destroy_ ("Cleanup: discarding lookahead", yyla);
/* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
yypop_ (yylen);
YY_STACK_PRINT ();
while (1 < yystack_.size ())
{
yy_destroy_ ("Cleanup: popping", yystack_[0]);
yypop_ ();
}
return yyresult;
}
#if YY_EXCEPTIONS
catch (...)
{
YYCDEBUG << "Exception caught: cleaning lookahead and stack\n";
// Do not try to display the values of the reclaimed symbols,
// as their printers might throw an exception.
if (!yyla.empty ())
yy_destroy_ (YY_NULLPTR, yyla);
while (1 < yystack_.size ())
{
yy_destroy_ (YY_NULLPTR, yystack_[0]);
yypop_ ();
}
throw;
}
#endif // YY_EXCEPTIONS
}
void
parser::error (const syntax_error& yyexc)
{
error (yyexc.location, yyexc.what ());
}
const char *
parser::symbol_name (symbol_kind_type yysymbol)
{
static const char *const yy_sname[] =
{
"end of file", "error", "invalid token", "#", "/#", "#/", "#inline",
"#include", "#using_animtree", "#animtree", "endon", "notify", "wait",
"waittill", "waittillmatch", "waittillframeend", "waitframe", "if",
"else", "do", "while", "for", "foreach", "in", "switch", "case",
"default", "break", "continue", "return", "breakpoint", "prof_begin",
"prof_end", "thread", "childthread", "thisthread", "call", "true",
"false", "undefined", "size", "game", "self", "anim", "level",
"isdefined", "istrue", "(", ")", "{", "}", "[", "]", ",", ".", "...",
"::", ":", ";", "?", "++", "--", "<<", ">>", "||", "&&", "==", "!=",
"<=", ">=", "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=",
"&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path",
"identifier", "string literal", "localized string", "float", "integer",
"SIZEOF", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", "PREINC",
"PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", "inline",
"include", "declaration", "decl_usingtree", "decl_function", "stmt",
"stmt_or_dev", "stmt_list", "stmt_or_dev_list", "stmt_dev", "stmt_comp",
"stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify",
"stmt_wait", "stmt_waittill", "stmt_waittillmatch",
"stmt_waittillframeend", "stmt_waitframe", "stmt_if", "stmt_ifelse",
"stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch",
"stmt_case", "stmt_default", "stmt_break", "stmt_continue",
"stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end",
"expr", "expr_or_empty", "expr_assign", "expr_increment",
"expr_decrement", "expr_ternary", "expr_binary", "expr_primitive",
"expr_complement", "expr_negate", "expr_not", "expr_call", "expr_method",
"expr_function", "expr_pointer", "expr_add_array", "expr_parameters",
"expr_arguments", "expr_arguments_no_empty", "expr_isdefined",
"expr_istrue", "expr_reference", "expr_tuple", "expr_tuple_arguments",
"expr_tuple_types", "expr_array", "expr_field", "expr_size",
"expr_paren", "expr_object", "expr_thisthread", "expr_empty_array",
"expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level",
"expr_animation", "expr_animtree", "expr_identifier_nosize",
"expr_identifier", "expr_path", "expr_istring", "expr_string",
"expr_vector", "expr_float", "expr_integer", "expr_false", "expr_true", YY_NULLPTR
};
return yy_sname[yysymbol];
}
// parser::context.
parser::context::context (const parser& yyparser, const symbol_type& yyla)
: yyparser_ (yyparser)
, yyla_ (yyla)
{}
int
parser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const
{
// Actual number of expected tokens
int yycount = 0;
#if GSCDEBUG
// Execute LAC once. We don't care if it is successful, we
// only do it for the sake of debugging output.
if (!yyparser_.yy_lac_established_)
yyparser_.yy_lac_check_ (yyla_.kind ());
#endif
for (int yyx = 0; yyx < YYNTOKENS; ++yyx)
{
symbol_kind_type yysym = YY_CAST (symbol_kind_type, yyx);
if (yysym != symbol_kind::S_YYerror
&& yysym != symbol_kind::S_YYUNDEF
&& yyparser_.yy_lac_check_ (yysym))
{
if (!yyarg)
++yycount;
else if (yycount == yyargn)
return 0;
else
yyarg[yycount++] = yysym;
}
}
if (yyarg && yycount == 0 && 0 < yyargn)
yyarg[0] = symbol_kind::S_YYEMPTY;
return yycount;
}
bool
parser::yy_lac_check_ (symbol_kind_type yytoken) const
{
// Logically, the yylac_stack's lifetime is confined to this function.
// Clear it, to get rid of potential left-overs from previous call.
yylac_stack_.clear ();
// Reduce until we encounter a shift and thereby accept the token.
#if GSCDEBUG
YYCDEBUG << "LAC: checking lookahead " << symbol_name (yytoken) << ':';
#endif
std::ptrdiff_t lac_top = 0;
while (true)
{
state_type top_state = (yylac_stack_.empty ()
? yystack_[lac_top].state
: yylac_stack_.back ());
int yyrule = yypact_[+top_state];
if (yy_pact_value_is_default_ (yyrule)
|| (yyrule += yytoken) < 0 || yylast_ < yyrule
|| yycheck_[yyrule] != yytoken)
{
// Use the default action.
yyrule = yydefact_[+top_state];
if (yyrule == 0)
{
YYCDEBUG << " Err\n";
return false;
}
}
else
{
// Use the action from yytable.
yyrule = yytable_[yyrule];
if (yy_table_value_is_error_ (yyrule))
{
YYCDEBUG << " Err\n";
return false;
}
if (0 < yyrule)
{
YYCDEBUG << " S" << yyrule << '\n';
return true;
}
yyrule = -yyrule;
}
// By now we know we have to simulate a reduce.
YYCDEBUG << " R" << yyrule - 1;
// Pop the corresponding number of values from the stack.
{
std::ptrdiff_t yylen = yyr2_[yyrule];
// First pop from the LAC stack as many tokens as possible.
std::ptrdiff_t lac_size = std::ptrdiff_t (yylac_stack_.size ());
if (yylen < lac_size)
{
yylac_stack_.resize (std::size_t (lac_size - yylen));
yylen = 0;
}
else if (lac_size)
{
yylac_stack_.clear ();
yylen -= lac_size;
}
// Only afterwards look at the main stack.
// We simulate popping elements by incrementing lac_top.
lac_top += yylen;
}
// Keep top_state in sync with the updated stack.
top_state = (yylac_stack_.empty ()
? yystack_[lac_top].state
: yylac_stack_.back ());
// Push the resulting state of the reduction.
state_type state = yy_lr_goto_state_ (top_state, yyr1_[yyrule]);
YYCDEBUG << " G" << int (state);
yylac_stack_.push_back (state);
}
}
// Establish the initial context if no initial context currently exists.
bool
parser::yy_lac_establish_ (symbol_kind_type yytoken)
{
/* Establish the initial context for the current lookahead if no initial
context is currently established.
We define a context as a snapshot of the parser stacks. We define
the initial context for a lookahead as the context in which the
parser initially examines that lookahead in order to select a
syntactic action. Thus, if the lookahead eventually proves
syntactically unacceptable (possibly in a later context reached via a
series of reductions), the initial context can be used to determine
the exact set of tokens that would be syntactically acceptable in the
lookahead's place. Moreover, it is the context after which any
further semantic actions would be erroneous because they would be
determined by a syntactically unacceptable token.
yy_lac_establish_ should be invoked when a reduction is about to be
performed in an inconsistent state (which, for the purposes of LAC,
includes consistent states that don't know they're consistent because
their default reductions have been disabled).
For parse.lac=full, the implementation of yy_lac_establish_ is as
follows. If no initial context is currently established for the
current lookahead, then check if that lookahead can eventually be
shifted if syntactic actions continue from the current context. */
if (yy_lac_established_)
return true;
else
{
#if GSCDEBUG
YYCDEBUG << "LAC: initial context established for "
<< symbol_name (yytoken) << '\n';
#endif
yy_lac_established_ = true;
return yy_lac_check_ (yytoken);
}
}
// Discard any previous initial lookahead context.
void
parser::yy_lac_discard_ (const char* event)
{
/* Discard any previous initial lookahead context because of Event,
which may be a lookahead change or an invalidation of the currently
established initial context for the current lookahead.
The most common example of a lookahead change is a shift. An example
of both cases is syntax error recovery. That is, a syntax error
occurs when the lookahead is syntactically erroneous for the
currently established initial context, so error recovery manipulates
the parser stacks to try to find a new initial context in which the
current lookahead is syntactically acceptable. If it fails to find
such a context, it discards the lookahead. */
if (yy_lac_established_)
{
YYCDEBUG << "LAC: initial context discarded due to "
<< event << '\n';
yy_lac_established_ = false;
}
}
int
parser::yy_syntax_error_arguments_ (const context& yyctx,
symbol_kind_type yyarg[], int yyargn) const
{
/* There are many possibilities here to consider:
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
tokens because there are none.
- The only way there can be no lookahead present (in yyla) is
if this state is a consistent state with a default action.
Thus, detecting the absence of a lookahead is sufficient to
determine that there is no unexpected or expected token to
report. In that case, just report a simple "syntax error".
- Don't assume there isn't a lookahead just because this state is
a consistent state with a default action. There might have
been a previous inconsistent state, consistent state with a
non-default action, or user semantic action that manipulated
yyla. (However, yyla is currently not documented for users.)
In the first two cases, it might appear that the current syntax
error should have been detected in the previous state when
yy_lac_check was invoked. However, at that time, there might
have been a different syntax error that discarded a different
initial context during error recovery, leaving behind the
current lookahead.
*/
if (!yyctx.lookahead ().empty ())
{
if (yyarg)
yyarg[0] = yyctx.token ();
int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
return yyn + 1;
}
return 0;
}
// Generate an error message.
std::string
parser::yysyntax_error_ (const context& yyctx) const
{
// Its maximum.
enum { YYARGS_MAX = 5 };
// Arguments of yyformat.
symbol_kind_type yyarg[YYARGS_MAX];
int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
char const* yyformat = YY_NULLPTR;
switch (yycount)
{
#define YYCASE_(N, S) \
case N: \
yyformat = S; \
break
default: // Avoid compiler warnings.
YYCASE_ (0, YY_("syntax error"));
YYCASE_ (1, YY_("syntax error, unexpected %s"));
YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
#undef YYCASE_
}
std::string yyres;
// Argument number.
std::ptrdiff_t yyi = 0;
for (char const* yyp = yyformat; *yyp; ++yyp)
if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount)
{
yyres += symbol_name (yyarg[yyi++]);
++yyp;
}
else
yyres += *yyp;
return yyres;
}
const short parser::yypact_ninf_ = -178;
const short parser::yytable_ninf_ = -230;
const short
parser::yypact_[] =
{
14, -178, -178, -45, -45, -40, -178, -178, 17, 14,
-178, -178, -178, -178, -178, 4, -65, -178, -19, -3,
-58, -178, -178, -178, -178, -30, -29, -178, -178, -178,
53, -21, -178, -178, 31, 13, -30, -178, 825, -178,
-178, 955, 1163, 56, -24, 71, 1357, 75, 83, 101,
117, -32, 59, 109, 115, 1031, 118, 123, 133, -16,
-9, 47, -178, -178, -178, -178, -178, 784, -178, 860,
860, 85, -178, -178, 908, -178, -178, -178, -178, -178,
-178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
-178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
-178, 127, 128, 130, 134, 136, -178, -178, 121, -178,
-178, 1277, -178, -178, -178, -178, 142, 135, -178, -178,
-178, 1002, -178, -178, -178, -178, -178, 149, 150, 1163,
1097, -30, 1163, 1163, 368, 108, -178, -178, -178, 2067,
-178, -178, -178, -178, -178, -178, 303, 484, -178, -178,
-178, -178, 625, 698, -178, -178, 745, -178, -178, -178,
1057, 1065, 1127, 1189, -178, -178, 182, 152, -178, -178,
-178, -178, -178, -178, -178, -178, 162, -178, 1163, 194,
1163, 592, -30, 1163, 119, 163, 166, -178, -178, -178,
-178, 2102, -178, 1163, 1163, 168, 179, 172, 176, 183,
185, 181, 1229, -178, -178, 51, -178, 76, 105, 1369,
40, 187, 1369, 1369, -178, -178, -178, -178, -178, -178,
-178, -178, 1163, 192, 195, 196, 197, 1229, 153, -178,
-178, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163,
1163, 1163, -178, -178, 142, 1163, -30, -178, -178, -178,
1163, 1163, 1368, 1097, -178, 2115, 204, 218, -178, -178,
-178, 1163, -178, -178, 625, 698, -178, 182, -178, -178,
1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163,
1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, -26,
-30, 216, 1516, 231, 1550, 223, -178, -178, -178, 530,
-10, 1563, -178, -178, -178, -8, -178, 42, 1163, 1163,
-30, 1163, 1163, -30, 1163, 1792, -178, 860, 1163, 2115,
1163, 1163, 1163, 1163, 1833, -178, -178, 2115, 2115, 2115,
2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 46, 235,
1597, 1610, -178, 1163, 1792, 1163, -178, 1644, 2032, 171,
171, 2146, 2156, 2197, 2197, 63, 63, 63, 63, 2187,
1469, 1424, -62, -62, -178, -178, -178, -178, 235, -178,
1357, 1163, 1357, 1163, 1163, -30, 13, 225, 227, 1874,
49, 240, 1915, 52, 241, 1956, 237, -178, 1657, 1413,
1458, 1503, -178, -178, 1163, -178, -178, 1996, 2115, 1163,
273, 1691, -178, 2115, 234, 1704, 271, -178, -178, -178,
245, -178, 1163, 246, -178, 1163, 249, 256, 247, 250,
1163, 251, 1163, 257, 1163, 84, 1163, 2115, 1357, 258,
592, 1357, 1163, 260, 94, 267, 96, 272, 1163, -178,
-178, 274, -178, 276, -178, 277, -178, 1738, -178, -178,
278, -178, 1751, 1163, -178, 1163, -178, 1163, 97, 263,
269, 270, -178, 1357, 1357, 112, 113, 126, -178, -178,
-178, -178, -178, -178, -178, -178, -178
};
const unsigned char
parser::yydefact_[] =
{
3, 12, 13, 0, 0, 0, 227, 226, 0, 2,
7, 8, 9, 14, 15, 0, 230, 229, 0, 0,
0, 1, 4, 5, 6, 188, 0, 10, 11, 232,
0, 0, 187, 228, 0, 0, 0, 16, 0, 17,
186, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 219, 220, 221, 222, 56, 0, 52, 0,
0, 226, 43, 50, 0, 44, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 0, 0, 0, 207, 208, 171, 172, 0, 209,
210, 0, 211, 212, 213, 214, 215, 0, 54, 48,
46, 0, 224, 216, 239, 238, 218, 0, 0, 0,
190, 0, 0, 0, 0, 0, 231, 235, 237, 0,
95, 96, 97, 135, 136, 137, 138, 139, 140, 141,
142, 143, 144, 145, 146, 147, 0, 148, 149, 150,
151, 152, 153, 154, 155, 156, 157, 0, 158, 159,
160, 161, 162, 163, 164, 74, 0, 75, 0, 0,
0, 60, 0, 0, 0, 0, 0, 87, 88, 89,
91, 0, 92, 190, 190, 0, 0, 0, 0, 0,
0, 0, 0, 207, 208, 0, 199, 209, 210, 0,
215, 0, 112, 114, 55, 51, 49, 63, 64, 65,
61, 62, 0, 0, 0, 0, 0, 0, 0, 113,
115, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 173, 174, 0, 190, 0, 53, 47, 45,
0, 0, 0, 190, 217, 192, 0, 189, 195, 170,
165, 0, 234, 236, 168, 169, 167, 166, 223, 69,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 57, 58, 59, 0,
0, 0, 86, 85, 90, 0, 189, 0, 0, 190,
0, 0, 190, 0, 0, 0, 197, 0, 0, 100,
0, 0, 0, 0, 0, 225, 204, 101, 107, 108,
109, 110, 111, 102, 103, 104, 106, 105, 0, 0,
0, 0, 206, 0, 192, 0, 185, 0, 0, 128,
129, 117, 118, 119, 120, 121, 122, 123, 124, 125,
126, 127, 130, 131, 132, 133, 134, 205, 196, 76,
0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 198, 0, 0,
0, 0, 203, 175, 190, 193, 194, 0, 191, 0,
77, 0, 79, 98, 0, 0, 0, 84, 93, 94,
0, 177, 190, 0, 179, 190, 0, 0, 0, 0,
190, 0, 190, 0, 190, 0, 0, 116, 0, 0,
60, 0, 0, 0, 0, 0, 0, 0, 190, 66,
68, 189, 71, 189, 73, 189, 176, 0, 78, 80,
0, 82, 0, 190, 178, 190, 180, 190, 0, 0,
0, 0, 233, 0, 0, 0, 0, 0, 181, 67,
70, 72, 81, 83, 182, 183, 184
};
const short
parser::yypgoto_[] =
{
-178, -178, -178, 321, 326, 329, -178, -178, -38, 266,
-178, -178, -178, -34, -89, -178, -178, -178, -178, -178,
-178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
-178, -178, -178, -178, -178, -178, -178, -178, -178, 489,
-178, -177, -176, -175, -178, -178, -178, -178, -178, -178,
6, 50, -100, -50, -178, -178, 41, -118, -178, -178,
-178, -178, -178, 28, 69, 131, -178, 212, 137, -178,
-178, -178, 199, 210, 226, 325, -178, -178, -178, 0,
12, -178, -18, -178, -178, 297, -178, -178
};
const short
parser::yydefgoto_[] =
{
0, 8, 9, 10, 11, 12, 13, 14, 72, 73,
121, 74, 75, 76, 295, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
92, 93, 94, 95, 96, 97, 98, 99, 100, 255,
404, 101, 102, 103, 140, 141, 142, 143, 144, 145,
146, 147, 106, 107, 148, 31, 256, 306, 149, 150,
151, 108, 205, 206, 152, 153, 154, 155, 156, 157,
158, 159, 160, 161, 162, 163, 164, 165, 326, 166,
167, 168, 169, 170, 171, 172, 173, 174
};
const short
parser::yytable_[] =
{
15, 39, 30, 120, 296, 297, 298, 20, 179, 15,
6, 242, 257, 374, 367, 18, 19, 21, 1, 2,
3, 4, 5, 176, 6, 32, 26, 35, 286, 287,
288, 6, 36, 185, 177, 195, 40, 29, 116, 27,
377, 116, 198, 375, 104, 345, 116, 104, 16, 17,
117, 25, 104, 117, 6, 28, 242, 184, 117, 196,
199, 243, 38, 29, 7, 33, 138, 210, 325, 116,
116, 197, 200, 203, 116, 203, 203, 16, 71, 117,
104, 117, 117, 249, 16, 71, 117, 245, 105, 37,
378, 105, -202, -202, 393, 345, 105, 411, 201, 345,
414, 34, 345, 316, 317, 345, 243, 109, 7, 242,
109, 244, 242, 242, 175, 109, 187, 204, 178, 204,
204, 116, 180, 117, 105, 271, 272, 104, -200, -200,
181, 258, 446, 117, 267, 257, 207, 345, 109, 109,
203, -229, 454, 109, 456, 468, 117, 345, 182, 345,
345, 284, 285, 286, 287, 288, 244, -201, -201, 243,
474, 475, 243, 243, 183, 345, 345, 188, 117, 110,
193, 105, 110, 189, 476, 111, 192, 110, 111, 345,
194, 116, 300, 111, 204, 217, 218, 203, 219, 245,
109, 246, 220, 117, 221, 222, 250, 251, 208, 242,
110, 110, 268, 264, 209, 110, 212, 213, 290, 244,
291, 111, 244, 244, 293, -215, -215, 263, -215, 308,
302, 117, -215, 303, 117, 117, 309, 311, 310, 245,
312, 204, 314, -215, 305, 307, -215, 112, 318, 320,
112, 313, 321, 322, 323, 112, 339, 325, 113, 243,
109, 113, 110, 296, 297, 298, 113, 345, 111, 284,
285, 286, 287, 288, 114, 265, 112, 114, 112, 112,
346, 209, 114, 112, 369, -215, -215, 113, 371, 113,
113, 373, 394, 408, 113, 409, 338, 412, 415, 417,
368, 428, 430, 114, 432, 114, 114, 433, 435, 244,
114, 437, 441, 438, 443, 439, 445, 453, 440, 442,
381, 117, 110, 384, 455, 444, 449, 210, 299, 457,
112, 469, 459, 203, 460, 461, 463, 470, 471, 117,
22, 113, 400, 112, 402, 23, -207, -207, 24, -207,
216, 450, 407, -207, 113, 387, 266, 114, 186, 0,
380, 0, 0, 383, -207, 0, 0, -207, 0, 0,
114, 0, 0, 115, 0, 0, 115, 204, 0, 0,
116, 115, 116, 0, 0, 406, 104, 0, 104, 0,
112, 0, 117, 0, 117, 0, 207, 0, 0, 0,
448, 113, 115, 451, 115, 115, -207, -207, 0, 115,
0, 59, 60, 0, 61, 0, 0, 114, 6, 62,
63, 64, 65, 0, 0, 261, 0, 0, 0, 211,
105, 0, 105, 0, 0, 472, 473, 0, 116, 0,
116, 116, 0, 0, 104, 425, 203, 104, 0, 109,
117, 109, 117, 117, 0, 0, 115, 0, 208, 0,
0, 0, 0, 434, 209, 0, 436, 0, 0, 115,
0, 16, 71, 116, 116, 262, 263, 0, 0, 104,
104, 0, 0, 0, 0, 117, 117, 0, 105, 458,
204, 105, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 465, 0, 466, 109, 467, 109,
109, 110, 0, 110, 0, 0, 115, 111, 0, 111,
0, 0, 0, 105, 105, 0, 112, -208, -208, 0,
-208, 0, 0, 0, -208, 0, 0, 113, 0, 0,
0, 139, 109, 109, 0, -208, 0, 0, -208, 0,
0, 0, 0, 114, 191, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 110,
0, 110, 110, 59, 60, 111, 61, 299, 111, 112,
6, 112, 0, 0, 0, 0, 0, -208, -208, 0,
113, 227, 113, 0, 228, 0, 0, 0, 0, 0,
229, 230, 0, 0, 110, 110, 114, 0, 114, 0,
111, 111, 0, 0, 231, 232, 233, 234, 235, 236,
237, 238, 239, 240, 241, 0, 0, 0, 252, 0,
0, 259, 260, 16, 71, 59, 60, 112, 61, 112,
112, 0, 6, 62, 63, 64, 65, 0, 113, 0,
113, 113, 115, 67, 0, 0, 0, 0, 0, 0,
0, 0, 69, 70, 114, 0, 114, 114, -209, -209,
0, -209, 112, 112, 0, -209, 0, 292, 0, 294,
0, 0, 301, 113, 113, 0, -209, 0, 0, -209,
0, 0, 0, 0, 0, 16, 71, 0, 0, 114,
114, 315, 0, 0, 0, 115, 0, 115, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 319, 0, 0, 0, 0, 324, 0, -209, -209,
327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
337, -210, -210, 0, -210, 0, 0, 0, -210, 340,
341, 0, 344, 0, 0, 0, 0, 0, 0, -210,
347, 0, -210, 115, 0, 115, 115, 0, 0, 348,
349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
359, 360, 361, 362, 363, 364, 365, 366, 59, 60,
0, 61, 0, 0, 0, 6, 0, 0, 115, 115,
0, -210, -210, 0, 0, 0, 227, 379, 0, 289,
382, 0, 0, 385, 0, 0, 0, 315, 0, 388,
389, 390, 391, 0, 0, 0, 0, 59, 60, 0,
61, 0, 0, 0, 6, 62, 63, 64, 65, 41,
0, 0, 397, 0, 398, 202, 0, 42, 16, 71,
43, 44, 45, 0, 46, 47, 48, 49, 0, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
401, 61, 403, 405, 0, 6, 62, 63, 64, 65,
0, 0, 0, 0, 38, 66, 67, 16, 71, 0,
0, 0, 0, 68, 0, 69, 70, 0, 427, 0,
0, 0, 0, 59, 60, 0, 61, 0, 0, 0,
6, 62, 63, 64, 65, 0, 0, 0, 0, 0,
0, 211, 41, 0, 0, 447, 0, 0, 16, 71,
42, 452, 0, 43, 44, 45, 0, 46, 47, 48,
49, 0, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 0, 61, 0, 0, 0, 6, 62,
63, 64, 65, 16, 71, 0, 0, 38, 214, 67,
118, 0, 0, 0, 0, 0, 215, 42, 69, 70,
43, 44, 45, 0, 46, 47, 48, 49, 0, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
0, 61, 0, 0, 0, 6, 62, 63, 64, 65,
0, 16, 71, 0, 38, 0, 67, 247, 0, 0,
0, 0, 0, 119, 42, 69, 70, 43, 44, 45,
0, 46, 47, 48, 49, 0, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 0, 61, 0,
122, 0, 6, 62, 63, 64, 65, 0, 16, 71,
0, 38, 0, 67, 0, 0, 0, 0, 0, 0,
248, 0, 69, 70, 59, 60, 123, 61, 124, 125,
126, 6, 62, 63, 64, 65, 127, 128, 129, 0,
0, 0, 130, 0, 0, 0, 0, 131, 0, 190,
-211, -211, 0, -211, 0, 16, 71, -211, -212, -212,
0, -212, 0, 132, 133, -212, 122, 0, -211, 0,
0, -211, 0, 0, 0, 0, -212, 0, 0, -212,
134, 0, 0, 135, 16, 71, 29, 136, 137, 138,
59, 60, 123, 61, 124, 125, 126, 6, 62, 63,
64, 65, 127, 128, 129, 0, 0, 0, 253, 254,
-211, -211, 0, 131, 0, 0, 0, 0, -212, -212,
-213, -213, 0, -213, 0, 0, 0, -213, 0, 132,
133, 0, 122, 0, 0, 0, 0, 0, -213, 0,
0, -213, 0, 0, 0, 0, 134, 0, 0, 135,
16, 71, 29, 136, 137, 138, 59, 60, 123, 61,
124, 125, 126, 6, 62, 63, 64, 65, 127, 128,
129, 0, 0, 0, 130, 0, 0, 0, 0, 131,
-213, -213, -214, -214, 0, -214, 0, 0, 0, -214,
0, 0, 0, 0, 0, 132, 133, 0, 122, 0,
-214, 0, 0, -214, 0, 0, 0, 0, 0, 0,
0, 0, 134, 0, 0, 135, 16, 71, 29, 136,
137, 138, 59, 60, 123, 61, 124, 125, 126, 6,
62, 63, 64, 65, 127, 128, 129, 0, 0, 0,
253, 0, -214, -214, 0, 131, 0, 223, 224, 0,
225, 226, 0, 0, 0, 0, 0, 0, 0, 0,
0, 132, 133, 0, 0, 0, 0, 0, 0, 0,
59, 60, 0, 61, 0, 0, 0, 6, 134, 0,
0, 135, 16, 71, 29, 136, 137, 138, 227, 0,
0, 228, 0, 0, 0, 0, 0, 229, 230, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 231, 232, 233, 234, 235, 236, 237, 238, 239,
240, 241, 0, 0, 0, 0, 0, 0, 0, 42,
16, 71, 43, 44, 45, 0, 46, 47, 48, 49,
0, 50, 51, 52, 53, 54, 55, 56, 57, 58,
59, 60, 0, 61, 0, 0, 0, 6, 62, 63,
64, 65, 59, 60, 0, 61, 38, 0, 67, 6,
0, 0, 0, 0, 0, 0, 342, 69, 70, 0,
227, 343, 0, 228, 0, 0, 0, 270, 0, 0,
271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
16, 71, 0, 281, 282, 283, 284, 285, 286, 287,
288, 419, 16, 71, 0, 0, 420, 0, 0, 0,
0, 0, 270, 0, 0, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 0, 271, 272, 0, 0,
275, 276, 277, 278, 279, 280, 0, 0, 281, 282,
283, 284, 285, 286, 287, 288, 421, 0, 0, 0,
282, 422, 284, 285, 286, 287, 288, 270, 0, 0,
271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
0, 271, 272, 0, 0, 275, 276, 277, 278, 279,
280, 0, 0, 281, 282, 283, 284, 285, 286, 287,
288, 423, 0, 0, 0, 0, 424, 284, 285, 286,
287, 288, 270, 0, 370, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 270, 0, 0, 271, 272,
273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
283, 284, 285, 286, 287, 288, 0, 0, 372, 0,
0, 281, 282, 283, 284, 285, 286, 287, 288, 270,
0, 376, 271, 272, 273, 274, 275, 276, 277, 278,
279, 280, 270, 0, 0, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
286, 287, 288, 0, 0, 395, 0, 0, 281, 282,
283, 284, 285, 286, 287, 288, 270, 0, 396, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 270,
0, 0, 271, 272, 273, 274, 275, 276, 277, 278,
279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
0, 0, 342, 0, 0, 281, 282, 283, 284, 285,
286, 287, 288, 270, 0, 418, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 270, 0, 0, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
282, 283, 284, 285, 286, 287, 288, 0, 0, 429,
0, 0, 281, 282, 283, 284, 285, 286, 287, 288,
270, 0, 431, 271, 272, 273, 274, 275, 276, 277,
278, 279, 280, 270, 0, 0, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 0, 0, 462, 0, 0, 281,
282, 283, 284, 285, 286, 287, 288, 270, 0, 464,
271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
270, 0, 0, 271, 272, 273, 274, 275, 276, 277,
278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
288, 0, 0, 0, 0, 0, 281, 282, 283, 284,
285, 286, 287, 288, 386, 0, 0, 0, 0, 0,
0, 270, 0, 0, 271, 272, 273, 274, 275, 276,
277, 278, 279, 280, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 281, 282, 283,
284, 285, 286, 287, 288, 392, 0, 0, 0, 0,
0, 0, 270, 0, 0, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 281, 282,
283, 284, 285, 286, 287, 288, 410, 0, 0, 0,
0, 0, 0, 270, 0, 0, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 281,
282, 283, 284, 285, 286, 287, 288, 413, 0, 0,
0, 0, 0, 0, 270, 0, 0, 271, 272, 273,
274, 275, 276, 277, 278, 279, 280, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
281, 282, 283, 284, 285, 286, 287, 288, 416, 0,
0, 0, 0, 0, 0, 270, 0, 0, 271, 272,
273, 274, 275, 276, 277, 278, 279, 280, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 281, 282, 283, 284, 285, 286, 287, 288, 426,
0, 0, 0, 0, 0, 270, 0, 0, 271, 272,
273, 274, 275, 276, 277, 278, 279, 280, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 281, 282, 283, 284, 285, 286, 287, 288, 399,
0, 270, 0, 0, 271, 272, 273, 274, 275, 276,
277, 278, 279, 280, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 281, 282, 283,
284, 285, 286, 287, 288, 269, 270, 0, 0, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 281, 282, 283, 284, 285, 286, 287, 288,
304, 270, 0, 0, 271, 272, 273, 274, 275, 276,
277, 278, 279, 280, 270, 0, 0, 271, 272, 273,
274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
284, 285, 286, 287, 288, 0, 0, 0, 0, 0,
281, 282, 283, 284, 285, 286, 287, 288, 271, 272,
0, 274, 275, 276, 277, 278, 279, 280, 271, 272,
0, 0, 275, 276, 277, 278, 279, 280, 0, 0,
0, 281, 282, 283, 284, 285, 286, 287, 288, 0,
0, 281, 282, 283, 284, 285, 286, 287, 288, 271,
272, 0, 0, 275, 276, 277, 278, 279, 280, 271,
272, 0, 0, 0, 0, 277, 278, 279, 280, 0,
0, 0, 0, 282, 283, 284, 285, 286, 287, 288,
0, 0, 0, 0, 0, 284, 285, 286, 287, 288
};
const short
parser::yycheck_[] =
{
0, 35, 20, 41, 181, 181, 181, 47, 46, 9,
40, 111, 130, 23, 40, 3, 4, 0, 4, 5,
6, 7, 8, 47, 40, 25, 91, 48, 90, 91,
92, 40, 53, 51, 58, 51, 36, 95, 38, 58,
48, 41, 51, 53, 38, 53, 46, 41, 93, 94,
38, 47, 46, 41, 40, 58, 156, 89, 46, 59,
60, 111, 49, 95, 94, 94, 98, 67, 94, 69,
70, 59, 60, 67, 74, 69, 70, 93, 94, 67,
74, 69, 70, 121, 93, 94, 74, 47, 38, 58,
48, 41, 52, 53, 48, 53, 46, 48, 51, 53,
48, 48, 53, 52, 53, 53, 156, 38, 94, 209,
41, 111, 212, 213, 58, 46, 57, 67, 47, 69,
70, 121, 47, 111, 74, 62, 63, 121, 52, 53,
47, 131, 48, 121, 134, 253, 67, 53, 69, 70,
134, 56, 48, 74, 48, 48, 134, 53, 47, 53,
53, 88, 89, 90, 91, 92, 156, 52, 53, 209,
48, 48, 212, 213, 47, 53, 53, 58, 156, 38,
47, 121, 41, 58, 48, 38, 58, 46, 41, 53,
47, 181, 182, 46, 134, 58, 58, 181, 58, 47,
121, 56, 58, 181, 58, 74, 47, 47, 67, 299,
69, 70, 94, 134, 67, 74, 69, 70, 56, 209,
48, 74, 212, 213, 20, 33, 34, 98, 36, 51,
57, 209, 40, 57, 212, 213, 47, 51, 56, 47,
47, 181, 51, 51, 193, 194, 54, 38, 51, 47,
41, 56, 47, 47, 47, 46, 246, 94, 38, 299,
181, 41, 121, 430, 430, 430, 46, 53, 121, 88,
89, 90, 91, 92, 38, 134, 67, 41, 69, 70,
52, 134, 46, 74, 58, 93, 94, 67, 47, 69,
70, 58, 47, 58, 74, 58, 245, 47, 47, 52,
290, 18, 58, 67, 23, 69, 70, 52, 52, 299,
74, 52, 420, 47, 422, 58, 424, 47, 58, 58,
310, 299, 181, 313, 47, 58, 58, 317, 181, 47,
121, 58, 48, 317, 48, 48, 48, 58, 58, 317,
9, 121, 370, 134, 372, 9, 33, 34, 9, 36,
74, 430, 376, 40, 134, 317, 134, 121, 51, -1,
309, -1, -1, 312, 51, -1, -1, 54, -1, -1,
134, -1, -1, 38, -1, -1, 41, 317, -1, -1,
370, 46, 372, -1, -1, 375, 370, -1, 372, -1,
181, -1, 370, -1, 372, -1, 317, -1, -1, -1,
428, 181, 67, 431, 69, 70, 93, 94, -1, 74,
-1, 33, 34, -1, 36, -1, -1, 181, 40, 41,
42, 43, 44, -1, -1, 47, -1, -1, -1, 51,
370, -1, 372, -1, -1, 463, 464, -1, 428, -1,
430, 431, -1, -1, 428, 394, 430, 431, -1, 370,
428, 372, 430, 431, -1, -1, 121, -1, 317, -1,
-1, -1, -1, 412, 317, -1, 415, -1, -1, 134,
-1, 93, 94, 463, 464, 97, 98, -1, -1, 463,
464, -1, -1, -1, -1, 463, 464, -1, 428, 438,
430, 431, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 453, -1, 455, 428, 457, 430,
431, 370, -1, 372, -1, -1, 181, 370, -1, 372,
-1, -1, -1, 463, 464, -1, 317, 33, 34, -1,
36, -1, -1, -1, 40, -1, -1, 317, -1, -1,
-1, 42, 463, 464, -1, 51, -1, -1, 54, -1,
-1, -1, -1, 317, 55, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 428,
-1, 430, 431, 33, 34, 428, 36, 430, 431, 370,
40, 372, -1, -1, -1, -1, -1, 93, 94, -1,
370, 51, 372, -1, 54, -1, -1, -1, -1, -1,
60, 61, -1, -1, 463, 464, 370, -1, 372, -1,
463, 464, -1, -1, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, -1, -1, -1, 129, -1,
-1, 132, 133, 93, 94, 33, 34, 428, 36, 430,
431, -1, 40, 41, 42, 43, 44, -1, 428, -1,
430, 431, 317, 51, -1, -1, -1, -1, -1, -1,
-1, -1, 60, 61, 428, -1, 430, 431, 33, 34,
-1, 36, 463, 464, -1, 40, -1, 178, -1, 180,
-1, -1, 183, 463, 464, -1, 51, -1, -1, 54,
-1, -1, -1, -1, -1, 93, 94, -1, -1, 463,
464, 202, -1, -1, -1, 370, -1, 372, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 222, -1, -1, -1, -1, 227, -1, 93, 94,
231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
241, 33, 34, -1, 36, -1, -1, -1, 40, 250,
251, -1, 253, -1, -1, -1, -1, -1, -1, 51,
261, -1, 54, 428, -1, 430, 431, -1, -1, 270,
271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
281, 282, 283, 284, 285, 286, 287, 288, 33, 34,
-1, 36, -1, -1, -1, 40, -1, -1, 463, 464,
-1, 93, 94, -1, -1, -1, 51, 308, -1, 54,
311, -1, -1, 314, -1, -1, -1, 318, -1, 320,
321, 322, 323, -1, -1, -1, -1, 33, 34, -1,
36, -1, -1, -1, 40, 41, 42, 43, 44, 4,
-1, -1, 343, -1, 345, 51, -1, 12, 93, 94,
15, 16, 17, -1, 19, 20, 21, 22, -1, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
371, 36, 373, 374, -1, 40, 41, 42, 43, 44,
-1, -1, -1, -1, 49, 50, 51, 93, 94, -1,
-1, -1, -1, 58, -1, 60, 61, -1, 399, -1,
-1, -1, -1, 33, 34, -1, 36, -1, -1, -1,
40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
-1, 51, 4, -1, -1, 426, -1, -1, 93, 94,
12, 432, -1, 15, 16, 17, -1, 19, 20, 21,
22, -1, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, -1, 36, -1, -1, -1, 40, 41,
42, 43, 44, 93, 94, -1, -1, 49, 50, 51,
5, -1, -1, -1, -1, -1, 58, 12, 60, 61,
15, 16, 17, -1, 19, 20, 21, 22, -1, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
-1, 36, -1, -1, -1, 40, 41, 42, 43, 44,
-1, 93, 94, -1, 49, -1, 51, 5, -1, -1,
-1, -1, -1, 58, 12, 60, 61, 15, 16, 17,
-1, 19, 20, 21, 22, -1, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, -1, 36, -1,
9, -1, 40, 41, 42, 43, 44, -1, 93, 94,
-1, 49, -1, 51, -1, -1, -1, -1, -1, -1,
58, -1, 60, 61, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
-1, -1, 51, -1, -1, -1, -1, 56, -1, 58,
33, 34, -1, 36, -1, 93, 94, 40, 33, 34,
-1, 36, -1, 72, 73, 40, 9, -1, 51, -1,
-1, 54, -1, -1, -1, -1, 51, -1, -1, 54,
89, -1, -1, 92, 93, 94, 95, 96, 97, 98,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, -1, -1, -1, 51, 52,
93, 94, -1, 56, -1, -1, -1, -1, 93, 94,
33, 34, -1, 36, -1, -1, -1, 40, -1, 72,
73, -1, 9, -1, -1, -1, -1, -1, 51, -1,
-1, 54, -1, -1, -1, -1, 89, -1, -1, 92,
93, 94, 95, 96, 97, 98, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, -1, -1, -1, 51, -1, -1, -1, -1, 56,
93, 94, 33, 34, -1, 36, -1, -1, -1, 40,
-1, -1, -1, -1, -1, 72, 73, -1, 9, -1,
51, -1, -1, 54, -1, -1, -1, -1, -1, -1,
-1, -1, 89, -1, -1, 92, 93, 94, 95, 96,
97, 98, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, -1, -1, -1,
51, -1, 93, 94, -1, 56, -1, 10, 11, -1,
13, 14, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 72, 73, -1, -1, -1, -1, -1, -1, -1,
33, 34, -1, 36, -1, -1, -1, 40, 89, -1,
-1, 92, 93, 94, 95, 96, 97, 98, 51, -1,
-1, 54, -1, -1, -1, -1, -1, 60, 61, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 74, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, -1, -1, -1, -1, -1, -1, -1, 12,
93, 94, 15, 16, 17, -1, 19, 20, 21, 22,
-1, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, -1, 36, -1, -1, -1, 40, 41, 42,
43, 44, 33, 34, -1, 36, 49, -1, 51, 40,
-1, -1, -1, -1, -1, -1, 48, 60, 61, -1,
51, 53, -1, 54, -1, -1, -1, 59, -1, -1,
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
93, 94, -1, 85, 86, 87, 88, 89, 90, 91,
92, 48, 93, 94, -1, -1, 53, -1, -1, -1,
-1, -1, 59, -1, -1, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71, -1, 62, 63, -1, -1,
66, 67, 68, 69, 70, 71, -1, -1, 85, 86,
87, 88, 89, 90, 91, 92, 48, -1, -1, -1,
86, 53, 88, 89, 90, 91, 92, 59, -1, -1,
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
-1, 62, 63, -1, -1, 66, 67, 68, 69, 70,
71, -1, -1, 85, 86, 87, 88, 89, 90, 91,
92, 48, -1, -1, -1, -1, 53, 88, 89, 90,
91, 92, 59, -1, 48, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71, 59, -1, -1, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 85, 86,
87, 88, 89, 90, 91, 92, -1, -1, 48, -1,
-1, 85, 86, 87, 88, 89, 90, 91, 92, 59,
-1, 48, 62, 63, 64, 65, 66, 67, 68, 69,
70, 71, 59, -1, -1, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71, 85, 86, 87, 88, 89,
90, 91, 92, -1, -1, 48, -1, -1, 85, 86,
87, 88, 89, 90, 91, 92, 59, -1, 48, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 59,
-1, -1, 62, 63, 64, 65, 66, 67, 68, 69,
70, 71, 85, 86, 87, 88, 89, 90, 91, 92,
-1, -1, 48, -1, -1, 85, 86, 87, 88, 89,
90, 91, 92, 59, -1, 48, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, 59, -1, -1, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 85,
86, 87, 88, 89, 90, 91, 92, -1, -1, 48,
-1, -1, 85, 86, 87, 88, 89, 90, 91, 92,
59, -1, 48, 62, 63, 64, 65, 66, 67, 68,
69, 70, 71, 59, -1, -1, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, 85, 86, 87, 88,
89, 90, 91, 92, -1, -1, 48, -1, -1, 85,
86, 87, 88, 89, 90, 91, 92, 59, -1, 48,
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
59, -1, -1, 62, 63, 64, 65, 66, 67, 68,
69, 70, 71, 85, 86, 87, 88, 89, 90, 91,
92, -1, -1, -1, -1, -1, 85, 86, 87, 88,
89, 90, 91, 92, 52, -1, -1, -1, -1, -1,
-1, 59, -1, -1, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 85, 86, 87,
88, 89, 90, 91, 92, 52, -1, -1, -1, -1,
-1, -1, 59, -1, -1, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 85, 86,
87, 88, 89, 90, 91, 92, 52, -1, -1, -1,
-1, -1, -1, 59, -1, -1, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 85,
86, 87, 88, 89, 90, 91, 92, 52, -1, -1,
-1, -1, -1, -1, 59, -1, -1, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
85, 86, 87, 88, 89, 90, 91, 92, 52, -1,
-1, -1, -1, -1, -1, 59, -1, -1, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 85, 86, 87, 88, 89, 90, 91, 92, 53,
-1, -1, -1, -1, -1, 59, -1, -1, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 85, 86, 87, 88, 89, 90, 91, 92, 57,
-1, 59, -1, -1, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 85, 86, 87,
88, 89, 90, 91, 92, 58, 59, -1, -1, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 85, 86, 87, 88, 89, 90, 91, 92,
58, 59, -1, -1, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 59, -1, -1, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 85, 86, 87,
88, 89, 90, 91, 92, -1, -1, -1, -1, -1,
85, 86, 87, 88, 89, 90, 91, 92, 62, 63,
-1, 65, 66, 67, 68, 69, 70, 71, 62, 63,
-1, -1, 66, 67, 68, 69, 70, 71, -1, -1,
-1, 85, 86, 87, 88, 89, 90, 91, 92, -1,
-1, 85, 86, 87, 88, 89, 90, 91, 92, 62,
63, -1, -1, 66, 67, 68, 69, 70, 71, 62,
63, -1, -1, -1, -1, 68, 69, 70, 71, -1,
-1, -1, -1, 86, 87, 88, 89, 90, 91, 92,
-1, -1, -1, -1, -1, 88, 89, 90, 91, 92
};
const unsigned char
parser::yystos_[] =
{
0, 4, 5, 6, 7, 8, 40, 94, 110, 111,
112, 113, 114, 115, 116, 188, 93, 94, 189, 189,
47, 0, 112, 113, 114, 47, 91, 58, 58, 95,
191, 164, 188, 94, 48, 48, 53, 58, 49, 122,
188, 4, 12, 15, 16, 17, 19, 20, 21, 22,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 36, 41, 42, 43, 44, 50, 51, 58, 60,
61, 94, 117, 118, 120, 121, 122, 124, 125, 126,
127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
147, 150, 151, 152, 159, 160, 161, 162, 170, 173,
174, 177, 181, 182, 183, 184, 188, 189, 5, 58,
117, 119, 9, 35, 37, 38, 39, 45, 46, 47,
51, 56, 72, 73, 89, 92, 96, 97, 98, 148,
153, 154, 155, 156, 157, 158, 159, 160, 163, 167,
168, 169, 173, 174, 175, 176, 177, 178, 179, 180,
181, 182, 183, 184, 185, 186, 188, 189, 190, 191,
192, 193, 194, 195, 196, 58, 47, 58, 47, 117,
47, 47, 47, 47, 89, 191, 194, 57, 58, 58,
58, 148, 58, 47, 47, 51, 188, 189, 51, 188,
189, 51, 51, 159, 160, 171, 172, 173, 174, 177,
188, 51, 177, 177, 50, 58, 118, 58, 58, 58,
58, 58, 74, 10, 11, 13, 14, 51, 54, 60,
61, 74, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, 161, 162, 188, 47, 56, 5, 58, 117,
47, 47, 148, 51, 52, 148, 165, 166, 188, 148,
148, 47, 97, 98, 173, 174, 176, 188, 94, 58,
59, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 85, 86, 87, 88, 89, 90, 91, 92, 54,
56, 48, 148, 20, 148, 123, 150, 151, 152, 177,
188, 148, 57, 57, 58, 165, 166, 165, 51, 47,
56, 51, 47, 56, 51, 148, 52, 53, 51, 148,
47, 47, 47, 47, 148, 94, 187, 148, 148, 148,
148, 148, 148, 148, 148, 148, 148, 148, 165, 188,
148, 148, 48, 53, 148, 53, 52, 148, 148, 148,
148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
148, 148, 148, 148, 148, 148, 148, 40, 188, 58,
48, 47, 48, 58, 23, 53, 48, 48, 48, 148,
165, 188, 148, 165, 188, 148, 52, 172, 148, 148,
148, 148, 52, 48, 47, 48, 48, 148, 148, 57,
117, 148, 117, 148, 149, 148, 188, 122, 58, 58,
52, 48, 47, 52, 48, 47, 52, 52, 48, 48,
53, 48, 53, 48, 53, 165, 53, 148, 18, 48,
58, 48, 23, 52, 165, 52, 165, 52, 47, 58,
58, 166, 58, 166, 58, 166, 48, 148, 117, 58,
123, 117, 148, 47, 48, 47, 48, 47, 165, 48,
48, 48, 48, 48, 48, 165, 165, 165, 48, 58,
58, 58, 117, 117, 48, 48, 48
};
const unsigned char
parser::yyr1_[] =
{
0, 109, 110, 110, 111, 111, 111, 111, 111, 111,
112, 113, 114, 114, 114, 114, 115, 116, 117, 117,
117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
117, 117, 117, 118, 118, 119, 119, 119, 119, 120,
120, 120, 120, 121, 121, 122, 122, 123, 123, 123,
123, 124, 124, 125, 125, 125, 126, 127, 127, 128,
129, 129, 130, 130, 131, 132, 132, 133, 134, 135,
136, 137, 138, 138, 139, 140, 140, 141, 142, 143,
144, 144, 145, 146, 147, 148, 148, 148, 149, 149,
150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
150, 150, 151, 151, 152, 152, 153, 154, 154, 154,
154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
154, 154, 154, 154, 154, 155, 155, 155, 155, 155,
155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
155, 155, 155, 155, 155, 156, 157, 157, 157, 157,
158, 159, 159, 160, 160, 161, 161, 161, 161, 161,
161, 162, 162, 162, 162, 163, 164, 164, 164, 165,
165, 166, 166, 167, 168, 169, 169, 170, 171, 171,
172, 172, 172, 173, 174, 175, 176, 177, 177, 177,
177, 177, 177, 177, 177, 177, 178, 179, 180, 181,
182, 183, 184, 185, 186, 187, 188, 188, 189, 189,
189, 190, 191, 192, 193, 193, 194, 194, 195, 196
};
const signed char
parser::yyr2_[] =
{
0, 2, 1, 0, 2, 2, 2, 1, 1, 1,
3, 3, 1, 1, 1, 1, 5, 5, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 2, 1, 2, 1, 2,
1, 2, 1, 3, 2, 3, 2, 1, 1, 1,
0, 2, 2, 2, 2, 2, 6, 8, 6, 3,
8, 6, 8, 6, 2, 2, 4, 5, 7, 5,
7, 9, 7, 9, 5, 3, 3, 2, 2, 2,
3, 2, 2, 5, 5, 1, 1, 1, 1, 0,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 2, 2, 2, 2, 5, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
2, 1, 1, 2, 2, 4, 6, 5, 7, 5,
7, 8, 9, 9, 9, 3, 3, 1, 0, 1,
0, 3, 1, 4, 4, 2, 3, 3, 3, 1,
1, 1, 1, 4, 3, 3, 3, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 2, 1, 1,
1, 1, 1, 2, 1, 1, 1, 1, 3, 1,
1, 1, 1, 7, 2, 1, 2, 1, 1, 1
};
#if GSCDEBUG
const short
parser::yyrline_[] =
{
0, 267, 267, 268, 272, 274, 276, 278, 280, 282,
287, 291, 296, 297, 298, 299, 303, 308, 313, 314,
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
335, 336, 337, 341, 342, 346, 348, 350, 352, 357,
359, 361, 363, 368, 369, 373, 374, 378, 380, 382,
385, 389, 391, 396, 398, 400, 405, 410, 412, 417,
422, 424, 429, 431, 436, 441, 443, 448, 453, 458,
463, 468, 473, 478, 487, 494, 496, 501, 506, 511,
516, 518, 523, 528, 533, 538, 539, 540, 544, 545,
549, 551, 553, 555, 557, 559, 561, 563, 565, 567,
569, 571, 576, 578, 583, 585, 590, 595, 597, 599,
601, 603, 605, 607, 609, 611, 613, 615, 617, 619,
621, 623, 625, 627, 629, 634, 635, 636, 637, 638,
639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
659, 660, 661, 662, 663, 667, 672, 674, 676, 678,
683, 688, 689, 692, 693, 697, 699, 701, 703, 705,
707, 712, 714, 716, 718, 723, 728, 730, 733, 737,
740, 744, 746, 751, 756, 761, 763, 768, 775, 777,
782, 783, 784, 788, 793, 798, 803, 808, 809, 810,
811, 812, 813, 814, 815, 816, 820, 825, 830, 835,
840, 845, 850, 855, 860, 865, 870, 872, 877, 879,
881, 886, 891, 896, 901, 903, 908, 910, 915, 920
};
void
parser::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
parser::yy_reduce_print_ (int yyrule) const
{
int yylno = yyrline_[yyrule];
int yynrhs = yyr2_[yyrule];
// Print the symbols being reduced, and their result.
*yycdebug_ << "Reducing stack by rule " << yyrule - 1
<< " (line " << yylno << "):\n";
// The symbols being reduced.
for (int yyi = 0; yyi < yynrhs; yyi++)
YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",
yystack_[(yynrhs) - (yyi + 1)]);
}
#endif // GSCDEBUG
#line 13 "parser.ypp"
} } // xsk::gsc
#line 4784 "parser.cpp"
#line 924 "parser.ypp"
namespace xsk::gsc
{
void parser::error(location const& loc, std::string const& msg)
{
throw comp_error(loc, msg);
}
auto parse_switch(stmt_switch& stm) -> void
{
auto body = make_stmt_list(stm.body->block->loc());
auto current_case = stmt{ nullptr };
auto num = stm.body->block->list.size();
for (auto i = 0u; i < num; i++)
{
auto& entry = stm.body->block->list[0];
if (entry == node::stmt_case || entry == node::stmt_default)
{
if (current_case.as_node != nullptr)
{
body->list.push_back(std::move(current_case));
}
current_case = std::move(stm.body->block->list[0]);
stm.body->block->list.erase(stm.body->block->list.begin());
}
else
{
if (current_case.as_node != nullptr)
{
if (current_case == node::stmt_case)
{
current_case.as_case->body->list.push_back(std::move(entry));
stm.body->block->list.erase(stm.body->block->list.begin());
}
else
{
current_case.as_default->body->list.push_back(std::move(entry));
stm.body->block->list.erase(stm.body->block->list.begin());
}
}
else
{
throw comp_error(entry.loc(), "missing case statement");
}
}
}
if (current_case.as_node != nullptr)
{
body->list.push_back(std::move(current_case));
}
stm.body->block = std::move(body);
}
extern std::unordered_map<token::kind, parser::token::token_kind_type> const tok_to_parser;
extern std::unordered_map<std::string_view, parser::token::token_kind_type> const keyword_map;
auto map_token(context const* ctx_, token& tok) -> parser::symbol_type
{
if (tok.type == token::NAME)
{
tok.data = ctx_->make_token(tok.data);
auto const it = keyword_map.find(tok.data);
if (it != keyword_map.end())
{
if (it->second == parser::token::WAITFRAME)
{
if (ctx_->props() & props::waitframe)
return parser::symbol_type(it->second, tok.pos);
}
else if (it->second == parser::token::ISDEFINED || it->second == parser::token::ISTRUE)
{
if (ctx_->props() & props::boolfuncs)
{
parser::symbol_type(it->second, tok.pos);
}
}
else
{
return parser::symbol_type(it->second, tok.pos);
}
}
return parser::symbol_type(parser::token::IDENTIFIER, std::move(tok.data), tok.pos);
}
else if (tok.type == token::PATH ||tok.type == token::STRING ||tok.type == token::ISTRING || tok.type == token::INT ||tok.type == token::FLT)
{
auto it = tok_to_parser.find(tok.type);
if (it != tok_to_parser.end())
{
return parser::symbol_type(it->second, std::move(tok.data), tok.pos);
}
}
else
{
auto it = tok_to_parser.find(tok.type);
if (it != tok_to_parser.end())
{
return parser::symbol_type(it->second, tok.pos);
}
}
throw error(fmt::format("unmapped token! {}", (u8)tok.type));
}
auto GSClex(context const* ctx_, preprocessor& ppr) -> parser::symbol_type
{
auto tok = ppr.process();
return map_token(ctx_, tok);
}
std::unordered_map<token::kind, parser::token::token_kind_type> const tok_to_parser
{{
{ token::NAME, parser::token::IDENTIFIER },
{ token::PATH, parser::token::PATH },
{ token::STRING, parser::token::STRING },
{ token::ISTRING, parser::token::ISTRING },
{ token::INT, parser::token::INTEGER },
{ token::FLT, parser::token::FLOAT },
{ token::PLUS, parser::token::ADD },
{ token::MINUS, parser::token::SUB },
{ token::STAR, parser::token::MUL },
{ token::DIV, parser::token::DIV },
{ token::MOD, parser::token::MOD },
{ token::BITOR, parser::token::BITWISE_OR },
{ token::BITAND, parser::token::BITWISE_AND },
{ token::BITEXOR, parser::token::BITWISE_EXOR },
{ token::ASSIGN, parser::token::ASSIGN },
{ token::PLUSEQ, parser::token::ASSIGN_ADD },
{ token::MINUSEQ, parser::token::ASSIGN_SUB },
{ token::STAREQ, parser::token::ASSIGN_MUL },
{ token::DIVEQ, parser::token::ASSIGN_DIV },
{ token::MODEQ, parser::token::ASSIGN_MOD },
{ token::BITOREQ, parser::token::ASSIGN_BW_OR },
{ token::BITANDEQ, parser::token::ASSIGN_BW_AND },
{ token::BITEXOREQ, parser::token::ASSIGN_BW_EXOR },
{ token::SHLEQ, parser::token::ASSIGN_LSHIFT },
{ token::SHREQ, parser::token::ASSIGN_RSHIFT },
{ token::TILDE, parser::token::COMPLEMENT },
{ token::BANG, parser::token::NOT },
{ token::GT, parser::token::GREATER },
{ token::LT, parser::token::LESS },
{ token::GE, parser::token::GREATER_EQUAL },
{ token::LE, parser::token::LESS_EQUAL },
{ token::NE, parser::token::INEQUALITY },
{ token::EQ, parser::token::EQUALITY },
{ token::OR, parser::token::OR },
{ token::AND, parser::token::AND },
{ token::SHL, parser::token::LSHIFT },
{ token::SHR, parser::token::RSHIFT },
{ token::INC, parser::token::INCREMENT },
{ token::DEC, parser::token::DECREMENT },
{ token::QMARK, parser::token::QMARK },
{ token::DOT, parser::token::DOT },
{ token::ELLIPSIS, parser::token::ELLIPSIS },
{ token::COMMA, parser::token::COMMA },
{ token::COLON, parser::token::COLON },
{ token::SEMICOLON, parser::token::SEMICOLON },
{ token::DOUBLECOLON, parser::token::DOUBLECOLON },
{ token::LBRACKET, parser::token::LBRACKET },
{ token::RBRACKET, parser::token::RBRACKET },
{ token::LBRACE, parser::token::LBRACE },
{ token::RBRACE, parser::token::RBRACE },
{ token::LPAREN, parser::token::LPAREN },
{ token::RPAREN, parser::token::RPAREN },
{ token::DEVBEGIN, parser::token::DEVBEGIN },
{ token::DEVEND, parser::token::DEVEND },
{ token::INLINE, parser::token::INLINE },
{ token::INCLUDE, parser::token::INCLUDE },
{ token::USINGTREE, parser::token::USINGTREE },
{ token::ANIMTREE, parser::token::ANIMTREE },
{ token::ENDON, parser::token::ENDON },
{ token::NOTIFY, parser::token::NOTIFY },
{ token::WAIT, parser::token::WAIT },
{ token::WAITTILL, parser::token::WAITTILL },
{ token::WAITTILLMATCH, parser::token::WAITTILLMATCH },
{ token::WAITTILLFRAMEEND, parser::token::WAITTILLFRAMEEND },
{ token::WAITFRAME, parser::token::WAITFRAME },
{ token::IF, parser::token::IF },
{ token::ELSE, parser::token::ELSE },
{ token::DO, parser::token::DO },
{ token::WHILE, parser::token::WHILE },
{ token::FOR, parser::token::FOR },
{ token::FOREACH, parser::token::FOREACH },
{ token::IN, parser::token::IN },
{ token::SWITCH, parser::token::SWITCH },
{ token::CASE, parser::token::CASE },
{ token::DEFAULT, parser::token::DEFAULT },
{ token::BREAK, parser::token::BREAK },
{ token::CONTINUE, parser::token::CONTINUE },
{ token::RETURN, parser::token::RETURN },
{ token::BREAKPOINT, parser::token::BREAKPOINT },
{ token::PROFBEGIN, parser::token::PROFBEGIN },
{ token::PROFEND, parser::token::PROFEND },
{ token::THREAD, parser::token::THREAD },
{ token::CHILDTHREAD, parser::token::CHILDTHREAD },
{ token::THISTHREAD, parser::token::THISTHREAD },
{ token::CALL, parser::token::CALL },
{ token::TRUE, parser::token::TRUE },
{ token::FALSE, parser::token::FALSE },
{ token::UNDEFINED, parser::token::UNDEFINED },
{ token::SIZE, parser::token::SIZE },
{ token::GAME, parser::token::GAME },
{ token::SELF, parser::token::SELF },
{ token::ANIM, parser::token::ANIM },
{ token::LEVEL, parser::token::LEVEL },
{ token::ISDEFINED, parser::token::ISDEFINED },
{ token::ISTRUE, parser::token::ISTRUE },
{ token::EOS, parser::token::GSCEOF },
{ token::HASH, parser::token::HASH }
}};
std::unordered_map<std::string_view, parser::token::token_kind_type> const keyword_map
{{
{ "endon", parser::token::ENDON },
{ "notify", parser::token::NOTIFY },
{ "wait", parser::token::WAIT },
{ "waittill", parser::token::WAITTILL },
{ "waittillmatch", parser::token::WAITTILLMATCH },
{ "waittillframeend", parser::token::WAITTILLFRAMEEND },
{ "waitframe", parser::token::WAITFRAME },
{ "if", parser::token::IF },
{ "else", parser::token::ELSE },
{ "do", parser::token::DO },
{ "while", parser::token::WHILE },
{ "for", parser::token::FOR },
{ "foreach", parser::token::FOREACH },
{ "in", parser::token::IN },
{ "switch", parser::token::SWITCH },
{ "case", parser::token::CASE },
{ "default", parser::token::DEFAULT },
{ "break", parser::token::BREAK },
{ "continue", parser::token::CONTINUE },
{ "return", parser::token::RETURN },
{ "breakpoint", parser::token::BREAKPOINT },
{ "prof_begin", parser::token::PROFBEGIN },
{ "prof_end", parser::token::PROFEND },
{ "thread", parser::token::THREAD },
{ "childthread", parser::token::CHILDTHREAD },
{ "thisthread", parser::token::THISTHREAD },
{ "call", parser::token::CALL },
{ "true", parser::token::TRUE },
{ "false", parser::token::FALSE },
{ "undefined", parser::token::UNDEFINED },
{ "size", parser::token::SIZE },
{ "game", parser::token::GAME },
{ "self", parser::token::SELF },
{ "anim", parser::token::ANIM },
{ "level", parser::token::LEVEL },
{ "isdefined", parser::token::ISDEFINED },
{ "istrue", parser::token::ISTRUE },
}};
} // namespace xsk::gsc