4117 lines
166 KiB
C++
4117 lines
166 KiB
C++
// A Bison parser, made by GNU Bison 3.7.5.
|
|
|
|
// 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 <http://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 40 "parser.ypp"
|
|
|
|
#include "stdafx.hpp"
|
|
#include "parser.hpp"
|
|
#include "lexer.hpp"
|
|
using namespace xsk::gsc;
|
|
xsk::gsc::s4::parser::symbol_type S4lex(yyscan_t yyscanner, xsk::gsc::location& loc);
|
|
|
|
#line 47 "parser.cpp"
|
|
|
|
// Take the name prefix into account.
|
|
#define yylex S4lex
|
|
|
|
|
|
|
|
#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 S4DEBUG
|
|
|
|
// 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 // !S4DEBUG
|
|
|
|
# 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 // !S4DEBUG
|
|
|
|
#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 { namespace s4 {
|
|
#line 149 "parser.cpp"
|
|
|
|
/// Build a parser object.
|
|
parser::parser (yyscan_t yyscanner_yyarg, xsk::gsc::location& loc_yyarg, xsk::gsc::program_ptr& ast_yyarg)
|
|
#if S4DEBUG
|
|
: yydebug_ (false),
|
|
yycdebug_ (&std::cerr),
|
|
#else
|
|
:
|
|
#endif
|
|
yy_lac_established_ (false),
|
|
yyscanner (yyscanner_yyarg),
|
|
loc (loc_yyarg),
|
|
ast (ast_yyarg)
|
|
{}
|
|
|
|
parser::~parser ()
|
|
{}
|
|
|
|
parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
|
|
{}
|
|
|
|
/*---------------.
|
|
| symbol kinds. |
|
|
`---------------*/
|
|
|
|
|
|
|
|
// 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_anim: // anim
|
|
value.YY_MOVE_OR_COPY< anim_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_animation: // animation
|
|
value.YY_MOVE_OR_COPY< animation_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_animtree: // animtree
|
|
value.YY_MOVE_OR_COPY< animtree_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_color: // color
|
|
value.YY_MOVE_OR_COPY< color_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_constant: // constant
|
|
value.YY_MOVE_OR_COPY< constant_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_define: // define
|
|
value.YY_MOVE_OR_COPY< define_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_empty_array: // empty_array
|
|
value.YY_MOVE_OR_COPY< empty_array_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_arguments: // expr_arguments
|
|
case symbol_kind::S_expr_arguments_filled: // expr_arguments_filled
|
|
case symbol_kind::S_expr_arguments_empty: // expr_arguments_empty
|
|
value.YY_MOVE_OR_COPY< expr_arguments_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_assign: // expr_assign
|
|
value.YY_MOVE_OR_COPY< expr_assign_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call: // expr_call
|
|
case symbol_kind::S_expr_call_thread: // expr_call_thread
|
|
case symbol_kind::S_expr_call_childthread: // expr_call_childthread
|
|
value.YY_MOVE_OR_COPY< expr_call_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call_function: // expr_call_function
|
|
case symbol_kind::S_expr_call_pointer: // expr_call_pointer
|
|
value.YY_MOVE_OR_COPY< expr_call_type_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_for_expr: // for_expr
|
|
case symbol_kind::S_expr: // expr
|
|
case symbol_kind::S_expr_compare: // expr_compare
|
|
case symbol_kind::S_expr_ternary: // expr_ternary
|
|
case symbol_kind::S_expr_binary: // expr_binary
|
|
case symbol_kind::S_expr_primitive: // expr_primitive
|
|
value.YY_MOVE_OR_COPY< expr_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_false: // false
|
|
value.YY_MOVE_OR_COPY< false_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_file: // file
|
|
value.YY_MOVE_OR_COPY< file_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_float: // float
|
|
value.YY_MOVE_OR_COPY< float_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_game: // game
|
|
value.YY_MOVE_OR_COPY< game_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_integer: // integer
|
|
value.YY_MOVE_OR_COPY< integer_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_istring: // istring
|
|
value.YY_MOVE_OR_COPY< istring_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_level: // level
|
|
value.YY_MOVE_OR_COPY< level_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_name: // name
|
|
value.YY_MOVE_OR_COPY< name_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_function: // expr_function
|
|
case symbol_kind::S_expr_add_array: // expr_add_array
|
|
case symbol_kind::S_expr_array: // expr_array
|
|
case symbol_kind::S_expr_field: // expr_field
|
|
case symbol_kind::S_expr_size: // expr_size
|
|
case symbol_kind::S_object: // object
|
|
value.YY_MOVE_OR_COPY< node_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_parameters: // parameters
|
|
value.YY_MOVE_OR_COPY< parameters_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_self: // self
|
|
value.YY_MOVE_OR_COPY< self_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_FILE: // "file path"
|
|
case symbol_kind::S_NAME: // "identifier"
|
|
case symbol_kind::S_STRING: // "string literal"
|
|
case symbol_kind::S_ISTRING: // "localized string"
|
|
case symbol_kind::S_COLOR: // "color"
|
|
case symbol_kind::S_FLOAT: // "float"
|
|
case symbol_kind::S_INT_DEC: // "int"
|
|
case symbol_kind::S_INT_OCT: // "octal int"
|
|
case symbol_kind::S_INT_BIN: // "binary int"
|
|
case symbol_kind::S_INT_HEX: // "hexadecimal int"
|
|
value.YY_MOVE_OR_COPY< std::string > (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_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_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_endon: // stmt_endon
|
|
value.YY_MOVE_OR_COPY< stmt_endon_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_block: // stmt_block
|
|
case symbol_kind::S_stmt_list: // stmt_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: // stmt
|
|
case symbol_kind::S_for_stmt: // for_stmt
|
|
value.YY_MOVE_OR_COPY< stmt_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;
|
|
|
|
case symbol_kind::S_string: // string
|
|
value.YY_MOVE_OR_COPY< string_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_thisthread: // thisthread
|
|
value.YY_MOVE_OR_COPY< thisthread_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_thread: // thread
|
|
value.YY_MOVE_OR_COPY< thread_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_true: // true
|
|
value.YY_MOVE_OR_COPY< true_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_undefined: // undefined
|
|
value.YY_MOVE_OR_COPY< undefined_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_usingtree: // usingtree
|
|
value.YY_MOVE_OR_COPY< usingtree_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_vector: // vector
|
|
value.YY_MOVE_OR_COPY< vector_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_anim: // anim
|
|
value.move< anim_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_animation: // animation
|
|
value.move< animation_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_animtree: // animtree
|
|
value.move< animtree_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_color: // color
|
|
value.move< color_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_constant: // constant
|
|
value.move< constant_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_define: // define
|
|
value.move< define_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_empty_array: // empty_array
|
|
value.move< empty_array_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_arguments: // expr_arguments
|
|
case symbol_kind::S_expr_arguments_filled: // expr_arguments_filled
|
|
case symbol_kind::S_expr_arguments_empty: // expr_arguments_empty
|
|
value.move< expr_arguments_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_assign: // expr_assign
|
|
value.move< expr_assign_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call: // expr_call
|
|
case symbol_kind::S_expr_call_thread: // expr_call_thread
|
|
case symbol_kind::S_expr_call_childthread: // expr_call_childthread
|
|
value.move< expr_call_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call_function: // expr_call_function
|
|
case symbol_kind::S_expr_call_pointer: // expr_call_pointer
|
|
value.move< expr_call_type_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_for_expr: // for_expr
|
|
case symbol_kind::S_expr: // expr
|
|
case symbol_kind::S_expr_compare: // expr_compare
|
|
case symbol_kind::S_expr_ternary: // expr_ternary
|
|
case symbol_kind::S_expr_binary: // expr_binary
|
|
case symbol_kind::S_expr_primitive: // expr_primitive
|
|
value.move< expr_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_false: // false
|
|
value.move< false_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_file: // file
|
|
value.move< file_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_float: // float
|
|
value.move< float_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_game: // game
|
|
value.move< game_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_integer: // integer
|
|
value.move< integer_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_istring: // istring
|
|
value.move< istring_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_level: // level
|
|
value.move< level_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_name: // name
|
|
value.move< name_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_expr_function: // expr_function
|
|
case symbol_kind::S_expr_add_array: // expr_add_array
|
|
case symbol_kind::S_expr_array: // expr_array
|
|
case symbol_kind::S_expr_field: // expr_field
|
|
case symbol_kind::S_expr_size: // expr_size
|
|
case symbol_kind::S_object: // object
|
|
value.move< node_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_parameters: // parameters
|
|
value.move< parameters_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_self: // self
|
|
value.move< self_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_FILE: // "file path"
|
|
case symbol_kind::S_NAME: // "identifier"
|
|
case symbol_kind::S_STRING: // "string literal"
|
|
case symbol_kind::S_ISTRING: // "localized string"
|
|
case symbol_kind::S_COLOR: // "color"
|
|
case symbol_kind::S_FLOAT: // "float"
|
|
case symbol_kind::S_INT_DEC: // "int"
|
|
case symbol_kind::S_INT_OCT: // "octal int"
|
|
case symbol_kind::S_INT_BIN: // "binary int"
|
|
case symbol_kind::S_INT_HEX: // "hexadecimal int"
|
|
value.move< std::string > (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_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_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_endon: // stmt_endon
|
|
value.move< stmt_endon_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_block: // stmt_block
|
|
case symbol_kind::S_stmt_list: // stmt_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: // stmt
|
|
case symbol_kind::S_for_stmt: // for_stmt
|
|
value.move< stmt_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;
|
|
|
|
case symbol_kind::S_string: // string
|
|
value.move< string_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_thisthread: // thisthread
|
|
value.move< thisthread_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_thread: // thread
|
|
value.move< thread_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_true: // true
|
|
value.move< true_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_undefined: // undefined
|
|
value.move< undefined_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_usingtree: // usingtree
|
|
value.move< usingtree_ptr > (YY_MOVE (that.value));
|
|
break;
|
|
|
|
case symbol_kind::S_vector: // vector
|
|
value.move< vector_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_anim: // anim
|
|
value.copy< anim_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_animation: // animation
|
|
value.copy< animation_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_animtree: // animtree
|
|
value.copy< animtree_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_color: // color
|
|
value.copy< color_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_constant: // constant
|
|
value.copy< constant_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_define: // define
|
|
value.copy< define_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_empty_array: // empty_array
|
|
value.copy< empty_array_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_arguments: // expr_arguments
|
|
case symbol_kind::S_expr_arguments_filled: // expr_arguments_filled
|
|
case symbol_kind::S_expr_arguments_empty: // expr_arguments_empty
|
|
value.copy< expr_arguments_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_assign: // expr_assign
|
|
value.copy< expr_assign_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call: // expr_call
|
|
case symbol_kind::S_expr_call_thread: // expr_call_thread
|
|
case symbol_kind::S_expr_call_childthread: // expr_call_childthread
|
|
value.copy< expr_call_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call_function: // expr_call_function
|
|
case symbol_kind::S_expr_call_pointer: // expr_call_pointer
|
|
value.copy< expr_call_type_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_for_expr: // for_expr
|
|
case symbol_kind::S_expr: // expr
|
|
case symbol_kind::S_expr_compare: // expr_compare
|
|
case symbol_kind::S_expr_ternary: // expr_ternary
|
|
case symbol_kind::S_expr_binary: // expr_binary
|
|
case symbol_kind::S_expr_primitive: // expr_primitive
|
|
value.copy< expr_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_false: // false
|
|
value.copy< false_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_file: // file
|
|
value.copy< file_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_float: // float
|
|
value.copy< float_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_game: // game
|
|
value.copy< game_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_include: // include
|
|
value.copy< include_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_integer: // integer
|
|
value.copy< integer_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_istring: // istring
|
|
value.copy< istring_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_level: // level
|
|
value.copy< level_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_name: // name
|
|
value.copy< name_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_function: // expr_function
|
|
case symbol_kind::S_expr_add_array: // expr_add_array
|
|
case symbol_kind::S_expr_array: // expr_array
|
|
case symbol_kind::S_expr_field: // expr_field
|
|
case symbol_kind::S_expr_size: // expr_size
|
|
case symbol_kind::S_object: // object
|
|
value.copy< node_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_parameters: // parameters
|
|
value.copy< parameters_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_program: // program
|
|
value.copy< program_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_self: // self
|
|
value.copy< self_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_FILE: // "file path"
|
|
case symbol_kind::S_NAME: // "identifier"
|
|
case symbol_kind::S_STRING: // "string literal"
|
|
case symbol_kind::S_ISTRING: // "localized string"
|
|
case symbol_kind::S_COLOR: // "color"
|
|
case symbol_kind::S_FLOAT: // "float"
|
|
case symbol_kind::S_INT_DEC: // "int"
|
|
case symbol_kind::S_INT_OCT: // "octal int"
|
|
case symbol_kind::S_INT_BIN: // "binary int"
|
|
case symbol_kind::S_INT_HEX: // "hexadecimal int"
|
|
value.copy< std::string > (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_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_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_endon: // stmt_endon
|
|
value.copy< stmt_endon_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_block: // stmt_block
|
|
case symbol_kind::S_stmt_list: // stmt_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: // stmt
|
|
case symbol_kind::S_for_stmt: // for_stmt
|
|
value.copy< stmt_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;
|
|
|
|
case symbol_kind::S_string: // string
|
|
value.copy< string_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_thisthread: // thisthread
|
|
value.copy< thisthread_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_thread: // thread
|
|
value.copy< thread_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_true: // true
|
|
value.copy< true_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_undefined: // undefined
|
|
value.copy< undefined_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_usingtree: // usingtree
|
|
value.copy< usingtree_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_vector: // vector
|
|
value.copy< vector_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_anim: // anim
|
|
value.move< anim_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_animation: // animation
|
|
value.move< animation_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_animtree: // animtree
|
|
value.move< animtree_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_color: // color
|
|
value.move< color_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_constant: // constant
|
|
value.move< constant_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_define: // define
|
|
value.move< define_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_empty_array: // empty_array
|
|
value.move< empty_array_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_arguments: // expr_arguments
|
|
case symbol_kind::S_expr_arguments_filled: // expr_arguments_filled
|
|
case symbol_kind::S_expr_arguments_empty: // expr_arguments_empty
|
|
value.move< expr_arguments_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_assign: // expr_assign
|
|
value.move< expr_assign_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call: // expr_call
|
|
case symbol_kind::S_expr_call_thread: // expr_call_thread
|
|
case symbol_kind::S_expr_call_childthread: // expr_call_childthread
|
|
value.move< expr_call_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call_function: // expr_call_function
|
|
case symbol_kind::S_expr_call_pointer: // expr_call_pointer
|
|
value.move< expr_call_type_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_for_expr: // for_expr
|
|
case symbol_kind::S_expr: // expr
|
|
case symbol_kind::S_expr_compare: // expr_compare
|
|
case symbol_kind::S_expr_ternary: // expr_ternary
|
|
case symbol_kind::S_expr_binary: // expr_binary
|
|
case symbol_kind::S_expr_primitive: // expr_primitive
|
|
value.move< expr_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_false: // false
|
|
value.move< false_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_file: // file
|
|
value.move< file_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_float: // float
|
|
value.move< float_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_game: // game
|
|
value.move< game_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_include: // include
|
|
value.move< include_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_integer: // integer
|
|
value.move< integer_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_istring: // istring
|
|
value.move< istring_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_level: // level
|
|
value.move< level_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_name: // name
|
|
value.move< name_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_expr_function: // expr_function
|
|
case symbol_kind::S_expr_add_array: // expr_add_array
|
|
case symbol_kind::S_expr_array: // expr_array
|
|
case symbol_kind::S_expr_field: // expr_field
|
|
case symbol_kind::S_expr_size: // expr_size
|
|
case symbol_kind::S_object: // object
|
|
value.move< node_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_parameters: // parameters
|
|
value.move< parameters_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_program: // program
|
|
value.move< program_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_self: // self
|
|
value.move< self_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_FILE: // "file path"
|
|
case symbol_kind::S_NAME: // "identifier"
|
|
case symbol_kind::S_STRING: // "string literal"
|
|
case symbol_kind::S_ISTRING: // "localized string"
|
|
case symbol_kind::S_COLOR: // "color"
|
|
case symbol_kind::S_FLOAT: // "float"
|
|
case symbol_kind::S_INT_DEC: // "int"
|
|
case symbol_kind::S_INT_OCT: // "octal int"
|
|
case symbol_kind::S_INT_BIN: // "binary int"
|
|
case symbol_kind::S_INT_HEX: // "hexadecimal int"
|
|
value.move< std::string > (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_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_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_endon: // stmt_endon
|
|
value.move< stmt_endon_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_block: // stmt_block
|
|
case symbol_kind::S_stmt_list: // stmt_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: // stmt
|
|
case symbol_kind::S_for_stmt: // for_stmt
|
|
value.move< stmt_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;
|
|
|
|
case symbol_kind::S_string: // string
|
|
value.move< string_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_thisthread: // thisthread
|
|
value.move< thisthread_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_thread: // thread
|
|
value.move< thread_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_true: // true
|
|
value.move< true_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_undefined: // undefined
|
|
value.move< undefined_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_usingtree: // usingtree
|
|
value.move< usingtree_ptr > (that.value);
|
|
break;
|
|
|
|
case symbol_kind::S_vector: // vector
|
|
value.move< vector_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 S4DEBUG
|
|
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)
|
|
{
|
|
yystack_.pop (n);
|
|
}
|
|
|
|
#if S4DEBUG
|
|
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 // S4DEBUG
|
|
|
|
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)
|
|
{
|
|
return yyvalue == yypact_ninf_;
|
|
}
|
|
|
|
bool
|
|
parser::yy_table_value_is_error_ (int yyvalue)
|
|
{
|
|
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 (yyscanner, loc));
|
|
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_anim: // anim
|
|
yylhs.value.emplace< anim_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_animation: // animation
|
|
yylhs.value.emplace< animation_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_animtree: // animtree
|
|
yylhs.value.emplace< animtree_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_color: // color
|
|
yylhs.value.emplace< color_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_constant: // constant
|
|
yylhs.value.emplace< constant_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_define: // define
|
|
yylhs.value.emplace< define_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_empty_array: // empty_array
|
|
yylhs.value.emplace< empty_array_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_expr_arguments: // expr_arguments
|
|
case symbol_kind::S_expr_arguments_filled: // expr_arguments_filled
|
|
case symbol_kind::S_expr_arguments_empty: // expr_arguments_empty
|
|
yylhs.value.emplace< expr_arguments_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_expr_assign: // expr_assign
|
|
yylhs.value.emplace< expr_assign_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call: // expr_call
|
|
case symbol_kind::S_expr_call_thread: // expr_call_thread
|
|
case symbol_kind::S_expr_call_childthread: // expr_call_childthread
|
|
yylhs.value.emplace< expr_call_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_expr_call_function: // expr_call_function
|
|
case symbol_kind::S_expr_call_pointer: // expr_call_pointer
|
|
yylhs.value.emplace< expr_call_type_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_for_expr: // for_expr
|
|
case symbol_kind::S_expr: // expr
|
|
case symbol_kind::S_expr_compare: // expr_compare
|
|
case symbol_kind::S_expr_ternary: // expr_ternary
|
|
case symbol_kind::S_expr_binary: // expr_binary
|
|
case symbol_kind::S_expr_primitive: // expr_primitive
|
|
yylhs.value.emplace< expr_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_false: // false
|
|
yylhs.value.emplace< false_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_file: // file
|
|
yylhs.value.emplace< file_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_float: // float
|
|
yylhs.value.emplace< float_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_game: // game
|
|
yylhs.value.emplace< game_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_include: // include
|
|
yylhs.value.emplace< include_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_integer: // integer
|
|
yylhs.value.emplace< integer_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_istring: // istring
|
|
yylhs.value.emplace< istring_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_level: // level
|
|
yylhs.value.emplace< level_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_name: // name
|
|
yylhs.value.emplace< name_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_expr_function: // expr_function
|
|
case symbol_kind::S_expr_add_array: // expr_add_array
|
|
case symbol_kind::S_expr_array: // expr_array
|
|
case symbol_kind::S_expr_field: // expr_field
|
|
case symbol_kind::S_expr_size: // expr_size
|
|
case symbol_kind::S_object: // object
|
|
yylhs.value.emplace< node_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_parameters: // parameters
|
|
yylhs.value.emplace< parameters_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_program: // program
|
|
yylhs.value.emplace< program_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_self: // self
|
|
yylhs.value.emplace< self_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_FILE: // "file path"
|
|
case symbol_kind::S_NAME: // "identifier"
|
|
case symbol_kind::S_STRING: // "string literal"
|
|
case symbol_kind::S_ISTRING: // "localized string"
|
|
case symbol_kind::S_COLOR: // "color"
|
|
case symbol_kind::S_FLOAT: // "float"
|
|
case symbol_kind::S_INT_DEC: // "int"
|
|
case symbol_kind::S_INT_OCT: // "octal int"
|
|
case symbol_kind::S_INT_BIN: // "binary int"
|
|
case symbol_kind::S_INT_HEX: // "hexadecimal int"
|
|
yylhs.value.emplace< std::string > ();
|
|
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_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_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_endon: // stmt_endon
|
|
yylhs.value.emplace< stmt_endon_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_block: // stmt_block
|
|
case symbol_kind::S_stmt_list: // stmt_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: // stmt
|
|
case symbol_kind::S_for_stmt: // for_stmt
|
|
yylhs.value.emplace< stmt_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;
|
|
|
|
case symbol_kind::S_string: // string
|
|
yylhs.value.emplace< string_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_thisthread: // thisthread
|
|
yylhs.value.emplace< thisthread_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_thread: // thread
|
|
yylhs.value.emplace< thread_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_true: // true
|
|
yylhs.value.emplace< true_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_undefined: // undefined
|
|
yylhs.value.emplace< undefined_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_usingtree: // usingtree
|
|
yylhs.value.emplace< usingtree_ptr > ();
|
|
break;
|
|
|
|
case symbol_kind::S_vector: // vector
|
|
yylhs.value.emplace< vector_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 240 "parser.ypp"
|
|
{ ast = std::move(yystack_[0].value.as < program_ptr > ()); }
|
|
#line 1786 "parser.cpp"
|
|
break;
|
|
|
|
case 3: // root: %empty
|
|
#line 241 "parser.ypp"
|
|
{ ast = std::make_unique<node_program>(yylhs.location); }
|
|
#line 1792 "parser.cpp"
|
|
break;
|
|
|
|
case 4: // program: program include
|
|
#line 246 "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 1798 "parser.cpp"
|
|
break;
|
|
|
|
case 5: // program: program define
|
|
#line 248 "parser.ypp"
|
|
{ yylhs.value.as < program_ptr > () = std::move(yystack_[1].value.as < program_ptr > ()); yylhs.value.as < program_ptr > ()->definitions.push_back(std::move(yystack_[0].value.as < define_ptr > ())); }
|
|
#line 1804 "parser.cpp"
|
|
break;
|
|
|
|
case 6: // program: include
|
|
#line 250 "parser.ypp"
|
|
{ yylhs.value.as < program_ptr > () = std::make_unique<node_program>(yylhs.location); yylhs.value.as < program_ptr > ()->includes.push_back(std::move(yystack_[0].value.as < include_ptr > ())); }
|
|
#line 1810 "parser.cpp"
|
|
break;
|
|
|
|
case 7: // program: define
|
|
#line 252 "parser.ypp"
|
|
{ yylhs.value.as < program_ptr > () = std::make_unique<node_program>(yylhs.location); yylhs.value.as < program_ptr > ()->definitions.push_back(std::move(yystack_[0].value.as < define_ptr > ())); }
|
|
#line 1816 "parser.cpp"
|
|
break;
|
|
|
|
case 8: // include: "#include" file ";"
|
|
#line 257 "parser.ypp"
|
|
{ yylhs.value.as < include_ptr > () = std::make_unique<node_include>(yylhs.location, std::move(yystack_[1].value.as < file_ptr > ())); }
|
|
#line 1822 "parser.cpp"
|
|
break;
|
|
|
|
case 9: // define: usingtree
|
|
#line 261 "parser.ypp"
|
|
{ yylhs.value.as < define_ptr > ().as_usingtree = std::move(yystack_[0].value.as < usingtree_ptr > ()); }
|
|
#line 1828 "parser.cpp"
|
|
break;
|
|
|
|
case 10: // define: constant
|
|
#line 262 "parser.ypp"
|
|
{ yylhs.value.as < define_ptr > ().as_constant = std::move(yystack_[0].value.as < constant_ptr > ()); }
|
|
#line 1834 "parser.cpp"
|
|
break;
|
|
|
|
case 11: // define: thread
|
|
#line 263 "parser.ypp"
|
|
{ yylhs.value.as < define_ptr > ().as_thread = std::move(yystack_[0].value.as < thread_ptr > ()); }
|
|
#line 1840 "parser.cpp"
|
|
break;
|
|
|
|
case 12: // usingtree: "#using_animtree" "(" string ")" ";"
|
|
#line 268 "parser.ypp"
|
|
{ yylhs.value.as < usingtree_ptr > () = std::make_unique<node_usingtree>(yylhs.location, std::move(yystack_[2].value.as < string_ptr > ())); }
|
|
#line 1846 "parser.cpp"
|
|
break;
|
|
|
|
case 13: // constant: name "=" expr ";"
|
|
#line 273 "parser.ypp"
|
|
{ yylhs.value.as < constant_ptr > () = std::make_unique<node_constant>(yylhs.location, std::move(yystack_[3].value.as < name_ptr > ()), std::move(yystack_[1].value.as < expr_ptr > ())); }
|
|
#line 1852 "parser.cpp"
|
|
break;
|
|
|
|
case 14: // thread: name "(" parameters ")" stmt_block
|
|
#line 278 "parser.ypp"
|
|
{ yylhs.value.as < thread_ptr > () = std::make_unique<node_thread>(yylhs.location, std::move(yystack_[4].value.as < name_ptr > ()), std::move(yystack_[2].value.as < parameters_ptr > ()), std::move(yystack_[0].value.as < stmt_list_ptr > ())); }
|
|
#line 1858 "parser.cpp"
|
|
break;
|
|
|
|
case 15: // parameters: parameters "," name
|
|
#line 283 "parser.ypp"
|
|
{ yylhs.value.as < parameters_ptr > () = std::move(yystack_[2].value.as < parameters_ptr > ()); yylhs.value.as < parameters_ptr > ()->list.push_back(std::move(yystack_[0].value.as < name_ptr > ())); }
|
|
#line 1864 "parser.cpp"
|
|
break;
|
|
|
|
case 16: // parameters: name
|
|
#line 285 "parser.ypp"
|
|
{ yylhs.value.as < parameters_ptr > () = std::make_unique<node_parameters>(yylhs.location); yylhs.value.as < parameters_ptr > ()->list.push_back(std::move(yystack_[0].value.as < name_ptr > ())); }
|
|
#line 1870 "parser.cpp"
|
|
break;
|
|
|
|
case 17: // parameters: %empty
|
|
#line 287 "parser.ypp"
|
|
{ yylhs.value.as < parameters_ptr > () = std::make_unique<node_parameters>(yylhs.location); }
|
|
#line 1876 "parser.cpp"
|
|
break;
|
|
|
|
case 18: // stmt: stmt_block
|
|
#line 291 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_list = std::move(yystack_[0].value.as < stmt_list_ptr > ()); }
|
|
#line 1882 "parser.cpp"
|
|
break;
|
|
|
|
case 19: // stmt: stmt_call
|
|
#line 292 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_call = std::move(yystack_[0].value.as < stmt_call_ptr > ()); }
|
|
#line 1888 "parser.cpp"
|
|
break;
|
|
|
|
case 20: // stmt: stmt_assign
|
|
#line 293 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_assign = std::move(yystack_[0].value.as < stmt_assign_ptr > ()); }
|
|
#line 1894 "parser.cpp"
|
|
break;
|
|
|
|
case 21: // stmt: stmt_endon
|
|
#line 294 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_endon = std::move(yystack_[0].value.as < stmt_endon_ptr > ()); }
|
|
#line 1900 "parser.cpp"
|
|
break;
|
|
|
|
case 22: // stmt: stmt_notify
|
|
#line 295 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_notify = std::move(yystack_[0].value.as < stmt_notify_ptr > ()); }
|
|
#line 1906 "parser.cpp"
|
|
break;
|
|
|
|
case 23: // stmt: stmt_wait
|
|
#line 296 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_wait = std::move(yystack_[0].value.as < stmt_wait_ptr > ()); }
|
|
#line 1912 "parser.cpp"
|
|
break;
|
|
|
|
case 24: // stmt: stmt_waittill
|
|
#line 297 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_waittill = std::move(yystack_[0].value.as < stmt_waittill_ptr > ()); }
|
|
#line 1918 "parser.cpp"
|
|
break;
|
|
|
|
case 25: // stmt: stmt_waittillmatch
|
|
#line 298 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_waittillmatch = std::move(yystack_[0].value.as < stmt_waittillmatch_ptr > ()); }
|
|
#line 1924 "parser.cpp"
|
|
break;
|
|
|
|
case 26: // stmt: stmt_waittillframeend
|
|
#line 299 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_waittillframeend = std::move(yystack_[0].value.as < stmt_waittillframeend_ptr > ()); }
|
|
#line 1930 "parser.cpp"
|
|
break;
|
|
|
|
case 27: // stmt: stmt_waitframe
|
|
#line 300 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_waitframe = std::move(yystack_[0].value.as < stmt_waitframe_ptr > ()); }
|
|
#line 1936 "parser.cpp"
|
|
break;
|
|
|
|
case 28: // stmt: stmt_if
|
|
#line 301 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_if = std::move(yystack_[0].value.as < stmt_if_ptr > ()); }
|
|
#line 1942 "parser.cpp"
|
|
break;
|
|
|
|
case 29: // stmt: stmt_ifelse
|
|
#line 302 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_ifelse = std::move(yystack_[0].value.as < stmt_ifelse_ptr > ()); }
|
|
#line 1948 "parser.cpp"
|
|
break;
|
|
|
|
case 30: // stmt: stmt_while
|
|
#line 303 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_while = std::move(yystack_[0].value.as < stmt_while_ptr > ()); }
|
|
#line 1954 "parser.cpp"
|
|
break;
|
|
|
|
case 31: // stmt: stmt_for
|
|
#line 304 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_for = std::move(yystack_[0].value.as < stmt_for_ptr > ()); }
|
|
#line 1960 "parser.cpp"
|
|
break;
|
|
|
|
case 32: // stmt: stmt_foreach
|
|
#line 305 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_foreach = std::move(yystack_[0].value.as < stmt_foreach_ptr > ()); }
|
|
#line 1966 "parser.cpp"
|
|
break;
|
|
|
|
case 33: // stmt: stmt_switch
|
|
#line 306 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_switch = std::move(yystack_[0].value.as < stmt_switch_ptr > ()); }
|
|
#line 1972 "parser.cpp"
|
|
break;
|
|
|
|
case 34: // stmt: stmt_case
|
|
#line 307 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_case = std::move(yystack_[0].value.as < stmt_case_ptr > ()); }
|
|
#line 1978 "parser.cpp"
|
|
break;
|
|
|
|
case 35: // stmt: stmt_default
|
|
#line 308 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_default = std::move(yystack_[0].value.as < stmt_default_ptr > ()); }
|
|
#line 1984 "parser.cpp"
|
|
break;
|
|
|
|
case 36: // stmt: stmt_break
|
|
#line 309 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_break = std::move(yystack_[0].value.as < stmt_break_ptr > ()); }
|
|
#line 1990 "parser.cpp"
|
|
break;
|
|
|
|
case 37: // stmt: stmt_continue
|
|
#line 310 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_continue = std::move(yystack_[0].value.as < stmt_continue_ptr > ()); }
|
|
#line 1996 "parser.cpp"
|
|
break;
|
|
|
|
case 38: // stmt: stmt_return
|
|
#line 311 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_return = std::move(yystack_[0].value.as < stmt_return_ptr > ()); }
|
|
#line 2002 "parser.cpp"
|
|
break;
|
|
|
|
case 39: // stmt_block: "{" stmt_list "}"
|
|
#line 315 "parser.ypp"
|
|
{ yylhs.value.as < stmt_list_ptr > () = std::move(yystack_[1].value.as < stmt_list_ptr > ()); }
|
|
#line 2008 "parser.cpp"
|
|
break;
|
|
|
|
case 40: // stmt_block: "{" "}"
|
|
#line 316 "parser.ypp"
|
|
{ yylhs.value.as < stmt_list_ptr > () = std::make_unique<node_stmt_list>(yylhs.location); }
|
|
#line 2014 "parser.cpp"
|
|
break;
|
|
|
|
case 41: // stmt_list: stmt_list stmt
|
|
#line 321 "parser.ypp"
|
|
{ yylhs.value.as < stmt_list_ptr > () = std::move(yystack_[1].value.as < stmt_list_ptr > ()); yylhs.value.as < stmt_list_ptr > ()->stmts.push_back(std::move(yystack_[0].value.as < stmt_ptr > ())); }
|
|
#line 2020 "parser.cpp"
|
|
break;
|
|
|
|
case 42: // stmt_list: stmt
|
|
#line 323 "parser.ypp"
|
|
{ yylhs.value.as < stmt_list_ptr > () = std::make_unique<node_stmt_list>(yylhs.location); yylhs.value.as < stmt_list_ptr > ()->stmts.push_back(std::move(yystack_[0].value.as < stmt_ptr > ())); }
|
|
#line 2026 "parser.cpp"
|
|
break;
|
|
|
|
case 43: // stmt_call: expr_call ";"
|
|
#line 328 "parser.ypp"
|
|
{ yylhs.value.as < stmt_call_ptr > () = std::make_unique<node_stmt_call>(yylhs.location, std::move(yystack_[1].value.as < expr_call_ptr > ())); }
|
|
#line 2032 "parser.cpp"
|
|
break;
|
|
|
|
case 44: // stmt_call: expr_call_thread ";"
|
|
#line 330 "parser.ypp"
|
|
{ yylhs.value.as < stmt_call_ptr > () = std::make_unique<node_stmt_call>(yylhs.location, std::move(yystack_[1].value.as < expr_call_ptr > ())); }
|
|
#line 2038 "parser.cpp"
|
|
break;
|
|
|
|
case 45: // stmt_assign: expr_assign ";"
|
|
#line 335 "parser.ypp"
|
|
{ yylhs.value.as < stmt_assign_ptr > () = std::make_unique<node_stmt_assign>(yylhs.location, std::move(yystack_[1].value.as < expr_assign_ptr > ())); }
|
|
#line 2044 "parser.cpp"
|
|
break;
|
|
|
|
case 46: // stmt_endon: object "endon" "(" expr ")" ";"
|
|
#line 340 "parser.ypp"
|
|
{ yylhs.value.as < stmt_endon_ptr > () = std::make_unique<node_stmt_endon>(yylhs.location, std::move(yystack_[5].value.as < node_ptr > ()), std::move(yystack_[2].value.as < expr_ptr > ())); }
|
|
#line 2050 "parser.cpp"
|
|
break;
|
|
|
|
case 47: // stmt_notify: object "notify" "(" expr "," expr_arguments ")" ";"
|
|
#line 345 "parser.ypp"
|
|
{ yylhs.value.as < stmt_notify_ptr > () = std::make_unique<node_stmt_notify>(yylhs.location, std::move(yystack_[7].value.as < node_ptr > ()), std::move(yystack_[4].value.as < expr_ptr > ()), std::move(yystack_[2].value.as < expr_arguments_ptr > ())); }
|
|
#line 2056 "parser.cpp"
|
|
break;
|
|
|
|
case 48: // stmt_notify: object "notify" "(" expr ")" ";"
|
|
#line 347 "parser.ypp"
|
|
{ yylhs.value.as < stmt_notify_ptr > () = std::make_unique<node_stmt_notify>(yylhs.location, std::move(yystack_[5].value.as < node_ptr > ()), std::move(yystack_[2].value.as < expr_ptr > ()), std::make_unique<node_expr_arguments>(yylhs.location)); }
|
|
#line 2062 "parser.cpp"
|
|
break;
|
|
|
|
case 49: // stmt_wait: "wait" expr ";"
|
|
#line 352 "parser.ypp"
|
|
{ yylhs.value.as < stmt_wait_ptr > () = std::make_unique<node_stmt_wait>(yylhs.location, std::move(yystack_[1].value.as < expr_ptr > ())); }
|
|
#line 2068 "parser.cpp"
|
|
break;
|
|
|
|
case 50: // stmt_waittill: object "waittill" "(" expr "," expr_arguments ")" ";"
|
|
#line 357 "parser.ypp"
|
|
{ yylhs.value.as < stmt_waittill_ptr > () = std::make_unique<node_stmt_waittill>(yylhs.location, std::move(yystack_[7].value.as < node_ptr > ()), std::move(yystack_[4].value.as < expr_ptr > ()), std::move(yystack_[2].value.as < expr_arguments_ptr > ())); }
|
|
#line 2074 "parser.cpp"
|
|
break;
|
|
|
|
case 51: // stmt_waittill: object "waittill" "(" expr ")" ";"
|
|
#line 359 "parser.ypp"
|
|
{ yylhs.value.as < stmt_waittill_ptr > () = std::make_unique<node_stmt_waittill>(yylhs.location, std::move(yystack_[5].value.as < node_ptr > ()), std::move(yystack_[2].value.as < expr_ptr > ()), std::make_unique<node_expr_arguments>(yylhs.location)); }
|
|
#line 2080 "parser.cpp"
|
|
break;
|
|
|
|
case 52: // stmt_waittillmatch: object "waittillmatch" "(" expr "," expr_arguments ")" ";"
|
|
#line 364 "parser.ypp"
|
|
{ yylhs.value.as < stmt_waittillmatch_ptr > () = std::make_unique<node_stmt_waittillmatch>(yylhs.location, std::move(yystack_[7].value.as < node_ptr > ()), std::move(yystack_[4].value.as < expr_ptr > ()), std::move(yystack_[2].value.as < expr_arguments_ptr > ())); }
|
|
#line 2086 "parser.cpp"
|
|
break;
|
|
|
|
case 53: // stmt_waittillmatch: object "waittillmatch" "(" expr ")" ";"
|
|
#line 366 "parser.ypp"
|
|
{ yylhs.value.as < stmt_waittillmatch_ptr > () = std::make_unique<node_stmt_waittillmatch>(yylhs.location, std::move(yystack_[5].value.as < node_ptr > ()), std::move(yystack_[2].value.as < expr_ptr > ()), std::make_unique<node_expr_arguments>(yylhs.location)); }
|
|
#line 2092 "parser.cpp"
|
|
break;
|
|
|
|
case 54: // stmt_waittillframeend: "waittillframeend" ";"
|
|
#line 371 "parser.ypp"
|
|
{ yylhs.value.as < stmt_waittillframeend_ptr > () = std::make_unique<node_stmt_waittillframeend>(yylhs.location); }
|
|
#line 2098 "parser.cpp"
|
|
break;
|
|
|
|
case 55: // stmt_waitframe: "waitframe" ";"
|
|
#line 376 "parser.ypp"
|
|
{ yylhs.value.as < stmt_waitframe_ptr > () = std::make_unique<node_stmt_waitframe>(yylhs.location); }
|
|
#line 2104 "parser.cpp"
|
|
break;
|
|
|
|
case 56: // stmt_waitframe: "waitframe" "(" ")" ";"
|
|
#line 378 "parser.ypp"
|
|
{ yylhs.value.as < stmt_waitframe_ptr > () = std::make_unique<node_stmt_waitframe>(yylhs.location); }
|
|
#line 2110 "parser.cpp"
|
|
break;
|
|
|
|
case 57: // stmt_if: "if" "(" expr ")" stmt
|
|
#line 383 "parser.ypp"
|
|
{ yylhs.value.as < stmt_if_ptr > () = std::make_unique<node_stmt_if>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < stmt_ptr > ())); }
|
|
#line 2116 "parser.cpp"
|
|
break;
|
|
|
|
case 58: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt
|
|
#line 388 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ifelse_ptr > () = std::make_unique<node_stmt_ifelse>(yylhs.location, std::move(yystack_[4].value.as < expr_ptr > ()), std::move(yystack_[2].value.as < stmt_ptr > ()), std::move(yystack_[0].value.as < stmt_ptr > ())); }
|
|
#line 2122 "parser.cpp"
|
|
break;
|
|
|
|
case 59: // stmt_while: "while" "(" expr ")" stmt
|
|
#line 393 "parser.ypp"
|
|
{ yylhs.value.as < stmt_while_ptr > () = std::make_unique<node_stmt_while>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < stmt_ptr > ())); }
|
|
#line 2128 "parser.cpp"
|
|
break;
|
|
|
|
case 60: // stmt_for: "for" "(" for_stmt ";" for_expr ";" for_stmt ")" stmt
|
|
#line 398 "parser.ypp"
|
|
{ yylhs.value.as < stmt_for_ptr > () = std::make_unique<node_stmt_for>(yylhs.location, std::move(yystack_[6].value.as < stmt_ptr > ()), std::move(yystack_[4].value.as < expr_ptr > ()), std::move(yystack_[2].value.as < stmt_ptr > ()), std::move(yystack_[0].value.as < stmt_ptr > ())); }
|
|
#line 2134 "parser.cpp"
|
|
break;
|
|
|
|
case 61: // stmt_foreach: "foreach" "(" name "in" expr ")" stmt
|
|
#line 403 "parser.ypp"
|
|
{ yylhs.value.as < stmt_foreach_ptr > () = std::make_unique<node_stmt_foreach>(yylhs.location, expr_ptr(std::move(yystack_[4].value.as < name_ptr > ())), std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < stmt_ptr > ())); }
|
|
#line 2140 "parser.cpp"
|
|
break;
|
|
|
|
case 62: // stmt_foreach: "foreach" "(" name "," name "in" expr ")" stmt
|
|
#line 405 "parser.ypp"
|
|
{ yylhs.value.as < stmt_foreach_ptr > () = std::make_unique<node_stmt_foreach>(yylhs.location, expr_ptr(std::move(yystack_[6].value.as < name_ptr > ())), expr_ptr(std::move(yystack_[4].value.as < name_ptr > ())), std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < stmt_ptr > ())); }
|
|
#line 2146 "parser.cpp"
|
|
break;
|
|
|
|
case 63: // stmt_switch: "switch" "(" expr ")" stmt_block
|
|
#line 410 "parser.ypp"
|
|
{ yylhs.value.as < stmt_switch_ptr > () = std::make_unique<node_stmt_switch>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < stmt_list_ptr > ())); }
|
|
#line 2152 "parser.cpp"
|
|
break;
|
|
|
|
case 64: // stmt_case: "case" integer ":"
|
|
#line 415 "parser.ypp"
|
|
{ yylhs.value.as < stmt_case_ptr > () = std::make_unique<node_stmt_case>(yylhs.location, expr_ptr(std::move(yystack_[1].value.as < integer_ptr > ())), std::make_unique<gsc::node_stmt_list>(yylhs.location)); }
|
|
#line 2158 "parser.cpp"
|
|
break;
|
|
|
|
case 65: // stmt_case: "case" string ":"
|
|
#line 417 "parser.ypp"
|
|
{ yylhs.value.as < stmt_case_ptr > () = std::make_unique<node_stmt_case>(yylhs.location, expr_ptr(std::move(yystack_[1].value.as < string_ptr > ())), std::make_unique<gsc::node_stmt_list>(yylhs.location)); }
|
|
#line 2164 "parser.cpp"
|
|
break;
|
|
|
|
case 66: // stmt_default: "default" ":"
|
|
#line 422 "parser.ypp"
|
|
{ yylhs.value.as < stmt_default_ptr > () = std::make_unique<node_stmt_default>(yylhs.location, std::make_unique<gsc::node_stmt_list>(yylhs.location)); }
|
|
#line 2170 "parser.cpp"
|
|
break;
|
|
|
|
case 67: // stmt_break: "break" ";"
|
|
#line 427 "parser.ypp"
|
|
{ yylhs.value.as < stmt_break_ptr > () = std::make_unique<node_stmt_break>(yylhs.location); }
|
|
#line 2176 "parser.cpp"
|
|
break;
|
|
|
|
case 68: // stmt_continue: "continue" ";"
|
|
#line 432 "parser.ypp"
|
|
{ yylhs.value.as < stmt_continue_ptr > () = std::make_unique<node_stmt_continue>(yylhs.location); }
|
|
#line 2182 "parser.cpp"
|
|
break;
|
|
|
|
case 69: // stmt_return: "return" expr ";"
|
|
#line 437 "parser.ypp"
|
|
{ yylhs.value.as < stmt_return_ptr > () = std::make_unique<node_stmt_return>(yylhs.location, std::move(yystack_[1].value.as < expr_ptr > ())); }
|
|
#line 2188 "parser.cpp"
|
|
break;
|
|
|
|
case 70: // stmt_return: "return" ";"
|
|
#line 439 "parser.ypp"
|
|
{ yylhs.value.as < stmt_return_ptr > () = std::make_unique<node_stmt_return>(yylhs.location, std::make_unique<node>(yylhs.location)); }
|
|
#line 2194 "parser.cpp"
|
|
break;
|
|
|
|
case 71: // for_stmt: expr_assign
|
|
#line 443 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_list = std::make_unique<node_stmt_list>(yylhs.location); yylhs.value.as < stmt_ptr > ().as_list->stmts.push_back(stmt_ptr(std::make_unique<node_stmt_assign>(yylhs.location, std::move(yystack_[0].value.as < expr_assign_ptr > ())))); }
|
|
#line 2200 "parser.cpp"
|
|
break;
|
|
|
|
case 72: // for_stmt: %empty
|
|
#line 444 "parser.ypp"
|
|
{ yylhs.value.as < stmt_ptr > ().as_node = std::make_unique<node>(yylhs.location); }
|
|
#line 2206 "parser.cpp"
|
|
break;
|
|
|
|
case 73: // for_expr: expr
|
|
#line 448 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > () = std::move(yystack_[0].value.as < expr_ptr > ()); }
|
|
#line 2212 "parser.cpp"
|
|
break;
|
|
|
|
case 74: // for_expr: %empty
|
|
#line 449 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node>(yylhs.location); }
|
|
#line 2218 "parser.cpp"
|
|
break;
|
|
|
|
case 75: // expr: expr_compare
|
|
#line 453 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > () = std::move(yystack_[0].value.as < expr_ptr > ()); }
|
|
#line 2224 "parser.cpp"
|
|
break;
|
|
|
|
case 76: // expr: expr_ternary
|
|
#line 454 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > () = std::move(yystack_[0].value.as < expr_ptr > ()); }
|
|
#line 2230 "parser.cpp"
|
|
break;
|
|
|
|
case 77: // expr: expr_binary
|
|
#line 455 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > () = std::move(yystack_[0].value.as < expr_ptr > ()); }
|
|
#line 2236 "parser.cpp"
|
|
break;
|
|
|
|
case 78: // expr: expr_primitive
|
|
#line 456 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > () = std::move(yystack_[0].value.as < expr_ptr > ()); }
|
|
#line 2242 "parser.cpp"
|
|
break;
|
|
|
|
case 79: // expr_assign: "++" object
|
|
#line 460 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_increment>(yylhs.location, std::move(yystack_[0].value.as < node_ptr > ())); }
|
|
#line 2248 "parser.cpp"
|
|
break;
|
|
|
|
case 80: // expr_assign: "--" object
|
|
#line 461 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_decrement>(yylhs.location, std::move(yystack_[0].value.as < node_ptr > ())); }
|
|
#line 2254 "parser.cpp"
|
|
break;
|
|
|
|
case 81: // expr_assign: object "++"
|
|
#line 462 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_increment>(yylhs.location, std::move(yystack_[1].value.as < node_ptr > ())); }
|
|
#line 2260 "parser.cpp"
|
|
break;
|
|
|
|
case 82: // expr_assign: object "--"
|
|
#line 463 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_decrement>(yylhs.location, std::move(yystack_[1].value.as < node_ptr > ())); }
|
|
#line 2266 "parser.cpp"
|
|
break;
|
|
|
|
case 83: // expr_assign: object "=" expr
|
|
#line 464 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_equal>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2272 "parser.cpp"
|
|
break;
|
|
|
|
case 84: // expr_assign: object "|=" expr
|
|
#line 465 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_bitwise_or>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2278 "parser.cpp"
|
|
break;
|
|
|
|
case 85: // expr_assign: object "&=" expr
|
|
#line 466 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_bitwise_and>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2284 "parser.cpp"
|
|
break;
|
|
|
|
case 86: // expr_assign: object "^=" expr
|
|
#line 467 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_bitwise_exor>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2290 "parser.cpp"
|
|
break;
|
|
|
|
case 87: // expr_assign: object "<<=" expr
|
|
#line 468 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_shift_left>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()),std::move( yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2296 "parser.cpp"
|
|
break;
|
|
|
|
case 88: // expr_assign: object ">>=" expr
|
|
#line 469 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_shift_right>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2302 "parser.cpp"
|
|
break;
|
|
|
|
case 89: // expr_assign: object "+=" expr
|
|
#line 470 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_add>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2308 "parser.cpp"
|
|
break;
|
|
|
|
case 90: // expr_assign: object "-=" expr
|
|
#line 471 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_sub>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2314 "parser.cpp"
|
|
break;
|
|
|
|
case 91: // expr_assign: object "*=" expr
|
|
#line 472 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_mult>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2320 "parser.cpp"
|
|
break;
|
|
|
|
case 92: // expr_assign: object "/=" expr
|
|
#line 473 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_div>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2326 "parser.cpp"
|
|
break;
|
|
|
|
case 93: // expr_assign: object "%=" expr
|
|
#line 474 "parser.ypp"
|
|
{ yylhs.value.as < expr_assign_ptr > () = std::make_unique<node_expr_assign_mod>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2332 "parser.cpp"
|
|
break;
|
|
|
|
case 94: // expr_compare: expr "||" expr
|
|
#line 478 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_or>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2338 "parser.cpp"
|
|
break;
|
|
|
|
case 95: // expr_compare: expr "&&" expr
|
|
#line 479 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_and>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2344 "parser.cpp"
|
|
break;
|
|
|
|
case 96: // expr_compare: expr "==" expr
|
|
#line 480 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_equality>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2350 "parser.cpp"
|
|
break;
|
|
|
|
case 97: // expr_compare: expr "!=" expr
|
|
#line 481 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_inequality>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2356 "parser.cpp"
|
|
break;
|
|
|
|
case 98: // expr_compare: expr "<=" expr
|
|
#line 482 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_less_equal>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2362 "parser.cpp"
|
|
break;
|
|
|
|
case 99: // expr_compare: expr ">=" expr
|
|
#line 483 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_greater_equal>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2368 "parser.cpp"
|
|
break;
|
|
|
|
case 100: // expr_compare: expr "<" expr
|
|
#line 484 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_less>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2374 "parser.cpp"
|
|
break;
|
|
|
|
case 101: // expr_compare: expr ">" expr
|
|
#line 485 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_greater>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2380 "parser.cpp"
|
|
break;
|
|
|
|
case 102: // expr_ternary: expr "?" expr ":" expr
|
|
#line 489 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_ternary>(yylhs.location, std::move(yystack_[4].value.as < expr_ptr > ()), std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2386 "parser.cpp"
|
|
break;
|
|
|
|
case 103: // expr_binary: expr "|" expr
|
|
#line 493 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_bitwise_or>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2392 "parser.cpp"
|
|
break;
|
|
|
|
case 104: // expr_binary: expr "&" expr
|
|
#line 494 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_bitwise_and>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2398 "parser.cpp"
|
|
break;
|
|
|
|
case 105: // expr_binary: expr "^" expr
|
|
#line 495 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_bitwise_exor>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2404 "parser.cpp"
|
|
break;
|
|
|
|
case 106: // expr_binary: expr "<<" expr
|
|
#line 496 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_shift_left>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2410 "parser.cpp"
|
|
break;
|
|
|
|
case 107: // expr_binary: expr ">>" expr
|
|
#line 497 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_shift_right>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2416 "parser.cpp"
|
|
break;
|
|
|
|
case 108: // expr_binary: expr "+" expr
|
|
#line 498 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_add>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2422 "parser.cpp"
|
|
break;
|
|
|
|
case 109: // expr_binary: expr "-" expr
|
|
#line 499 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_sub>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2428 "parser.cpp"
|
|
break;
|
|
|
|
case 110: // expr_binary: expr "*" expr
|
|
#line 500 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_mult>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2434 "parser.cpp"
|
|
break;
|
|
|
|
case 111: // expr_binary: expr "/" expr
|
|
#line 501 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_div>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2440 "parser.cpp"
|
|
break;
|
|
|
|
case 112: // expr_binary: expr "%" expr
|
|
#line 502 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_mod>(yylhs.location, std::move(yystack_[2].value.as < expr_ptr > ()), std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2446 "parser.cpp"
|
|
break;
|
|
|
|
case 113: // expr_primitive: "(" expr ")"
|
|
#line 506 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > () = std::move(yystack_[1].value.as < expr_ptr > ()); }
|
|
#line 2452 "parser.cpp"
|
|
break;
|
|
|
|
case 114: // expr_primitive: "~" expr
|
|
#line 507 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_complement>(yylhs.location, std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2458 "parser.cpp"
|
|
break;
|
|
|
|
case 115: // expr_primitive: "!" expr
|
|
#line 508 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::make_unique<node_expr_not>(yylhs.location, std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2464 "parser.cpp"
|
|
break;
|
|
|
|
case 116: // expr_primitive: expr_call
|
|
#line 509 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < expr_call_ptr > ()); }
|
|
#line 2470 "parser.cpp"
|
|
break;
|
|
|
|
case 117: // expr_primitive: expr_call_thread
|
|
#line 510 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < expr_call_ptr > ()); }
|
|
#line 2476 "parser.cpp"
|
|
break;
|
|
|
|
case 118: // expr_primitive: expr_call_childthread
|
|
#line 511 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < expr_call_ptr > ()); }
|
|
#line 2482 "parser.cpp"
|
|
break;
|
|
|
|
case 119: // expr_primitive: expr_function
|
|
#line 512 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < node_ptr > ()); }
|
|
#line 2488 "parser.cpp"
|
|
break;
|
|
|
|
case 120: // expr_primitive: expr_add_array
|
|
#line 513 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < node_ptr > ()); }
|
|
#line 2494 "parser.cpp"
|
|
break;
|
|
|
|
case 121: // expr_primitive: expr_array
|
|
#line 514 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < node_ptr > ()); }
|
|
#line 2500 "parser.cpp"
|
|
break;
|
|
|
|
case 122: // expr_primitive: expr_field
|
|
#line 515 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < node_ptr > ()); }
|
|
#line 2506 "parser.cpp"
|
|
break;
|
|
|
|
case 123: // expr_primitive: expr_size
|
|
#line 516 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < node_ptr > ()); }
|
|
#line 2512 "parser.cpp"
|
|
break;
|
|
|
|
case 124: // expr_primitive: thisthread
|
|
#line 517 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < thisthread_ptr > ()); }
|
|
#line 2518 "parser.cpp"
|
|
break;
|
|
|
|
case 125: // expr_primitive: empty_array
|
|
#line 518 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < empty_array_ptr > ()); }
|
|
#line 2524 "parser.cpp"
|
|
break;
|
|
|
|
case 126: // expr_primitive: undefined
|
|
#line 519 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < undefined_ptr > ()); }
|
|
#line 2530 "parser.cpp"
|
|
break;
|
|
|
|
case 127: // expr_primitive: game
|
|
#line 520 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < game_ptr > ()); }
|
|
#line 2536 "parser.cpp"
|
|
break;
|
|
|
|
case 128: // expr_primitive: self
|
|
#line 521 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < self_ptr > ()); }
|
|
#line 2542 "parser.cpp"
|
|
break;
|
|
|
|
case 129: // expr_primitive: anim
|
|
#line 522 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < anim_ptr > ()); }
|
|
#line 2548 "parser.cpp"
|
|
break;
|
|
|
|
case 130: // expr_primitive: level
|
|
#line 523 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < level_ptr > ()); }
|
|
#line 2554 "parser.cpp"
|
|
break;
|
|
|
|
case 131: // expr_primitive: animation
|
|
#line 524 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < animation_ptr > ()); }
|
|
#line 2560 "parser.cpp"
|
|
break;
|
|
|
|
case 132: // expr_primitive: animtree
|
|
#line 525 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < animtree_ptr > ()); }
|
|
#line 2566 "parser.cpp"
|
|
break;
|
|
|
|
case 133: // expr_primitive: name
|
|
#line 526 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < name_ptr > ()); }
|
|
#line 2572 "parser.cpp"
|
|
break;
|
|
|
|
case 134: // expr_primitive: istring
|
|
#line 527 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < istring_ptr > ()); }
|
|
#line 2578 "parser.cpp"
|
|
break;
|
|
|
|
case 135: // expr_primitive: string
|
|
#line 528 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < string_ptr > ()); }
|
|
#line 2584 "parser.cpp"
|
|
break;
|
|
|
|
case 136: // expr_primitive: color
|
|
#line 529 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < color_ptr > ()); }
|
|
#line 2590 "parser.cpp"
|
|
break;
|
|
|
|
case 137: // expr_primitive: vector
|
|
#line 530 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < vector_ptr > ()); }
|
|
#line 2596 "parser.cpp"
|
|
break;
|
|
|
|
case 138: // expr_primitive: float
|
|
#line 531 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < float_ptr > ()); }
|
|
#line 2602 "parser.cpp"
|
|
break;
|
|
|
|
case 139: // expr_primitive: integer
|
|
#line 532 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < integer_ptr > ()); }
|
|
#line 2608 "parser.cpp"
|
|
break;
|
|
|
|
case 140: // expr_primitive: false
|
|
#line 533 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < false_ptr > ()); }
|
|
#line 2614 "parser.cpp"
|
|
break;
|
|
|
|
case 141: // expr_primitive: true
|
|
#line 534 "parser.ypp"
|
|
{ yylhs.value.as < expr_ptr > ().as_node = std::move(yystack_[0].value.as < true_ptr > ()); }
|
|
#line 2620 "parser.cpp"
|
|
break;
|
|
|
|
case 142: // expr_call: expr_call_function
|
|
#line 538 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, false, false, std::make_unique<node>(yylhs.location), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2626 "parser.cpp"
|
|
break;
|
|
|
|
case 143: // expr_call: expr_call_pointer
|
|
#line 539 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, false, false, std::make_unique<node>(yylhs.location), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2632 "parser.cpp"
|
|
break;
|
|
|
|
case 144: // expr_call: object expr_call_function
|
|
#line 540 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, false, false, std::move(yystack_[1].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2638 "parser.cpp"
|
|
break;
|
|
|
|
case 145: // expr_call: object expr_call_pointer
|
|
#line 541 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, false, false, std::move(yystack_[1].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2644 "parser.cpp"
|
|
break;
|
|
|
|
case 146: // expr_call_thread: "thread" expr_call_function
|
|
#line 545 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, true, false, std::make_unique<node>(yylhs.location), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2650 "parser.cpp"
|
|
break;
|
|
|
|
case 147: // expr_call_thread: "thread" expr_call_pointer
|
|
#line 546 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, true, false, std::make_unique<node>(yylhs.location), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2656 "parser.cpp"
|
|
break;
|
|
|
|
case 148: // expr_call_thread: object "thread" expr_call_function
|
|
#line 547 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, true, false, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2662 "parser.cpp"
|
|
break;
|
|
|
|
case 149: // expr_call_thread: object "thread" expr_call_pointer
|
|
#line 548 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, true, false, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2668 "parser.cpp"
|
|
break;
|
|
|
|
case 150: // expr_call_childthread: "childthread" expr_call_function
|
|
#line 552 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, false, true, std::make_unique<node>(yylhs.location), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2674 "parser.cpp"
|
|
break;
|
|
|
|
case 151: // expr_call_childthread: "childthread" expr_call_pointer
|
|
#line 553 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, false, true, std::make_unique<node>(yylhs.location), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2680 "parser.cpp"
|
|
break;
|
|
|
|
case 152: // expr_call_childthread: object "childthread" expr_call_function
|
|
#line 554 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, false, true, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2686 "parser.cpp"
|
|
break;
|
|
|
|
case 153: // expr_call_childthread: object "childthread" expr_call_pointer
|
|
#line 555 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_ptr > () = std::make_unique<node_expr_call>(yylhs.location, false, true, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < expr_call_type_ptr > ())); }
|
|
#line 2692 "parser.cpp"
|
|
break;
|
|
|
|
case 154: // expr_call_function: name "(" expr_arguments ")"
|
|
#line 560 "parser.ypp"
|
|
{yylhs.value.as < expr_call_type_ptr > ().as_func = std::make_unique<node_expr_call_function>(yylhs.location, std::make_unique<node_file>(), std::move(yystack_[3].value.as < name_ptr > ()), std::move(yystack_[1].value.as < expr_arguments_ptr > ())); }
|
|
#line 2698 "parser.cpp"
|
|
break;
|
|
|
|
case 155: // expr_call_function: file "::" name "(" expr_arguments ")"
|
|
#line 562 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_type_ptr > ().as_func = std::make_unique<node_expr_call_function>(yylhs.location, std::move(yystack_[5].value.as < file_ptr > ()), std::move(yystack_[3].value.as < name_ptr > ()), std::move(yystack_[1].value.as < expr_arguments_ptr > ())); }
|
|
#line 2704 "parser.cpp"
|
|
break;
|
|
|
|
case 156: // expr_call_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")"
|
|
#line 567 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_type_ptr > ().as_pointer = std::make_unique<node_expr_call_pointer>(yylhs.location, false, std::move(yystack_[5].value.as < expr_ptr > ()), std::move(yystack_[1].value.as < expr_arguments_ptr > ())); }
|
|
#line 2710 "parser.cpp"
|
|
break;
|
|
|
|
case 157: // expr_call_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")"
|
|
#line 569 "parser.ypp"
|
|
{ yylhs.value.as < expr_call_type_ptr > ().as_pointer = std::make_unique<node_expr_call_pointer>(yylhs.location, true, std::move(yystack_[5].value.as < expr_ptr > ()), std::move(yystack_[1].value.as < expr_arguments_ptr > ())); }
|
|
#line 2716 "parser.cpp"
|
|
break;
|
|
|
|
case 158: // expr_arguments: expr_arguments_filled
|
|
#line 573 "parser.ypp"
|
|
{ yylhs.value.as < expr_arguments_ptr > () = std::move(yystack_[0].value.as < expr_arguments_ptr > ()); }
|
|
#line 2722 "parser.cpp"
|
|
break;
|
|
|
|
case 159: // expr_arguments: expr_arguments_empty
|
|
#line 574 "parser.ypp"
|
|
{ yylhs.value.as < expr_arguments_ptr > () = std::move(yystack_[0].value.as < expr_arguments_ptr > ()); }
|
|
#line 2728 "parser.cpp"
|
|
break;
|
|
|
|
case 160: // expr_arguments_filled: expr_arguments "," expr
|
|
#line 579 "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_ptr > ())); }
|
|
#line 2734 "parser.cpp"
|
|
break;
|
|
|
|
case 161: // expr_arguments_filled: expr
|
|
#line 581 "parser.ypp"
|
|
{ yylhs.value.as < expr_arguments_ptr > () = std::make_unique<node_expr_arguments>(yylhs.location); yylhs.value.as < expr_arguments_ptr > ()->list.push_back(std::move(yystack_[0].value.as < expr_ptr > ())); }
|
|
#line 2740 "parser.cpp"
|
|
break;
|
|
|
|
case 162: // expr_arguments_empty: %empty
|
|
#line 586 "parser.ypp"
|
|
{ yylhs.value.as < expr_arguments_ptr > () = std::make_unique<node_expr_arguments>(yylhs.location); }
|
|
#line 2746 "parser.cpp"
|
|
break;
|
|
|
|
case 163: // expr_function: "::" name
|
|
#line 591 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::make_unique<node_expr_function>(yylhs.location, std::make_unique<node_file>(yylhs.location), std::move(yystack_[0].value.as < name_ptr > ())); }
|
|
#line 2752 "parser.cpp"
|
|
break;
|
|
|
|
case 164: // expr_function: file "::" name
|
|
#line 593 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::make_unique<node_expr_function>(yylhs.location, std::move(yystack_[2].value.as < file_ptr > ()), std::move(yystack_[0].value.as < name_ptr > ())); }
|
|
#line 2758 "parser.cpp"
|
|
break;
|
|
|
|
case 165: // expr_add_array: "[" expr_arguments_filled "]"
|
|
#line 598 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::make_unique<node_expr_add_array>(yylhs.location, std::move(yystack_[1].value.as < expr_arguments_ptr > ())); }
|
|
#line 2764 "parser.cpp"
|
|
break;
|
|
|
|
case 166: // expr_array: object "[" expr "]"
|
|
#line 603 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::make_unique<node_expr_array>(yylhs.location, std::move(yystack_[3].value.as < node_ptr > ()), std::move(yystack_[1].value.as < expr_ptr > ())); }
|
|
#line 2770 "parser.cpp"
|
|
break;
|
|
|
|
case 167: // expr_field: object "." name
|
|
#line 608 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::make_unique<node_expr_field>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ()), std::move(yystack_[0].value.as < name_ptr > ())); }
|
|
#line 2776 "parser.cpp"
|
|
break;
|
|
|
|
case 168: // expr_size: object "." "size"
|
|
#line 613 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::make_unique<node_expr_size>(yylhs.location, std::move(yystack_[2].value.as < node_ptr > ())); }
|
|
#line 2782 "parser.cpp"
|
|
break;
|
|
|
|
case 169: // object: expr_call
|
|
#line 617 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::move(yystack_[0].value.as < expr_call_ptr > ()); }
|
|
#line 2788 "parser.cpp"
|
|
break;
|
|
|
|
case 170: // object: expr_array
|
|
#line 618 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::move(yystack_[0].value.as < node_ptr > ()); }
|
|
#line 2794 "parser.cpp"
|
|
break;
|
|
|
|
case 171: // object: expr_field
|
|
#line 619 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::move(yystack_[0].value.as < node_ptr > ()); }
|
|
#line 2800 "parser.cpp"
|
|
break;
|
|
|
|
case 172: // object: game
|
|
#line 620 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::move(yystack_[0].value.as < game_ptr > ()); }
|
|
#line 2806 "parser.cpp"
|
|
break;
|
|
|
|
case 173: // object: self
|
|
#line 621 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::move(yystack_[0].value.as < self_ptr > ()); }
|
|
#line 2812 "parser.cpp"
|
|
break;
|
|
|
|
case 174: // object: anim
|
|
#line 622 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::move(yystack_[0].value.as < anim_ptr > ()); }
|
|
#line 2818 "parser.cpp"
|
|
break;
|
|
|
|
case 175: // object: level
|
|
#line 623 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::move(yystack_[0].value.as < level_ptr > ()); }
|
|
#line 2824 "parser.cpp"
|
|
break;
|
|
|
|
case 176: // object: name
|
|
#line 624 "parser.ypp"
|
|
{ yylhs.value.as < node_ptr > () = std::move(yystack_[0].value.as < name_ptr > ()); }
|
|
#line 2830 "parser.cpp"
|
|
break;
|
|
|
|
case 177: // float: "-" "float"
|
|
#line 628 "parser.ypp"
|
|
{ yylhs.value.as < float_ptr > () = std::make_unique<node_float>(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); }
|
|
#line 2836 "parser.cpp"
|
|
break;
|
|
|
|
case 178: // float: "float"
|
|
#line 629 "parser.ypp"
|
|
{ yylhs.value.as < float_ptr > () = std::make_unique<node_float>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2842 "parser.cpp"
|
|
break;
|
|
|
|
case 179: // integer: "-" "int"
|
|
#line 633 "parser.ypp"
|
|
{ yylhs.value.as < integer_ptr > () = std::make_unique<node_integer>(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); }
|
|
#line 2848 "parser.cpp"
|
|
break;
|
|
|
|
case 180: // integer: "int"
|
|
#line 634 "parser.ypp"
|
|
{ yylhs.value.as < integer_ptr > () = std::make_unique<node_integer>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2854 "parser.cpp"
|
|
break;
|
|
|
|
case 181: // integer: "octal int"
|
|
#line 635 "parser.ypp"
|
|
{ yylhs.value.as < integer_ptr > () = std::make_unique<node_integer>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2860 "parser.cpp"
|
|
break;
|
|
|
|
case 182: // integer: "binary int"
|
|
#line 636 "parser.ypp"
|
|
{ yylhs.value.as < integer_ptr > () = std::make_unique<node_integer>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2866 "parser.cpp"
|
|
break;
|
|
|
|
case 183: // integer: "hexadecimal int"
|
|
#line 637 "parser.ypp"
|
|
{ yylhs.value.as < integer_ptr > () = std::make_unique<node_integer>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2872 "parser.cpp"
|
|
break;
|
|
|
|
case 184: // thisthread: "thisthread"
|
|
#line 640 "parser.ypp"
|
|
{ yylhs.value.as < thisthread_ptr > () = std::make_unique<node_thisthread>(yylhs.location); }
|
|
#line 2878 "parser.cpp"
|
|
break;
|
|
|
|
case 185: // empty_array: "[" "]"
|
|
#line 641 "parser.ypp"
|
|
{ yylhs.value.as < empty_array_ptr > () = std::make_unique<node_empty_array>(yylhs.location); }
|
|
#line 2884 "parser.cpp"
|
|
break;
|
|
|
|
case 186: // undefined: "undefined"
|
|
#line 642 "parser.ypp"
|
|
{ yylhs.value.as < undefined_ptr > () = std::make_unique<node_undefined>(yylhs.location); }
|
|
#line 2890 "parser.cpp"
|
|
break;
|
|
|
|
case 187: // game: "game"
|
|
#line 643 "parser.ypp"
|
|
{ yylhs.value.as < game_ptr > () = std::make_unique<node_game>(yylhs.location); }
|
|
#line 2896 "parser.cpp"
|
|
break;
|
|
|
|
case 188: // self: "self"
|
|
#line 644 "parser.ypp"
|
|
{ yylhs.value.as < self_ptr > () = std::make_unique<node_self>(yylhs.location); }
|
|
#line 2902 "parser.cpp"
|
|
break;
|
|
|
|
case 189: // anim: "anim"
|
|
#line 645 "parser.ypp"
|
|
{ yylhs.value.as < anim_ptr > () = std::make_unique<node_anim>(yylhs.location); }
|
|
#line 2908 "parser.cpp"
|
|
break;
|
|
|
|
case 190: // level: "level"
|
|
#line 646 "parser.ypp"
|
|
{ yylhs.value.as < level_ptr > () = std::make_unique<node_level>(yylhs.location); }
|
|
#line 2914 "parser.cpp"
|
|
break;
|
|
|
|
case 191: // animation: "%" "identifier"
|
|
#line 647 "parser.ypp"
|
|
{ yylhs.value.as < animation_ptr > () = std::make_unique<node_animation>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2920 "parser.cpp"
|
|
break;
|
|
|
|
case 192: // animtree: "#animtree"
|
|
#line 648 "parser.ypp"
|
|
{ yylhs.value.as < animtree_ptr > () = std::make_unique<node_animtree>(yylhs.location); }
|
|
#line 2926 "parser.cpp"
|
|
break;
|
|
|
|
case 193: // name: "identifier"
|
|
#line 649 "parser.ypp"
|
|
{ yylhs.value.as < name_ptr > () = std::make_unique<node_name>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2932 "parser.cpp"
|
|
break;
|
|
|
|
case 194: // file: "file path"
|
|
#line 650 "parser.ypp"
|
|
{ yylhs.value.as < file_ptr > () = std::make_unique<node_file>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2938 "parser.cpp"
|
|
break;
|
|
|
|
case 195: // istring: "localized string"
|
|
#line 651 "parser.ypp"
|
|
{ yylhs.value.as < istring_ptr > () = std::make_unique<node_istring>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2944 "parser.cpp"
|
|
break;
|
|
|
|
case 196: // string: "string literal"
|
|
#line 652 "parser.ypp"
|
|
{ yylhs.value.as < string_ptr > () = std::make_unique<node_string>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2950 "parser.cpp"
|
|
break;
|
|
|
|
case 197: // color: "color"
|
|
#line 653 "parser.ypp"
|
|
{ yylhs.value.as < color_ptr > () = std::make_unique<node_color>(yylhs.location, yystack_[0].value.as < std::string > ()); }
|
|
#line 2956 "parser.cpp"
|
|
break;
|
|
|
|
case 198: // vector: "(" expr "," expr "," expr ")"
|
|
#line 654 "parser.ypp"
|
|
{ yylhs.value.as < vector_ptr > () = std::make_unique<node_vector>(yylhs.location, std::move(yystack_[5].value.as < expr_ptr > ()), std::move(yystack_[3].value.as < expr_ptr > ()), std::move(yystack_[1].value.as < expr_ptr > ())); }
|
|
#line 2962 "parser.cpp"
|
|
break;
|
|
|
|
case 199: // false: "false"
|
|
#line 655 "parser.ypp"
|
|
{ yylhs.value.as < false_ptr > () = std::make_unique<node_false>(yylhs.location); }
|
|
#line 2968 "parser.cpp"
|
|
break;
|
|
|
|
case 200: // true: "true"
|
|
#line 656 "parser.ypp"
|
|
{ yylhs.value.as < true_ptr > () = std::make_unique<node_true>(yylhs.location); }
|
|
#line 2974 "parser.cpp"
|
|
break;
|
|
|
|
|
|
#line 2978 "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", "#include", "#using_animtree",
|
|
"#animtree", "endon", "notify", "wait", "waittill", "waittillmatch",
|
|
"waittillframeend", "waitframe", "if", "else", "while", "for", "foreach",
|
|
"in", "switch", "case", "default", "break", "continue", "return",
|
|
"thread", "childthread", "thisthread", "call", "true", "false",
|
|
"undefined", "size", "game", "self", "anim", "level", "(", ")", "{", "}",
|
|
"[", "]", ",", ".", "::", ":", ";", "?", "++", "--", "<<", ">>", "||",
|
|
"&&", "==", "!=", "<=", ">=", "<", ">", "!", "~", "=", "+=", "-=", "*=",
|
|
"/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*",
|
|
"/", "%", "file path", "identifier", "string literal",
|
|
"localized string", "color", "float", "int", "octal int", "binary int",
|
|
"hexadecimal int", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF",
|
|
"PREINC", "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program",
|
|
"include", "define", "usingtree", "constant", "thread", "parameters",
|
|
"stmt", "stmt_block", "stmt_list", "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_for", "stmt_foreach",
|
|
"stmt_switch", "stmt_case", "stmt_default", "stmt_break",
|
|
"stmt_continue", "stmt_return", "for_stmt", "for_expr", "expr",
|
|
"expr_assign", "expr_compare", "expr_ternary", "expr_binary",
|
|
"expr_primitive", "expr_call", "expr_call_thread",
|
|
"expr_call_childthread", "expr_call_function", "expr_call_pointer",
|
|
"expr_arguments", "expr_arguments_filled", "expr_arguments_empty",
|
|
"expr_function", "expr_add_array", "expr_array", "expr_field",
|
|
"expr_size", "object", "float", "integer", "thisthread", "empty_array",
|
|
"undefined", "game", "self", "anim", "level", "animation", "animtree",
|
|
"name", "file", "istring", "string", "color", "vector", "false", "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 S4DEBUG
|
|
// 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 S4DEBUG
|
|
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_)
|
|
{
|
|
#if S4DEBUG
|
|
YYCDEBUG << "LAC: initial context established for "
|
|
<< symbol_name (yytoken) << '\n';
|
|
#endif
|
|
yy_lac_established_ = true;
|
|
return yy_lac_check_ (yytoken);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Discard any previous initial lookahead context.
|
|
void
|
|
parser::yy_lac_discard_ (const char* evt)
|
|
{
|
|
/* 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 "
|
|
<< evt << '\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_ = -242;
|
|
|
|
const short parser::yytable_ninf_ = -177;
|
|
|
|
const short
|
|
parser::yypact_[] =
|
|
{
|
|
9, -62, -14, -242, 54, 9, -242, -242, -242, -242,
|
|
-242, -20, -242, 11, -22, -242, -242, -242, -7, 732,
|
|
-242, -242, 27, -13, -242, -242, 22, 22, -242, 42,
|
|
-242, -242, -242, -242, -242, -242, -242, 732, 598, -7,
|
|
732, 732, -36, 3, -242, -242, -242, -242, -242, -242,
|
|
-242, 845, -242, -242, -242, -242, 16, -242, -242, -242,
|
|
-242, -242, -242, 20, 65, -242, 125, -242, -242, -242,
|
|
-242, -242, 139, 357, 386, 429, -242, -242, -4, 52,
|
|
-242, -242, -242, -242, -242, -242, 69, 62, -7, 77,
|
|
-242, -242, 83, 82, -242, -242, 87, 1060, 598, -242,
|
|
1708, 74, 90, -242, -242, -242, -242, -242, -242, -242,
|
|
-242, 732, 732, 732, 732, 732, 732, 732, 732, 732,
|
|
732, 732, 732, 732, 732, 732, 732, 732, 732, 732,
|
|
22, 22, 799, -16, -242, -242, 732, -7, -242, 939,
|
|
-242, -242, 732, -7, 732, -242, 732, 1470, 732, -242,
|
|
1625, 80, 80, 1739, 790, 533, 533, 111, 111, 111,
|
|
111, 1749, 1780, 594, -45, -45, -242, -242, -242, -242,
|
|
-242, -242, -242, 1510, -242, -242, 34, -242, 92, 732,
|
|
91, -18, 97, 103, 104, 105, 108, 193, 100, 102,
|
|
121, 665, -242, 269, 269, -242, -242, 979, -242, -242,
|
|
-242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
|
|
-242, -242, -242, -242, -242, -242, -242, -242, 123, 124,
|
|
129, -242, -242, 866, -242, -242, -242, -242, 83, 1470,
|
|
92, 1550, 1589, 110, 1708, 732, -242, -242, 732, 1660,
|
|
-242, 117, -242, 732, 732, 494, -7, 732, 84, 131,
|
|
132, -242, -242, -242, -242, 1695, -242, 40, 40, -242,
|
|
-242, -242, -242, -242, 142, 147, 148, 149, -7, -242,
|
|
-242, 732, 732, 732, 732, 732, 732, 732, 732, 732,
|
|
732, 732, 158, 732, 164, 1708, 37, -242, 156, 1226,
|
|
1260, 162, -242, 1022, 10, 1294, -242, -242, -242, 732,
|
|
732, 732, 732, 1708, 1708, 1708, 1708, 1708, 1708, 1708,
|
|
1708, 1708, 1708, 1708, 168, 1328, 732, -242, -242, 1019,
|
|
1019, 732, 732, -7, 62, 1362, 1104, 1148, 1192, 732,
|
|
-242, 44, 199, -242, 167, 1708, 1396, 198, -242, 170,
|
|
173, 732, 180, 732, 184, 732, 51, -242, 1019, 494,
|
|
1019, 732, -242, -242, 57, -242, 72, -242, 81, -242,
|
|
-242, 194, -242, 1430, 186, 188, 189, 1019, 1019, -242,
|
|
-242, -242, -242, -242
|
|
};
|
|
|
|
const unsigned char
|
|
parser::yydefact_[] =
|
|
{
|
|
3, 0, 0, 193, 0, 2, 6, 7, 9, 10,
|
|
11, 0, 194, 0, 0, 1, 4, 5, 17, 0,
|
|
8, 196, 0, 0, 16, 192, 0, 0, 184, 0,
|
|
200, 199, 186, 187, 188, 189, 190, 0, 162, 0,
|
|
0, 0, 0, 0, 195, 197, 178, 180, 181, 182,
|
|
183, 0, 75, 76, 77, 78, 116, 117, 118, 142,
|
|
143, 119, 120, 121, 122, 123, 0, 138, 139, 124,
|
|
125, 126, 127, 128, 129, 130, 131, 132, 133, 0,
|
|
134, 135, 136, 137, 140, 141, 0, 0, 0, 0,
|
|
146, 147, 0, 0, 150, 151, 0, 0, 162, 185,
|
|
161, 0, 158, 159, 163, 115, 114, 177, 179, 191,
|
|
13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 144, 145, 162, 0, 12, 0,
|
|
14, 15, 0, 0, 0, 113, 0, 161, 0, 165,
|
|
0, 106, 107, 94, 95, 96, 97, 98, 99, 100,
|
|
101, 103, 104, 105, 108, 109, 110, 111, 112, 148,
|
|
149, 152, 153, 0, 168, 167, 0, 158, 164, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 40, 0, 0, 42, 18, 0, 19, 20,
|
|
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
|
31, 32, 33, 34, 35, 36, 37, 38, 0, 169,
|
|
0, 170, 171, 0, 172, 173, 174, 175, 176, 0,
|
|
0, 0, 0, 0, 160, 0, 166, 154, 162, 0,
|
|
54, 0, 55, 0, 0, 72, 0, 0, 0, 0,
|
|
0, 66, 67, 68, 70, 0, 169, 79, 80, 39,
|
|
41, 45, 43, 44, 0, 0, 0, 0, 0, 81,
|
|
82, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 102, 0, 49, 0, 0,
|
|
0, 0, 71, 0, 0, 0, 64, 65, 69, 0,
|
|
0, 0, 0, 83, 89, 90, 91, 92, 93, 84,
|
|
85, 86, 88, 87, 0, 0, 162, 155, 56, 0,
|
|
0, 74, 0, 0, 0, 0, 0, 0, 0, 162,
|
|
198, 0, 57, 59, 0, 73, 0, 0, 63, 0,
|
|
0, 162, 0, 162, 0, 162, 0, 156, 0, 72,
|
|
0, 0, 46, 48, 0, 51, 0, 53, 0, 157,
|
|
58, 0, 61, 0, 0, 0, 0, 0, 0, 47,
|
|
50, 52, 60, 62
|
|
};
|
|
|
|
const short
|
|
parser::yypgoto_[] =
|
|
{
|
|
-242, -242, -242, 232, 237, -242, -242, -242, -242, -194,
|
|
-76, -242, -242, -242, -242, -242, -242, -242, -242, -242,
|
|
-242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
|
|
-242, -242, -98, -242, 215, -241, -242, -242, -242, -242,
|
|
-138, -101, -242, -19, -17, -51, -24, -242, -242, -242,
|
|
-124, 76, -242, 115, -242, 66, -242, -242, -242, 183,
|
|
206, 239, 252, -242, -242, 0, 5, -242, -12, -242,
|
|
-242, -242, -242
|
|
};
|
|
|
|
const short
|
|
parser::yydefgoto_[] =
|
|
{
|
|
0, 4, 5, 6, 7, 8, 9, 10, 23, 195,
|
|
196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
|
|
206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
|
|
216, 217, 291, 334, 100, 218, 52, 53, 54, 55,
|
|
56, 57, 58, 59, 60, 101, 177, 103, 61, 62,
|
|
63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
|
|
73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
|
|
83, 84, 85
|
|
};
|
|
|
|
const short
|
|
parser::yytable_[] =
|
|
{
|
|
11, 219, 22, 260, 292, 11, 13, 90, 94, 91,
|
|
95, 140, 1, 2, 102, 221, 174, 18, 24, 241,
|
|
12, -176, -176, 14, -176, 87, 92, 92, 322, 242,
|
|
88, 93, 93, 136, 127, 128, 129, -176, 220, 104,
|
|
-176, -169, -169, 19, -169, -170, -170, 134, -170, 135,
|
|
29, 107, 108, 323, 15, 256, 256, -169, 20, 219,
|
|
-169, -170, 21, 89, -170, 86, 92, 3, 29, 221,
|
|
221, 93, 237, 221, 102, 317, 3, 148, -176, -176,
|
|
148, 132, 347, 96, 268, 176, 109, 148, 141, 359,
|
|
-171, -171, 3, -171, 148, 364, 220, 137, -169, -169,
|
|
148, 139, -170, -170, 12, 3, -171, 256, 292, -171,
|
|
365, 169, 171, 170, 172, 148, 138, 148, 142, 366,
|
|
136, 221, 12, 3, 148, 332, 333, 143, 144, 238,
|
|
92, 92, 149, 175, 243, 93, 93, 178, 240, 228,
|
|
244, 245, 246, 230, 93, 247, 251, -171, -171, 252,
|
|
130, 131, 284, 29, 360, 288, 362, 125, 126, 127,
|
|
128, 129, 112, 113, -172, -172, 132, -172, 253, 133,
|
|
261, 262, 108, 372, 373, 250, 263, 296, 297, 299,
|
|
-172, 219, 219, -172, 300, 301, 302, 286, 125, 126,
|
|
127, 128, 129, 228, 228, 221, 221, 228, 93, 93,
|
|
314, 316, 93, 318, 134, 329, 135, 12, 3, 321,
|
|
219, 256, 219, 348, 349, 222, 351, 352, 220, 220,
|
|
353, -172, -172, 92, 221, 221, 221, 355, 93, 219,
|
|
219, 357, 367, 369, 51, 370, 371, 16, 134, 134,
|
|
135, 135, 17, 221, 221, 228, 294, 220, 338, 220,
|
|
93, 361, 97, 249, 223, 105, 106, 92, 92, 0,
|
|
0, 0, 93, 93, 0, 331, 220, 220, 175, 222,
|
|
222, 248, 0, 222, 134, 0, 135, 21, 346, 0,
|
|
0, 47, 48, 49, 50, 0, 0, 0, 0, 0,
|
|
354, 0, 356, 92, 358, 0, 0, 29, 93, 0,
|
|
0, 0, 33, 34, 35, 36, 0, 0, 257, 258,
|
|
89, 0, 223, 147, 0, 0, 0, 0, 0, 228,
|
|
228, 222, 224, 337, 93, 93, 150, 151, 152, 153,
|
|
154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
|
|
164, 165, 166, 167, 168, 225, 0, 173, 228, 228,
|
|
228, 12, 3, 93, 93, 93, 0, 229, 0, 231,
|
|
293, 232, 0, 234, 0, 0, 0, 228, 228, 0,
|
|
0, 0, 93, 93, 0, 0, 224, 224, 226, 0,
|
|
224, 0, -173, -173, 0, -173, 0, 0, 0, 0,
|
|
0, 227, 0, 0, 239, 222, 222, 0, -173, 225,
|
|
225, -173, 0, 225, 0, 0, 255, 0, 0, 0,
|
|
0, -174, -174, 0, -174, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 222, 222, 222, -174, 224, 0,
|
|
-174, 0, 226, 226, 223, 223, 226, 0, 0, -173,
|
|
-173, 0, 0, 222, 222, 227, 227, 0, 0, 227,
|
|
285, 225, 0, 0, -175, -175, 0, -175, 289, 290,
|
|
0, 0, 295, 223, 293, 223, 0, 0, -174, -174,
|
|
-175, 0, 0, -175, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 223, 223, 226, 0, 303, 304, 305, 306,
|
|
307, 308, 309, 310, 311, 312, 313, 227, 315, 0,
|
|
0, 0, 224, 224, 0, 0, 0, 0, 0, 0,
|
|
0, -175, -175, 0, 325, 326, 327, 328, 0, 0,
|
|
0, 0, 29, 0, 0, 225, 225, 33, 34, 35,
|
|
36, 224, 224, 224, 0, 89, 335, 336, 0, 0,
|
|
0, 0, 0, 193, 194, 0, 0, 0, 0, 0,
|
|
224, 224, 0, 0, 225, 225, 225, 0, 226, 226,
|
|
0, 0, 0, 0, 0, 0, 363, 0, 0, 0,
|
|
0, 227, 227, 225, 225, 0, 12, 3, 0, 0,
|
|
0, 0, 0, 0, 112, 113, 0, 226, 226, 226,
|
|
118, 119, 120, 121, 0, 0, 0, 0, 0, 0,
|
|
227, 227, 227, 25, 0, 0, 226, 226, 0, 0,
|
|
125, 126, 127, 128, 129, 0, 0, 0, 0, 227,
|
|
227, 0, 0, 26, 27, 28, 29, 30, 31, 32,
|
|
0, 33, 34, 35, 36, 37, 0, 0, 0, 98,
|
|
99, 0, 0, 39, 0, 112, 113, 0, 0, 116,
|
|
117, 118, 119, 120, 121, 0, 0, 0, 0, 40,
|
|
41, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
25, 125, 126, 127, 128, 129, 42, 0, 0, 43,
|
|
12, 3, 21, 44, 45, 46, 47, 48, 49, 50,
|
|
26, 27, 28, 29, 30, 31, 32, 0, 33, 34,
|
|
35, 36, 37, 0, 0, 0, 38, 0, 0, 0,
|
|
39, 0, 254, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 40, 41, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 25, 0, 0,
|
|
0, 0, 0, 42, 0, 0, 43, 12, 3, 21,
|
|
44, 45, 46, 47, 48, 49, 50, 26, 27, 28,
|
|
29, 30, 31, 32, 0, 33, 34, 35, 36, 37,
|
|
0, 0, 0, 38, 0, 0, 0, 39, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 25, 0, 0, 0, 0, 0,
|
|
42, 0, 0, 43, 12, 3, 21, 44, 45, 46,
|
|
47, 48, 49, 50, 26, 27, 28, 29, 30, 31,
|
|
32, 0, 33, 34, 35, 36, 37, 0, 0, 0,
|
|
98, 112, 113, 0, 39, 116, 117, 118, 119, 120,
|
|
121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
40, 41, 0, 0, 122, 123, 124, 125, 126, 127,
|
|
128, 129, 264, 265, 0, 266, 267, 42, 0, 0,
|
|
43, 12, 3, 21, 44, 45, 46, 47, 48, 49,
|
|
50, 130, 110, 111, 29, 0, 112, 113, 114, 115,
|
|
116, 117, 118, 119, 120, 121, 0, 132, 0, 0,
|
|
268, 0, 0, 0, 0, 269, 270, 0, 0, 122,
|
|
123, 124, 125, 126, 127, 128, 129, 0, 0, 271,
|
|
272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
|
|
0, 0, 0, 0, 0, 0, 0, 179, 12, 3,
|
|
180, 181, 182, 0, 183, 184, 185, 0, 186, 187,
|
|
188, 189, 190, 191, 26, 0, 0, 29, 0, 0,
|
|
0, 0, 33, 34, 35, 36, 0, 0, 139, 192,
|
|
89, 0, 0, 0, 0, 0, 0, 179, 193, 194,
|
|
180, 181, 182, 0, 183, 184, 185, 0, 186, 187,
|
|
188, 189, 190, 191, 26, 0, 0, 29, 0, 0,
|
|
0, 0, 33, 34, 35, 36, 0, 0, 139, 259,
|
|
89, 12, 3, 0, 0, 0, 0, 179, 193, 194,
|
|
180, 181, 182, 0, 183, 184, 185, 0, 186, 187,
|
|
188, 189, 190, 191, 26, 0, 0, 29, 0, 0,
|
|
29, 0, 33, 34, 35, 36, 0, 0, 139, 0,
|
|
89, 12, 3, 132, 0, 0, 268, 0, 193, 194,
|
|
0, 269, 270, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 271, 272, 273, 274, 275,
|
|
276, 277, 278, 279, 280, 281, 0, 0, 145, 0,
|
|
0, 12, 3, 146, 12, 3, 0, 0, 111, 0,
|
|
0, 112, 113, 114, 115, 116, 117, 118, 119, 120,
|
|
121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 122, 123, 124, 125, 126, 127,
|
|
128, 129, 340, 0, 0, 0, 0, 341, 0, 0,
|
|
0, 0, 111, 0, 0, 112, 113, 114, 115, 116,
|
|
117, 118, 119, 120, 121, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 122, 123,
|
|
124, 125, 126, 127, 128, 129, 342, 0, 0, 0,
|
|
0, 343, 0, 0, 0, 0, 111, 0, 0, 112,
|
|
113, 114, 115, 116, 117, 118, 119, 120, 121, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 122, 123, 124, 125, 126, 127, 128, 129,
|
|
344, 0, 0, 0, 0, 345, 0, 0, 0, 0,
|
|
111, 0, 0, 112, 113, 114, 115, 116, 117, 118,
|
|
119, 120, 121, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 319, 0, 122, 123, 124, 125,
|
|
126, 127, 128, 129, 111, 0, 0, 112, 113, 114,
|
|
115, 116, 117, 118, 119, 120, 121, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 320, 0,
|
|
122, 123, 124, 125, 126, 127, 128, 129, 111, 0,
|
|
0, 112, 113, 114, 115, 116, 117, 118, 119, 120,
|
|
121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 324, 0, 122, 123, 124, 125, 126, 127,
|
|
128, 129, 111, 0, 0, 112, 113, 114, 115, 116,
|
|
117, 118, 119, 120, 121, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 330, 0, 122, 123,
|
|
124, 125, 126, 127, 128, 129, 111, 0, 0, 112,
|
|
113, 114, 115, 116, 117, 118, 119, 120, 121, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
339, 0, 122, 123, 124, 125, 126, 127, 128, 129,
|
|
111, 0, 0, 112, 113, 114, 115, 116, 117, 118,
|
|
119, 120, 121, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 350, 0, 122, 123, 124, 125,
|
|
126, 127, 128, 129, 111, 0, 0, 112, 113, 114,
|
|
115, 116, 117, 118, 119, 120, 121, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 368, 0,
|
|
122, 123, 124, 125, 126, 127, 128, 129, 111, 0,
|
|
0, 112, 113, 114, 115, 116, 117, 118, 119, 120,
|
|
121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 122, 123, 124, 125, 126, 127,
|
|
128, 129, 233, 0, 0, 0, 0, 0, 111, 0,
|
|
0, 112, 113, 114, 115, 116, 117, 118, 119, 120,
|
|
121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 122, 123, 124, 125, 126, 127,
|
|
128, 129, 236, 0, 0, 0, 0, 0, 111, 0,
|
|
0, 112, 113, 114, 115, 116, 117, 118, 119, 120,
|
|
121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 122, 123, 124, 125, 126, 127,
|
|
128, 129, 282, 0, 0, 0, 0, 0, 111, 0,
|
|
0, 112, 113, 114, 115, 116, 117, 118, 119, 120,
|
|
121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 122, 123, 124, 125, 126, 127,
|
|
128, 129, 283, 0, 0, 0, 0, 111, 0, 0,
|
|
112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 122, 123, 124, 125, 126, 127, 128,
|
|
129, 235, 0, 111, 0, 0, 112, 113, 114, 115,
|
|
116, 117, 118, 119, 120, 121, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 122,
|
|
123, 124, 125, 126, 127, 128, 129, 287, 111, 0,
|
|
0, 112, 113, 114, 115, 116, 117, 118, 119, 120,
|
|
121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 122, 123, 124, 125, 126, 127,
|
|
128, 129, 298, 111, 0, 0, 112, 113, 114, 115,
|
|
116, 117, 118, 119, 120, 121, 111, 0, 0, 112,
|
|
113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
|
|
123, 124, 125, 126, 127, 128, 129, 0, 0, 0,
|
|
0, 0, 122, 123, 124, 125, 126, 127, 128, 129,
|
|
112, 113, 0, 115, 116, 117, 118, 119, 120, 121,
|
|
112, 113, 0, 0, 116, 117, 118, 119, 120, 121,
|
|
0, 0, 0, 122, 123, 124, 125, 126, 127, 128,
|
|
129, 0, 0, 0, 123, 124, 125, 126, 127, 128,
|
|
129, 112, 113, 0, 0, 116, 117, 118, 119, 120,
|
|
121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 124, 125, 126, 127,
|
|
128, 129
|
|
};
|
|
|
|
const short
|
|
parser::yycheck_[] =
|
|
{
|
|
0, 139, 14, 197, 245, 5, 1, 26, 27, 26,
|
|
27, 87, 3, 4, 38, 139, 32, 37, 18, 37,
|
|
82, 25, 26, 37, 28, 38, 26, 27, 18, 47,
|
|
43, 26, 27, 37, 79, 80, 81, 41, 139, 39,
|
|
44, 25, 26, 63, 28, 25, 26, 66, 28, 66,
|
|
28, 87, 88, 43, 0, 193, 194, 41, 47, 197,
|
|
44, 41, 84, 41, 44, 38, 66, 83, 28, 193,
|
|
194, 66, 38, 197, 98, 38, 83, 43, 82, 83,
|
|
43, 41, 38, 41, 44, 136, 83, 43, 88, 38,
|
|
25, 26, 83, 28, 43, 38, 197, 45, 82, 83,
|
|
43, 39, 82, 83, 82, 83, 41, 245, 349, 44,
|
|
38, 130, 131, 130, 131, 43, 47, 43, 41, 38,
|
|
37, 245, 82, 83, 43, 319, 320, 45, 41, 37,
|
|
130, 131, 42, 133, 37, 130, 131, 137, 47, 139,
|
|
37, 37, 37, 143, 139, 37, 46, 82, 83, 47,
|
|
25, 26, 42, 28, 348, 38, 350, 77, 78, 79,
|
|
80, 81, 51, 52, 25, 26, 41, 28, 47, 44,
|
|
47, 47, 88, 367, 368, 187, 47, 46, 46, 37,
|
|
41, 319, 320, 44, 37, 37, 37, 238, 77, 78,
|
|
79, 80, 81, 193, 194, 319, 320, 197, 193, 194,
|
|
42, 37, 197, 47, 223, 37, 223, 82, 83, 47,
|
|
348, 349, 350, 14, 47, 139, 18, 47, 319, 320,
|
|
47, 82, 83, 223, 348, 349, 350, 47, 223, 367,
|
|
368, 47, 38, 47, 19, 47, 47, 5, 257, 258,
|
|
257, 258, 5, 367, 368, 245, 246, 348, 324, 350,
|
|
245, 349, 37, 187, 139, 40, 41, 257, 258, -1,
|
|
-1, -1, 257, 258, -1, 316, 367, 368, 268, 193,
|
|
194, 78, -1, 197, 293, -1, 293, 84, 329, -1,
|
|
-1, 88, 89, 90, 91, -1, -1, -1, -1, -1,
|
|
341, -1, 343, 293, 345, -1, -1, 28, 293, -1,
|
|
-1, -1, 33, 34, 35, 36, -1, -1, 193, 194,
|
|
41, -1, 197, 98, -1, -1, -1, -1, -1, 319,
|
|
320, 245, 139, 323, 319, 320, 111, 112, 113, 114,
|
|
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
|
|
125, 126, 127, 128, 129, 139, -1, 132, 348, 349,
|
|
350, 82, 83, 348, 349, 350, -1, 142, -1, 144,
|
|
245, 146, -1, 148, -1, -1, -1, 367, 368, -1,
|
|
-1, -1, 367, 368, -1, -1, 193, 194, 139, -1,
|
|
197, -1, 25, 26, -1, 28, -1, -1, -1, -1,
|
|
-1, 139, -1, -1, 179, 319, 320, -1, 41, 193,
|
|
194, 44, -1, 197, -1, -1, 191, -1, -1, -1,
|
|
-1, 25, 26, -1, 28, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 348, 349, 350, 41, 245, -1,
|
|
44, -1, 193, 194, 319, 320, 197, -1, -1, 82,
|
|
83, -1, -1, 367, 368, 193, 194, -1, -1, 197,
|
|
235, 245, -1, -1, 25, 26, -1, 28, 243, 244,
|
|
-1, -1, 247, 348, 349, 350, -1, -1, 82, 83,
|
|
41, -1, -1, 44, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, 367, 368, 245, -1, 271, 272, 273, 274,
|
|
275, 276, 277, 278, 279, 280, 281, 245, 283, -1,
|
|
-1, -1, 319, 320, -1, -1, -1, -1, -1, -1,
|
|
-1, 82, 83, -1, 299, 300, 301, 302, -1, -1,
|
|
-1, -1, 28, -1, -1, 319, 320, 33, 34, 35,
|
|
36, 348, 349, 350, -1, 41, 321, 322, -1, -1,
|
|
-1, -1, -1, 49, 50, -1, -1, -1, -1, -1,
|
|
367, 368, -1, -1, 348, 349, 350, -1, 319, 320,
|
|
-1, -1, -1, -1, -1, -1, 351, -1, -1, -1,
|
|
-1, 319, 320, 367, 368, -1, 82, 83, -1, -1,
|
|
-1, -1, -1, -1, 51, 52, -1, 348, 349, 350,
|
|
57, 58, 59, 60, -1, -1, -1, -1, -1, -1,
|
|
348, 349, 350, 5, -1, -1, 367, 368, -1, -1,
|
|
77, 78, 79, 80, 81, -1, -1, -1, -1, 367,
|
|
368, -1, -1, 25, 26, 27, 28, 29, 30, 31,
|
|
-1, 33, 34, 35, 36, 37, -1, -1, -1, 41,
|
|
42, -1, -1, 45, -1, 51, 52, -1, -1, 55,
|
|
56, 57, 58, 59, 60, -1, -1, -1, -1, 61,
|
|
62, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
5, 77, 78, 79, 80, 81, 78, -1, -1, 81,
|
|
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
|
|
25, 26, 27, 28, 29, 30, 31, -1, 33, 34,
|
|
35, 36, 37, -1, -1, -1, 41, -1, -1, -1,
|
|
45, -1, 47, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, -1, -1, 61, 62, -1, -1,
|
|
-1, -1, -1, -1, -1, -1, -1, 5, -1, -1,
|
|
-1, -1, -1, 78, -1, -1, 81, 82, 83, 84,
|
|
85, 86, 87, 88, 89, 90, 91, 25, 26, 27,
|
|
28, 29, 30, 31, -1, 33, 34, 35, 36, 37,
|
|
-1, -1, -1, 41, -1, -1, -1, 45, -1, -1,
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, 61, 62, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 5, -1, -1, -1, -1, -1,
|
|
78, -1, -1, 81, 82, 83, 84, 85, 86, 87,
|
|
88, 89, 90, 91, 25, 26, 27, 28, 29, 30,
|
|
31, -1, 33, 34, 35, 36, 37, -1, -1, -1,
|
|
41, 51, 52, -1, 45, 55, 56, 57, 58, 59,
|
|
60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
61, 62, -1, -1, 74, 75, 76, 77, 78, 79,
|
|
80, 81, 6, 7, -1, 9, 10, 78, -1, -1,
|
|
81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
|
|
91, 25, 47, 48, 28, -1, 51, 52, 53, 54,
|
|
55, 56, 57, 58, 59, 60, -1, 41, -1, -1,
|
|
44, -1, -1, -1, -1, 49, 50, -1, -1, 74,
|
|
75, 76, 77, 78, 79, 80, 81, -1, -1, 63,
|
|
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
|
|
-1, -1, -1, -1, -1, -1, -1, 8, 82, 83,
|
|
11, 12, 13, -1, 15, 16, 17, -1, 19, 20,
|
|
21, 22, 23, 24, 25, -1, -1, 28, -1, -1,
|
|
-1, -1, 33, 34, 35, 36, -1, -1, 39, 40,
|
|
41, -1, -1, -1, -1, -1, -1, 8, 49, 50,
|
|
11, 12, 13, -1, 15, 16, 17, -1, 19, 20,
|
|
21, 22, 23, 24, 25, -1, -1, 28, -1, -1,
|
|
-1, -1, 33, 34, 35, 36, -1, -1, 39, 40,
|
|
41, 82, 83, -1, -1, -1, -1, 8, 49, 50,
|
|
11, 12, 13, -1, 15, 16, 17, -1, 19, 20,
|
|
21, 22, 23, 24, 25, -1, -1, 28, -1, -1,
|
|
28, -1, 33, 34, 35, 36, -1, -1, 39, -1,
|
|
41, 82, 83, 41, -1, -1, 44, -1, 49, 50,
|
|
-1, 49, 50, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, -1, 63, 64, 65, 66, 67,
|
|
68, 69, 70, 71, 72, 73, -1, -1, 38, -1,
|
|
-1, 82, 83, 43, 82, 83, -1, -1, 48, -1,
|
|
-1, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 74, 75, 76, 77, 78, 79,
|
|
80, 81, 38, -1, -1, -1, -1, 43, -1, -1,
|
|
-1, -1, 48, -1, -1, 51, 52, 53, 54, 55,
|
|
56, 57, 58, 59, 60, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, -1, -1, -1, -1, 74, 75,
|
|
76, 77, 78, 79, 80, 81, 38, -1, -1, -1,
|
|
-1, 43, -1, -1, -1, -1, 48, -1, -1, 51,
|
|
52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, 74, 75, 76, 77, 78, 79, 80, 81,
|
|
38, -1, -1, -1, -1, 43, -1, -1, -1, -1,
|
|
48, -1, -1, 51, 52, 53, 54, 55, 56, 57,
|
|
58, 59, 60, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 38, -1, 74, 75, 76, 77,
|
|
78, 79, 80, 81, 48, -1, -1, 51, 52, 53,
|
|
54, 55, 56, 57, 58, 59, 60, -1, -1, -1,
|
|
-1, -1, -1, -1, -1, -1, -1, -1, 38, -1,
|
|
74, 75, 76, 77, 78, 79, 80, 81, 48, -1,
|
|
-1, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, 38, -1, 74, 75, 76, 77, 78, 79,
|
|
80, 81, 48, -1, -1, 51, 52, 53, 54, 55,
|
|
56, 57, 58, 59, 60, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, -1, -1, 38, -1, 74, 75,
|
|
76, 77, 78, 79, 80, 81, 48, -1, -1, 51,
|
|
52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
38, -1, 74, 75, 76, 77, 78, 79, 80, 81,
|
|
48, -1, -1, 51, 52, 53, 54, 55, 56, 57,
|
|
58, 59, 60, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 38, -1, 74, 75, 76, 77,
|
|
78, 79, 80, 81, 48, -1, -1, 51, 52, 53,
|
|
54, 55, 56, 57, 58, 59, 60, -1, -1, -1,
|
|
-1, -1, -1, -1, -1, -1, -1, -1, 38, -1,
|
|
74, 75, 76, 77, 78, 79, 80, 81, 48, -1,
|
|
-1, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 74, 75, 76, 77, 78, 79,
|
|
80, 81, 42, -1, -1, -1, -1, -1, 48, -1,
|
|
-1, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 74, 75, 76, 77, 78, 79,
|
|
80, 81, 42, -1, -1, -1, -1, -1, 48, -1,
|
|
-1, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 74, 75, 76, 77, 78, 79,
|
|
80, 81, 42, -1, -1, -1, -1, -1, 48, -1,
|
|
-1, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 74, 75, 76, 77, 78, 79,
|
|
80, 81, 43, -1, -1, -1, -1, 48, -1, -1,
|
|
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, 74, 75, 76, 77, 78, 79, 80,
|
|
81, 46, -1, 48, -1, -1, 51, 52, 53, 54,
|
|
55, 56, 57, 58, 59, 60, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, 74,
|
|
75, 76, 77, 78, 79, 80, 81, 47, 48, -1,
|
|
-1, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, 74, 75, 76, 77, 78, 79,
|
|
80, 81, 47, 48, -1, -1, 51, 52, 53, 54,
|
|
55, 56, 57, 58, 59, 60, 48, -1, -1, 51,
|
|
52, 53, 54, 55, 56, 57, 58, 59, 60, 74,
|
|
75, 76, 77, 78, 79, 80, 81, -1, -1, -1,
|
|
-1, -1, 74, 75, 76, 77, 78, 79, 80, 81,
|
|
51, 52, -1, 54, 55, 56, 57, 58, 59, 60,
|
|
51, 52, -1, -1, 55, 56, 57, 58, 59, 60,
|
|
-1, -1, -1, 74, 75, 76, 77, 78, 79, 80,
|
|
81, -1, -1, -1, 75, 76, 77, 78, 79, 80,
|
|
81, 51, 52, -1, -1, 55, 56, 57, 58, 59,
|
|
60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
-1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
|
|
80, 81
|
|
};
|
|
|
|
const unsigned char
|
|
parser::yystos_[] =
|
|
{
|
|
0, 3, 4, 83, 102, 103, 104, 105, 106, 107,
|
|
108, 166, 82, 167, 37, 0, 104, 105, 37, 63,
|
|
47, 84, 169, 109, 166, 5, 25, 26, 27, 28,
|
|
29, 30, 31, 33, 34, 35, 36, 37, 41, 45,
|
|
61, 62, 78, 81, 85, 86, 87, 88, 89, 90,
|
|
91, 135, 137, 138, 139, 140, 141, 142, 143, 144,
|
|
145, 149, 150, 151, 152, 153, 154, 155, 156, 157,
|
|
158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
|
|
168, 169, 170, 171, 172, 173, 38, 38, 43, 41,
|
|
144, 145, 166, 167, 144, 145, 41, 135, 41, 42,
|
|
135, 146, 147, 148, 166, 135, 135, 87, 88, 83,
|
|
47, 48, 51, 52, 53, 54, 55, 56, 57, 58,
|
|
59, 60, 74, 75, 76, 77, 78, 79, 80, 81,
|
|
25, 26, 41, 44, 144, 145, 37, 45, 47, 39,
|
|
111, 166, 41, 45, 41, 38, 43, 135, 43, 42,
|
|
135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
|
|
135, 135, 135, 135, 135, 135, 135, 135, 135, 144,
|
|
145, 144, 145, 135, 32, 166, 146, 147, 166, 8,
|
|
11, 12, 13, 15, 16, 17, 19, 20, 21, 22,
|
|
23, 24, 40, 49, 50, 110, 111, 112, 113, 114,
|
|
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
|
|
125, 126, 127, 128, 129, 130, 131, 132, 136, 141,
|
|
142, 151, 152, 154, 160, 161, 162, 163, 166, 135,
|
|
166, 135, 135, 42, 135, 46, 42, 38, 37, 135,
|
|
47, 37, 47, 37, 37, 37, 37, 37, 78, 156,
|
|
169, 46, 47, 47, 47, 135, 141, 154, 154, 40,
|
|
110, 47, 47, 47, 6, 7, 9, 10, 44, 49,
|
|
50, 63, 64, 65, 66, 67, 68, 69, 70, 71,
|
|
72, 73, 42, 43, 42, 135, 146, 47, 38, 135,
|
|
135, 133, 136, 154, 166, 135, 46, 46, 47, 37,
|
|
37, 37, 37, 135, 135, 135, 135, 135, 135, 135,
|
|
135, 135, 135, 135, 42, 135, 37, 38, 47, 38,
|
|
38, 47, 18, 43, 38, 135, 135, 135, 135, 37,
|
|
38, 146, 110, 110, 134, 135, 135, 166, 111, 38,
|
|
38, 43, 38, 43, 38, 43, 146, 38, 14, 47,
|
|
38, 18, 47, 47, 146, 47, 146, 47, 146, 38,
|
|
110, 133, 110, 135, 38, 38, 38, 38, 38, 47,
|
|
47, 47, 110, 110
|
|
};
|
|
|
|
const unsigned char
|
|
parser::yyr1_[] =
|
|
{
|
|
0, 101, 102, 102, 103, 103, 103, 103, 104, 105,
|
|
105, 105, 106, 107, 108, 109, 109, 109, 110, 110,
|
|
110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
|
|
110, 110, 110, 110, 110, 110, 110, 110, 110, 111,
|
|
111, 112, 112, 113, 113, 114, 115, 116, 116, 117,
|
|
118, 118, 119, 119, 120, 121, 121, 122, 123, 124,
|
|
125, 126, 126, 127, 128, 128, 129, 130, 131, 132,
|
|
132, 133, 133, 134, 134, 135, 135, 135, 135, 136,
|
|
136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
|
|
136, 136, 136, 136, 137, 137, 137, 137, 137, 137,
|
|
137, 137, 138, 139, 139, 139, 139, 139, 139, 139,
|
|
139, 139, 139, 140, 140, 140, 140, 140, 140, 140,
|
|
140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
|
|
140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
|
|
140, 140, 141, 141, 141, 141, 142, 142, 142, 142,
|
|
143, 143, 143, 143, 144, 144, 145, 145, 146, 146,
|
|
147, 147, 148, 149, 149, 150, 151, 152, 153, 154,
|
|
154, 154, 154, 154, 154, 154, 154, 155, 155, 156,
|
|
156, 156, 156, 156, 157, 158, 159, 160, 161, 162,
|
|
163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
|
|
173
|
|
};
|
|
|
|
const signed char
|
|
parser::yyr2_[] =
|
|
{
|
|
0, 2, 1, 0, 2, 2, 1, 1, 3, 1,
|
|
1, 1, 5, 4, 5, 3, 1, 0, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
|
|
2, 2, 1, 2, 2, 2, 6, 8, 6, 3,
|
|
8, 6, 8, 6, 2, 2, 4, 5, 7, 5,
|
|
9, 7, 9, 5, 3, 3, 2, 2, 2, 3,
|
|
2, 1, 0, 1, 0, 1, 1, 1, 1, 2,
|
|
2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 3, 5, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 3, 3, 3, 2, 2, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 2, 2, 2, 2, 3, 3,
|
|
2, 2, 3, 3, 4, 6, 8, 9, 1, 1,
|
|
3, 1, 0, 2, 3, 3, 4, 3, 3, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
|
|
1, 1, 1, 1, 1, 2, 1, 1, 1, 1,
|
|
1, 2, 1, 1, 1, 1, 1, 1, 7, 1,
|
|
1
|
|
};
|
|
|
|
|
|
|
|
|
|
#if S4DEBUG
|
|
const short
|
|
parser::yyrline_[] =
|
|
{
|
|
0, 240, 240, 241, 245, 247, 249, 251, 256, 261,
|
|
262, 263, 267, 272, 277, 282, 284, 287, 291, 292,
|
|
293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
|
|
303, 304, 305, 306, 307, 308, 309, 310, 311, 315,
|
|
316, 320, 322, 327, 329, 334, 339, 344, 346, 351,
|
|
356, 358, 363, 365, 370, 375, 377, 382, 387, 392,
|
|
397, 402, 404, 409, 414, 416, 421, 426, 431, 436,
|
|
438, 443, 444, 448, 449, 453, 454, 455, 456, 460,
|
|
461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
|
|
471, 472, 473, 474, 478, 479, 480, 481, 482, 483,
|
|
484, 485, 489, 493, 494, 495, 496, 497, 498, 499,
|
|
500, 501, 502, 506, 507, 508, 509, 510, 511, 512,
|
|
513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
|
|
523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
|
|
533, 534, 538, 539, 540, 541, 545, 546, 547, 548,
|
|
552, 553, 554, 555, 559, 561, 566, 568, 573, 574,
|
|
578, 580, 586, 590, 592, 597, 602, 607, 612, 617,
|
|
618, 619, 620, 621, 622, 623, 624, 628, 629, 633,
|
|
634, 635, 636, 637, 640, 641, 642, 643, 644, 645,
|
|
646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
|
|
656
|
|
};
|
|
|
|
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 // S4DEBUG
|
|
|
|
|
|
#line 13 "parser.ypp"
|
|
} } } // xsk::gsc::s4
|
|
#line 4109 "parser.cpp"
|
|
|
|
#line 658 "parser.ypp"
|
|
|
|
|
|
void xsk::gsc::s4::parser::error(const xsk::gsc::location& loc, const std::string& msg)
|
|
{
|
|
throw xsk::gsc::comp_error(loc, msg);
|
|
}
|