// A Bison parser, made by GNU Bison 3.7.5. // Skeleton interface 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 . // 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. /** ** \file parser.hpp ** Define the xsk::gsc::s4::parser class. */ // C++ LALR(1) parser skeleton written by Akim Demaille. // 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. #ifndef YY_S4_PARSER_HPP_INCLUDED # define YY_S4_PARSER_HPP_INCLUDED // "%code requires" blocks. #line 33 "parser.ypp" #include "s4.hpp" typedef void *yyscan_t; #define YY_DECL xsk::gsc::s4::parser::symbol_type S4lex(yyscan_t yyscanner, xsk::gsc::context* ctx) #line 55 "parser.hpp" # include # include // std::abort # include # include # include # include #if defined __cplusplus # define YY_CPLUSPLUS __cplusplus #else # define YY_CPLUSPLUS 199711L #endif // Support move semantics when possible. #if 201103L <= YY_CPLUSPLUS # define YY_MOVE std::move # define YY_MOVE_OR_COPY move # define YY_MOVE_REF(Type) Type&& # define YY_RVREF(Type) Type&& # define YY_COPY(Type) Type #else # define YY_MOVE # define YY_MOVE_OR_COPY copy # define YY_MOVE_REF(Type) Type& # define YY_RVREF(Type) const Type& # define YY_COPY(Type) const Type& #endif // Support noexcept when possible. #if 201103L <= YY_CPLUSPLUS # define YY_NOEXCEPT noexcept # define YY_NOTHROW #else # define YY_NOEXCEPT # define YY_NOTHROW throw () #endif // Support constexpr when possible. #if 201703 <= YY_CPLUSPLUS # define YY_CONSTEXPR constexpr #else # define YY_CONSTEXPR #endif #include #ifndef S4_ASSERT # include # define S4_ASSERT assert #endif #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define YY_ATTRIBUTE_PURE # endif #endif #ifndef YY_ATTRIBUTE_UNUSED # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else # define YY_ATTRIBUTE_UNUSED # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YY_USE(E) ((void) (E)) #else # define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ # define YY_IGNORE_USELESS_CAST_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") # define YY_IGNORE_USELESS_CAST_END \ _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_END #endif # ifndef YY_CAST # ifdef __cplusplus # define YY_CAST(Type, Val) static_cast (Val) # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) # else # define YY_CAST(Type, Val) ((Type) (Val)) # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) # endif # endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # else # define YY_NULLPTR ((void*)0) # endif # endif /* Debug traces. */ #ifndef S4DEBUG # if defined YYDEBUG #if YYDEBUG # define S4DEBUG 1 # else # define S4DEBUG 0 # endif # else /* ! defined YYDEBUG */ # define S4DEBUG 1 # endif /* ! defined YYDEBUG */ #endif /* ! defined S4DEBUG */ #line 13 "parser.ypp" namespace xsk { namespace gsc { namespace s4 { #line 198 "parser.hpp" /// A Bison parser. class parser { public: #ifndef S4STYPE /// A buffer to store and retrieve objects. /// /// Sort of a variant, but does not keep track of the nature /// of the stored data, since that knowledge is available /// via the current parser state. class semantic_type { public: /// Type of *this. typedef semantic_type self_type; /// Empty construction. semantic_type () YY_NOEXCEPT : yybuffer_ () , yytypeid_ (YY_NULLPTR) {} /// Construct and fill. template semantic_type (YY_RVREF (T) t) : yytypeid_ (&typeid (T)) { S4_ASSERT (sizeof (T) <= size); new (yyas_ ()) T (YY_MOVE (t)); } #if 201103L <= YY_CPLUSPLUS /// Non copyable. semantic_type (const self_type&) = delete; /// Non copyable. self_type& operator= (const self_type&) = delete; #endif /// Destruction, allowed only if empty. ~semantic_type () YY_NOEXCEPT { S4_ASSERT (!yytypeid_); } # if 201103L <= YY_CPLUSPLUS /// Instantiate a \a T in here from \a t. template T& emplace (U&&... u) { S4_ASSERT (!yytypeid_); S4_ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (std::forward (u)...); } # else /// Instantiate an empty \a T in here. template T& emplace () { S4_ASSERT (!yytypeid_); S4_ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (); } /// Instantiate a \a T in here from \a t. template T& emplace (const T& t) { S4_ASSERT (!yytypeid_); S4_ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (t); } # endif /// Instantiate an empty \a T in here. /// Obsolete, use emplace. template T& build () { return emplace (); } /// Instantiate a \a T in here from \a t. /// Obsolete, use emplace. template T& build (const T& t) { return emplace (t); } /// Accessor to a built \a T. template T& as () YY_NOEXCEPT { S4_ASSERT (yytypeid_); S4_ASSERT (*yytypeid_ == typeid (T)); S4_ASSERT (sizeof (T) <= size); return *yyas_ (); } /// Const accessor to a built \a T (for %printer). template const T& as () const YY_NOEXCEPT { S4_ASSERT (yytypeid_); S4_ASSERT (*yytypeid_ == typeid (T)); S4_ASSERT (sizeof (T) <= size); return *yyas_ (); } /// Swap the content with \a that, of same type. /// /// Both variants must be built beforehand, because swapping the actual /// data requires reading it (with as()), and this is not possible on /// unconstructed variants: it would require some dynamic testing, which /// should not be the variant's responsibility. /// Swapping between built and (possibly) non-built is done with /// self_type::move (). template void swap (self_type& that) YY_NOEXCEPT { S4_ASSERT (yytypeid_); S4_ASSERT (*yytypeid_ == *that.yytypeid_); std::swap (as (), that.as ()); } /// Move the content of \a that to this. /// /// Destroys \a that. template void move (self_type& that) { # if 201103L <= YY_CPLUSPLUS emplace (std::move (that.as ())); # else emplace (); swap (that); # endif that.destroy (); } # if 201103L <= YY_CPLUSPLUS /// Move the content of \a that to this. template void move (self_type&& that) { emplace (std::move (that.as ())); that.destroy (); } #endif /// Copy the content of \a that to this. template void copy (const self_type& that) { emplace (that.as ()); } /// Destroy the stored \a T. template void destroy () { as ().~T (); yytypeid_ = YY_NULLPTR; } private: #if YY_CPLUSPLUS < 201103L /// Non copyable. semantic_type (const self_type&); /// Non copyable. self_type& operator= (const self_type&); #endif /// Accessor to raw memory as \a T. template T* yyas_ () YY_NOEXCEPT { void *yyp = yybuffer_.yyraw; return static_cast (yyp); } /// Const accessor to raw memory as \a T. template const T* yyas_ () const YY_NOEXCEPT { const void *yyp = yybuffer_.yyraw; return static_cast (yyp); } /// An auxiliary type to compute the largest semantic type. union union_type { // expr_function // expr_pointer char dummy1[sizeof (ast::call)]; // declaration char dummy2[sizeof (ast::decl)]; // decl_constant char dummy3[sizeof (ast::decl_constant::ptr)]; // decl_thread char dummy4[sizeof (ast::decl_thread::ptr)]; // decl_usingtree char dummy5[sizeof (ast::decl_usingtree::ptr)]; // expr // expr_or_empty // expr_assign // expr_increment // expr_decrement // expr_ternary // expr_binary // expr_primitive // expr_object char dummy6[sizeof (ast::expr)]; // expr_add_array char dummy7[sizeof (ast::expr_add_array::ptr)]; // expr_anim char dummy8[sizeof (ast::expr_anim::ptr)]; // expr_animation char dummy9[sizeof (ast::expr_animation::ptr)]; // expr_animtree char dummy10[sizeof (ast::expr_animtree::ptr)]; // expr_arguments // expr_arguments_no_empty char dummy11[sizeof (ast::expr_arguments::ptr)]; // expr_array char dummy12[sizeof (ast::expr_array::ptr)]; // expr_call char dummy13[sizeof (ast::expr_call::ptr)]; // expr_color char dummy14[sizeof (ast::expr_color::ptr)]; // expr_complement char dummy15[sizeof (ast::expr_complement::ptr)]; // expr_empty_array char dummy16[sizeof (ast::expr_empty_array::ptr)]; // expr_false char dummy17[sizeof (ast::expr_false::ptr)]; // expr_field char dummy18[sizeof (ast::expr_field::ptr)]; // expr_float char dummy19[sizeof (ast::expr_float::ptr)]; // expr_game char dummy20[sizeof (ast::expr_game::ptr)]; // expr_identifier char dummy21[sizeof (ast::expr_identifier::ptr)]; // expr_integer char dummy22[sizeof (ast::expr_integer::ptr)]; // expr_isdefined char dummy23[sizeof (ast::expr_isdefined::ptr)]; // expr_istring char dummy24[sizeof (ast::expr_istring::ptr)]; // expr_istrue char dummy25[sizeof (ast::expr_istrue::ptr)]; // expr_level char dummy26[sizeof (ast::expr_level::ptr)]; // expr_method char dummy27[sizeof (ast::expr_method::ptr)]; // expr_not char dummy28[sizeof (ast::expr_not::ptr)]; // expr_parameters char dummy29[sizeof (ast::expr_parameters::ptr)]; // expr_paren char dummy30[sizeof (ast::expr_paren::ptr)]; // expr_path char dummy31[sizeof (ast::expr_path::ptr)]; // expr_reference char dummy32[sizeof (ast::expr_reference::ptr)]; // expr_self char dummy33[sizeof (ast::expr_self::ptr)]; // expr_size char dummy34[sizeof (ast::expr_size::ptr)]; // expr_string char dummy35[sizeof (ast::expr_string::ptr)]; // expr_thisthread char dummy36[sizeof (ast::expr_thisthread::ptr)]; // expr_true char dummy37[sizeof (ast::expr_true::ptr)]; // expr_undefined char dummy38[sizeof (ast::expr_undefined::ptr)]; // expr_vector char dummy39[sizeof (ast::expr_vector::ptr)]; // include char dummy40[sizeof (ast::include::ptr)]; // program char dummy41[sizeof (ast::program::ptr)]; // stmt char dummy42[sizeof (ast::stmt)]; // stmt_assign char dummy43[sizeof (ast::stmt_assign::ptr)]; // stmt_break char dummy44[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint char dummy45[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call char dummy46[sizeof (ast::stmt_call::ptr)]; // stmt_case char dummy47[sizeof (ast::stmt_case::ptr)]; // stmt_continue char dummy48[sizeof (ast::stmt_continue::ptr)]; // stmt_default char dummy49[sizeof (ast::stmt_default::ptr)]; // stmt_dowhile char dummy50[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon char dummy51[sizeof (ast::stmt_endon::ptr)]; // stmt_expr char dummy52[sizeof (ast::stmt_expr::ptr)]; // stmt_for char dummy53[sizeof (ast::stmt_for::ptr)]; // stmt_foreach char dummy54[sizeof (ast::stmt_foreach::ptr)]; // stmt_if char dummy55[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse char dummy56[sizeof (ast::stmt_ifelse::ptr)]; // stmt_dev // stmt_block // stmt_list char dummy57[sizeof (ast::stmt_list::ptr)]; // stmt_notify char dummy58[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin char dummy59[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end char dummy60[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return char dummy61[sizeof (ast::stmt_return::ptr)]; // stmt_switch char dummy62[sizeof (ast::stmt_switch::ptr)]; // stmt_wait char dummy63[sizeof (ast::stmt_wait::ptr)]; // stmt_waitframe char dummy64[sizeof (ast::stmt_waitframe::ptr)]; // stmt_waittill char dummy65[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend char dummy66[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch char dummy67[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while char dummy68[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" // "string literal" // "localized string" // "color" // "float" // "integer" char dummy69[sizeof (std::string)]; }; /// The size of the largest semantic type. enum { size = sizeof (union_type) }; /// A buffer to store semantic values. union { /// Strongest alignment constraints. long double yyalign_me; /// A buffer large enough to store any of the semantic values. char yyraw[size]; } yybuffer_; /// Whether the content is built: if defined, the name of the stored type. const std::type_info *yytypeid_; }; #else typedef S4STYPE semantic_type; #endif /// Symbol locations. typedef xsk::gsc::location location_type; /// Syntax errors thrown from user actions. struct syntax_error : std::runtime_error { syntax_error (const location_type& l, const std::string& m) : std::runtime_error (m) , location (l) {} syntax_error (const syntax_error& s) : std::runtime_error (s.what ()) , location (s.location) {} ~syntax_error () YY_NOEXCEPT YY_NOTHROW; location_type location; }; /// Token kinds. struct token { enum token_kind_type { S4EMPTY = -2, S4EOF = 0, // "end of file" S4error = 1, // error S4UNDEF = 2, // "invalid token" DEVBEGIN = 3, // "/#" DEVEND = 4, // "#/" INLINE = 5, // "#inline" INCLUDE = 6, // "#include" USINGTREE = 7, // "#using_animtree" ANIMTREE = 8, // "#animtree" ENDON = 9, // "endon" NOTIFY = 10, // "notify" WAIT = 11, // "wait" WAITTILL = 12, // "waittill" WAITTILLMATCH = 13, // "waittillmatch" WAITTILLFRAMEEND = 14, // "waittillframeend" WAITFRAME = 15, // "waitframe" IF = 16, // "if" ELSE = 17, // "else" DO = 18, // "do" WHILE = 19, // "while" FOR = 20, // "for" FOREACH = 21, // "foreach" IN = 22, // "in" SWITCH = 23, // "switch" CASE = 24, // "case" DEFAULT = 25, // "default" BREAK = 26, // "break" CONTINUE = 27, // "continue" RETURN = 28, // "return" BREAKPOINT = 29, // "breakpoint" PROFBEGIN = 30, // "prof_begin" PROFEND = 31, // "prof_end" THREAD = 32, // "thread" CHILDTHREAD = 33, // "childthread" THISTHREAD = 34, // "thisthread" CALL = 35, // "call" TRUE = 36, // "true" FALSE = 37, // "false" UNDEFINED = 38, // "undefined" SIZE = 39, // ".size" GAME = 40, // "game" SELF = 41, // "self" ANIM = 42, // "anim" LEVEL = 43, // "level" ISDEFINED = 44, // "isdefined" ISTRUE = 45, // "istrue" LPAREN = 46, // "(" RPAREN = 47, // ")" LBRACE = 48, // "{" RBRACE = 49, // "}" LBRACKET = 50, // "[" RBRACKET = 51, // "]" COMMA = 52, // "," DOT = 53, // "." DOUBLECOLON = 54, // "::" COLON = 55, // ":" SEMICOLON = 56, // ";" QMARK = 57, // "?" INCREMENT = 58, // "++" DECREMENT = 59, // "--" LSHIFT = 60, // "<<" RSHIFT = 61, // ">>" OR = 62, // "||" AND = 63, // "&&" EQUALITY = 64, // "==" INEQUALITY = 65, // "!=" LESS_EQUAL = 66, // "<=" GREATER_EQUAL = 67, // ">=" LESS = 68, // "<" GREATER = 69, // ">" NOT = 70, // "!" COMPLEMENT = 71, // "~" ASSIGN = 72, // "=" ASSIGN_ADD = 73, // "+=" ASSIGN_SUB = 74, // "-=" ASSIGN_MUL = 75, // "*=" ASSIGN_DIV = 76, // "/=" ASSIGN_MOD = 77, // "%=" ASSIGN_BW_OR = 78, // "|=" ASSIGN_BW_AND = 79, // "&=" ASSIGN_BW_EXOR = 80, // "^=" ASSIGN_RSHIFT = 81, // ">>=" ASSIGN_LSHIFT = 82, // "<<=" BITWISE_OR = 83, // "|" BITWISE_AND = 84, // "&" BITWISE_EXOR = 85, // "^" ADD = 86, // "+" SUB = 87, // "-" MUL = 88, // "*" DIV = 89, // "/" MOD = 90, // "%" PATH = 91, // "path" IDENTIFIER = 92, // "identifier" STRING = 93, // "string literal" ISTRING = 94, // "localized string" COLOR = 95, // "color" FLOAT = 96, // "float" INTEGER = 97, // "integer" ADD_ARRAY = 98, // ADD_ARRAY THEN = 99, // THEN TERN = 100, // TERN NEG = 101, // NEG ANIMREF = 102, // ANIMREF PREINC = 103, // PREINC PREDEC = 104, // PREDEC POSTINC = 105, // POSTINC POSTDEC = 106 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; }; /// Token kind, as returned by yylex. typedef token::yytokentype token_kind_type; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type token_type; /// Symbol kinds. struct symbol_kind { enum symbol_kind_type { YYNTOKENS = 107, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" S_DEVBEGIN = 3, // "/#" S_DEVEND = 4, // "#/" S_INLINE = 5, // "#inline" S_INCLUDE = 6, // "#include" S_USINGTREE = 7, // "#using_animtree" S_ANIMTREE = 8, // "#animtree" S_ENDON = 9, // "endon" S_NOTIFY = 10, // "notify" S_WAIT = 11, // "wait" S_WAITTILL = 12, // "waittill" S_WAITTILLMATCH = 13, // "waittillmatch" S_WAITTILLFRAMEEND = 14, // "waittillframeend" S_WAITFRAME = 15, // "waitframe" S_IF = 16, // "if" S_ELSE = 17, // "else" S_DO = 18, // "do" S_WHILE = 19, // "while" S_FOR = 20, // "for" S_FOREACH = 21, // "foreach" S_IN = 22, // "in" S_SWITCH = 23, // "switch" S_CASE = 24, // "case" S_DEFAULT = 25, // "default" S_BREAK = 26, // "break" S_CONTINUE = 27, // "continue" S_RETURN = 28, // "return" S_BREAKPOINT = 29, // "breakpoint" S_PROFBEGIN = 30, // "prof_begin" S_PROFEND = 31, // "prof_end" S_THREAD = 32, // "thread" S_CHILDTHREAD = 33, // "childthread" S_THISTHREAD = 34, // "thisthread" S_CALL = 35, // "call" S_TRUE = 36, // "true" S_FALSE = 37, // "false" S_UNDEFINED = 38, // "undefined" S_SIZE = 39, // ".size" S_GAME = 40, // "game" S_SELF = 41, // "self" S_ANIM = 42, // "anim" S_LEVEL = 43, // "level" S_ISDEFINED = 44, // "isdefined" S_ISTRUE = 45, // "istrue" S_LPAREN = 46, // "(" S_RPAREN = 47, // ")" S_LBRACE = 48, // "{" S_RBRACE = 49, // "}" S_LBRACKET = 50, // "[" S_RBRACKET = 51, // "]" S_COMMA = 52, // "," S_DOT = 53, // "." S_DOUBLECOLON = 54, // "::" S_COLON = 55, // ":" S_SEMICOLON = 56, // ";" S_QMARK = 57, // "?" S_INCREMENT = 58, // "++" S_DECREMENT = 59, // "--" S_LSHIFT = 60, // "<<" S_RSHIFT = 61, // ">>" S_OR = 62, // "||" S_AND = 63, // "&&" S_EQUALITY = 64, // "==" S_INEQUALITY = 65, // "!=" S_LESS_EQUAL = 66, // "<=" S_GREATER_EQUAL = 67, // ">=" S_LESS = 68, // "<" S_GREATER = 69, // ">" S_NOT = 70, // "!" S_COMPLEMENT = 71, // "~" S_ASSIGN = 72, // "=" S_ASSIGN_ADD = 73, // "+=" S_ASSIGN_SUB = 74, // "-=" S_ASSIGN_MUL = 75, // "*=" S_ASSIGN_DIV = 76, // "/=" S_ASSIGN_MOD = 77, // "%=" S_ASSIGN_BW_OR = 78, // "|=" S_ASSIGN_BW_AND = 79, // "&=" S_ASSIGN_BW_EXOR = 80, // "^=" S_ASSIGN_RSHIFT = 81, // ">>=" S_ASSIGN_LSHIFT = 82, // "<<=" S_BITWISE_OR = 83, // "|" S_BITWISE_AND = 84, // "&" S_BITWISE_EXOR = 85, // "^" S_ADD = 86, // "+" S_SUB = 87, // "-" S_MUL = 88, // "*" S_DIV = 89, // "/" S_MOD = 90, // "%" S_PATH = 91, // "path" S_IDENTIFIER = 92, // "identifier" S_STRING = 93, // "string literal" S_ISTRING = 94, // "localized string" S_COLOR = 95, // "color" S_FLOAT = 96, // "float" S_INTEGER = 97, // "integer" S_ADD_ARRAY = 98, // ADD_ARRAY S_THEN = 99, // THEN S_TERN = 100, // TERN S_NEG = 101, // NEG S_ANIMREF = 102, // ANIMREF S_PREINC = 103, // PREINC S_PREDEC = 104, // PREDEC S_POSTINC = 105, // POSTINC S_POSTDEC = 106, // POSTDEC S_YYACCEPT = 107, // $accept S_root = 108, // root S_program = 109, // program S_inline = 110, // inline S_include = 111, // include S_declaration = 112, // declaration S_decl_usingtree = 113, // decl_usingtree S_decl_constant = 114, // decl_constant S_decl_thread = 115, // decl_thread S_stmt = 116, // stmt S_stmt_dev = 117, // stmt_dev S_stmt_block = 118, // stmt_block S_stmt_list = 119, // stmt_list S_stmt_expr = 120, // stmt_expr S_stmt_call = 121, // stmt_call S_stmt_assign = 122, // stmt_assign S_stmt_endon = 123, // stmt_endon S_stmt_notify = 124, // stmt_notify S_stmt_wait = 125, // stmt_wait S_stmt_waittill = 126, // stmt_waittill S_stmt_waittillmatch = 127, // stmt_waittillmatch S_stmt_waittillframeend = 128, // stmt_waittillframeend S_stmt_waitframe = 129, // stmt_waitframe S_stmt_if = 130, // stmt_if S_stmt_ifelse = 131, // stmt_ifelse S_stmt_while = 132, // stmt_while S_stmt_dowhile = 133, // stmt_dowhile S_stmt_for = 134, // stmt_for S_stmt_foreach = 135, // stmt_foreach S_stmt_switch = 136, // stmt_switch S_stmt_case = 137, // stmt_case S_stmt_default = 138, // stmt_default S_stmt_break = 139, // stmt_break S_stmt_continue = 140, // stmt_continue S_stmt_return = 141, // stmt_return S_stmt_breakpoint = 142, // stmt_breakpoint S_stmt_prof_begin = 143, // stmt_prof_begin S_stmt_prof_end = 144, // stmt_prof_end S_expr = 145, // expr S_expr_or_empty = 146, // expr_or_empty S_expr_assign = 147, // expr_assign S_expr_increment = 148, // expr_increment S_expr_decrement = 149, // expr_decrement S_expr_ternary = 150, // expr_ternary S_expr_binary = 151, // expr_binary S_expr_primitive = 152, // expr_primitive S_expr_complement = 153, // expr_complement S_expr_not = 154, // expr_not S_expr_call = 155, // expr_call S_expr_method = 156, // expr_method S_expr_function = 157, // expr_function S_expr_pointer = 158, // expr_pointer S_expr_add_array = 159, // expr_add_array S_expr_parameters = 160, // expr_parameters S_expr_arguments = 161, // expr_arguments S_expr_arguments_no_empty = 162, // expr_arguments_no_empty S_expr_isdefined = 163, // expr_isdefined S_expr_istrue = 164, // expr_istrue S_expr_reference = 165, // expr_reference S_expr_array = 166, // expr_array S_expr_field = 167, // expr_field S_expr_size = 168, // expr_size S_expr_paren = 169, // expr_paren S_expr_object = 170, // expr_object S_expr_thisthread = 171, // expr_thisthread S_expr_empty_array = 172, // expr_empty_array S_expr_undefined = 173, // expr_undefined S_expr_game = 174, // expr_game S_expr_self = 175, // expr_self S_expr_anim = 176, // expr_anim S_expr_level = 177, // expr_level S_expr_animation = 178, // expr_animation S_expr_animtree = 179, // expr_animtree S_expr_identifier = 180, // expr_identifier S_expr_path = 181, // expr_path S_expr_istring = 182, // expr_istring S_expr_string = 183, // expr_string S_expr_color = 184, // expr_color S_expr_vector = 185, // expr_vector S_expr_float = 186, // expr_float S_expr_integer = 187, // expr_integer S_expr_false = 188, // expr_false S_expr_true = 189 // expr_true }; }; /// (Internal) symbol kind. typedef symbol_kind::symbol_kind_type symbol_kind_type; /// The number of tokens. static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; /// A complete symbol. /// /// Expects its Base type to provide access to the symbol kind /// via kind (). /// /// Provide access to semantic value and location. template struct basic_symbol : Base { /// Alias to Base. typedef Base super_type; /// Default constructor. basic_symbol () : value () , location () {} #if 201103L <= YY_CPLUSPLUS /// Move constructor. basic_symbol (basic_symbol&& that) : Base (std::move (that)) , value () , location (std::move (that.location)) { switch (this->kind ()) { case symbol_kind::S_expr_function: // expr_function case symbol_kind::S_expr_pointer: // expr_pointer value.move< ast::call > (std::move (that.value)); break; case symbol_kind::S_declaration: // declaration value.move< ast::decl > (std::move (that.value)); break; case symbol_kind::S_decl_constant: // decl_constant value.move< ast::decl_constant::ptr > (std::move (that.value)); break; case symbol_kind::S_decl_thread: // decl_thread value.move< ast::decl_thread::ptr > (std::move (that.value)); break; case symbol_kind::S_decl_usingtree: // decl_usingtree value.move< ast::decl_usingtree::ptr > (std::move (that.value)); break; case symbol_kind::S_expr: // expr case symbol_kind::S_expr_or_empty: // expr_or_empty case symbol_kind::S_expr_assign: // expr_assign case symbol_kind::S_expr_increment: // expr_increment case symbol_kind::S_expr_decrement: // expr_decrement case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; case symbol_kind::S_expr_add_array: // expr_add_array value.move< ast::expr_add_array::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_anim: // expr_anim value.move< ast::expr_anim::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_animation: // expr_animation value.move< ast::expr_animation::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_animtree: // expr_animtree value.move< ast::expr_animtree::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_arguments: // expr_arguments case symbol_kind::S_expr_arguments_no_empty: // expr_arguments_no_empty value.move< ast::expr_arguments::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_array: // expr_array value.move< ast::expr_array::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_call: // expr_call value.move< ast::expr_call::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_color: // expr_color value.move< ast::expr_color::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_complement: // expr_complement value.move< ast::expr_complement::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_empty_array: // expr_empty_array value.move< ast::expr_empty_array::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_false: // expr_false value.move< ast::expr_false::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_field: // expr_field value.move< ast::expr_field::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_float: // expr_float value.move< ast::expr_float::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_game: // expr_game value.move< ast::expr_game::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_identifier: // expr_identifier value.move< ast::expr_identifier::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_integer: // expr_integer value.move< ast::expr_integer::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_isdefined: // expr_isdefined value.move< ast::expr_isdefined::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_istring: // expr_istring value.move< ast::expr_istring::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_istrue: // expr_istrue value.move< ast::expr_istrue::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_level: // expr_level value.move< ast::expr_level::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_method: // expr_method value.move< ast::expr_method::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_not: // expr_not value.move< ast::expr_not::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_parameters: // expr_parameters value.move< ast::expr_parameters::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_paren: // expr_paren value.move< ast::expr_paren::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_path: // expr_path value.move< ast::expr_path::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_reference: // expr_reference value.move< ast::expr_reference::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_self: // expr_self value.move< ast::expr_self::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_size: // expr_size value.move< ast::expr_size::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_string: // expr_string value.move< ast::expr_string::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_thisthread: // expr_thisthread value.move< ast::expr_thisthread::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_true: // expr_true value.move< ast::expr_true::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; case symbol_kind::S_expr_vector: // expr_vector value.move< ast::expr_vector::ptr > (std::move (that.value)); break; case symbol_kind::S_include: // include value.move< ast::include::ptr > (std::move (that.value)); break; case symbol_kind::S_program: // program value.move< ast::program::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt: // stmt value.move< ast::stmt > (std::move (that.value)); break; case symbol_kind::S_stmt_assign: // stmt_assign value.move< ast::stmt_assign::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_break: // stmt_break value.move< ast::stmt_break::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint value.move< ast::stmt_breakpoint::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_call: // stmt_call value.move< ast::stmt_call::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_case: // stmt_case value.move< ast::stmt_case::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_continue: // stmt_continue value.move< ast::stmt_continue::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_default: // stmt_default value.move< ast::stmt_default::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_dowhile: // stmt_dowhile value.move< ast::stmt_dowhile::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_endon: // stmt_endon value.move< ast::stmt_endon::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_expr: // stmt_expr value.move< ast::stmt_expr::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_for: // stmt_for value.move< ast::stmt_for::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_foreach: // stmt_foreach value.move< ast::stmt_foreach::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_if: // stmt_if value.move< ast::stmt_if::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_ifelse: // stmt_ifelse value.move< ast::stmt_ifelse::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_dev: // stmt_dev case symbol_kind::S_stmt_block: // stmt_block case symbol_kind::S_stmt_list: // stmt_list value.move< ast::stmt_list::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_notify: // stmt_notify value.move< ast::stmt_notify::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin value.move< ast::stmt_prof_begin::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_prof_end: // stmt_prof_end value.move< ast::stmt_prof_end::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_return: // stmt_return value.move< ast::stmt_return::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_switch: // stmt_switch value.move< ast::stmt_switch::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_wait: // stmt_wait value.move< ast::stmt_wait::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_waitframe: // stmt_waitframe value.move< ast::stmt_waitframe::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_waittill: // stmt_waittill value.move< ast::stmt_waittill::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_waittillframeend: // stmt_waittillframeend value.move< ast::stmt_waittillframeend::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_waittillmatch: // stmt_waittillmatch value.move< ast::stmt_waittillmatch::ptr > (std::move (that.value)); break; case symbol_kind::S_stmt_while: // stmt_while value.move< ast::stmt_while::ptr > (std::move (that.value)); break; case symbol_kind::S_PATH: // "path" case symbol_kind::S_IDENTIFIER: // "identifier" case symbol_kind::S_STRING: // "string literal" case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; default: break; } } #endif /// Copy constructor. basic_symbol (const basic_symbol& that); /// Constructors for typed symbols. #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const location_type& l) : Base (t) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::call&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::call& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::decl&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::decl& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::decl_constant::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::decl_constant::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::decl_thread::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::decl_thread::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::decl_usingtree::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::decl_usingtree::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_add_array::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_add_array::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_anim::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_anim::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_animation::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_animation::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_animtree::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_animtree::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_arguments::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_arguments::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_array::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_array::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_call::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_call::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_color::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_color::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_complement::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_complement::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_empty_array::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_empty_array::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_false::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_false::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_field::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_field::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_float::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_float::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_game::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_game::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_identifier::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_identifier::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_integer::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_integer::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_isdefined::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_isdefined::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_istring::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_istring::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_istrue::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_istrue::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_level::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_level::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_method::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_method::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_not::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_not::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_parameters::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_parameters::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_paren::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_paren::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_path::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_path::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_reference::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_reference::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_self::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_self::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_size::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_size::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_string::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_string::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_thisthread::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_thisthread::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_true::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_true::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_undefined::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_vector::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::expr_vector::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::include::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::include::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::program::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::program::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_assign::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_assign::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_break::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_break::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_breakpoint::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_breakpoint::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_call::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_call::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_case::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_case::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_continue::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_continue::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_default::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_default::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_dowhile::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_dowhile::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_endon::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_endon::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_expr::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_expr::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_for::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_for::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_foreach::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_foreach::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_if::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_if::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_ifelse::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_ifelse::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_list::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_list::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_notify::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_notify::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_prof_begin::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_prof_begin::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_prof_end::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_prof_end::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_return::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_return::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_switch::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_switch::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_wait::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_wait::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_waitframe::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_waitframe::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_waittill::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_waittill::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_waittillframeend::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_waittillframeend::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_waittillmatch::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_waittillmatch::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::stmt_while::ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const ast::stmt_while::ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif /// Destroy the symbol. ~basic_symbol () { clear (); } /// Destroy contents, and record that is empty. void clear () YY_NOEXCEPT { // User destructor. symbol_kind_type yykind = this->kind (); basic_symbol& yysym = *this; (void) yysym; switch (yykind) { default: break; } // Value type destructor. switch (yykind) { case symbol_kind::S_expr_function: // expr_function case symbol_kind::S_expr_pointer: // expr_pointer value.template destroy< ast::call > (); break; case symbol_kind::S_declaration: // declaration value.template destroy< ast::decl > (); break; case symbol_kind::S_decl_constant: // decl_constant value.template destroy< ast::decl_constant::ptr > (); break; case symbol_kind::S_decl_thread: // decl_thread value.template destroy< ast::decl_thread::ptr > (); break; case symbol_kind::S_decl_usingtree: // decl_usingtree value.template destroy< ast::decl_usingtree::ptr > (); break; case symbol_kind::S_expr: // expr case symbol_kind::S_expr_or_empty: // expr_or_empty case symbol_kind::S_expr_assign: // expr_assign case symbol_kind::S_expr_increment: // expr_increment case symbol_kind::S_expr_decrement: // expr_decrement case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; case symbol_kind::S_expr_add_array: // expr_add_array value.template destroy< ast::expr_add_array::ptr > (); break; case symbol_kind::S_expr_anim: // expr_anim value.template destroy< ast::expr_anim::ptr > (); break; case symbol_kind::S_expr_animation: // expr_animation value.template destroy< ast::expr_animation::ptr > (); break; case symbol_kind::S_expr_animtree: // expr_animtree value.template destroy< ast::expr_animtree::ptr > (); break; case symbol_kind::S_expr_arguments: // expr_arguments case symbol_kind::S_expr_arguments_no_empty: // expr_arguments_no_empty value.template destroy< ast::expr_arguments::ptr > (); break; case symbol_kind::S_expr_array: // expr_array value.template destroy< ast::expr_array::ptr > (); break; case symbol_kind::S_expr_call: // expr_call value.template destroy< ast::expr_call::ptr > (); break; case symbol_kind::S_expr_color: // expr_color value.template destroy< ast::expr_color::ptr > (); break; case symbol_kind::S_expr_complement: // expr_complement value.template destroy< ast::expr_complement::ptr > (); break; case symbol_kind::S_expr_empty_array: // expr_empty_array value.template destroy< ast::expr_empty_array::ptr > (); break; case symbol_kind::S_expr_false: // expr_false value.template destroy< ast::expr_false::ptr > (); break; case symbol_kind::S_expr_field: // expr_field value.template destroy< ast::expr_field::ptr > (); break; case symbol_kind::S_expr_float: // expr_float value.template destroy< ast::expr_float::ptr > (); break; case symbol_kind::S_expr_game: // expr_game value.template destroy< ast::expr_game::ptr > (); break; case symbol_kind::S_expr_identifier: // expr_identifier value.template destroy< ast::expr_identifier::ptr > (); break; case symbol_kind::S_expr_integer: // expr_integer value.template destroy< ast::expr_integer::ptr > (); break; case symbol_kind::S_expr_isdefined: // expr_isdefined value.template destroy< ast::expr_isdefined::ptr > (); break; case symbol_kind::S_expr_istring: // expr_istring value.template destroy< ast::expr_istring::ptr > (); break; case symbol_kind::S_expr_istrue: // expr_istrue value.template destroy< ast::expr_istrue::ptr > (); break; case symbol_kind::S_expr_level: // expr_level value.template destroy< ast::expr_level::ptr > (); break; case symbol_kind::S_expr_method: // expr_method value.template destroy< ast::expr_method::ptr > (); break; case symbol_kind::S_expr_not: // expr_not value.template destroy< ast::expr_not::ptr > (); break; case symbol_kind::S_expr_parameters: // expr_parameters value.template destroy< ast::expr_parameters::ptr > (); break; case symbol_kind::S_expr_paren: // expr_paren value.template destroy< ast::expr_paren::ptr > (); break; case symbol_kind::S_expr_path: // expr_path value.template destroy< ast::expr_path::ptr > (); break; case symbol_kind::S_expr_reference: // expr_reference value.template destroy< ast::expr_reference::ptr > (); break; case symbol_kind::S_expr_self: // expr_self value.template destroy< ast::expr_self::ptr > (); break; case symbol_kind::S_expr_size: // expr_size value.template destroy< ast::expr_size::ptr > (); break; case symbol_kind::S_expr_string: // expr_string value.template destroy< ast::expr_string::ptr > (); break; case symbol_kind::S_expr_thisthread: // expr_thisthread value.template destroy< ast::expr_thisthread::ptr > (); break; case symbol_kind::S_expr_true: // expr_true value.template destroy< ast::expr_true::ptr > (); break; case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; case symbol_kind::S_expr_vector: // expr_vector value.template destroy< ast::expr_vector::ptr > (); break; case symbol_kind::S_include: // include value.template destroy< ast::include::ptr > (); break; case symbol_kind::S_program: // program value.template destroy< ast::program::ptr > (); break; case symbol_kind::S_stmt: // stmt value.template destroy< ast::stmt > (); break; case symbol_kind::S_stmt_assign: // stmt_assign value.template destroy< ast::stmt_assign::ptr > (); break; case symbol_kind::S_stmt_break: // stmt_break value.template destroy< ast::stmt_break::ptr > (); break; case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint value.template destroy< ast::stmt_breakpoint::ptr > (); break; case symbol_kind::S_stmt_call: // stmt_call value.template destroy< ast::stmt_call::ptr > (); break; case symbol_kind::S_stmt_case: // stmt_case value.template destroy< ast::stmt_case::ptr > (); break; case symbol_kind::S_stmt_continue: // stmt_continue value.template destroy< ast::stmt_continue::ptr > (); break; case symbol_kind::S_stmt_default: // stmt_default value.template destroy< ast::stmt_default::ptr > (); break; case symbol_kind::S_stmt_dowhile: // stmt_dowhile value.template destroy< ast::stmt_dowhile::ptr > (); break; case symbol_kind::S_stmt_endon: // stmt_endon value.template destroy< ast::stmt_endon::ptr > (); break; case symbol_kind::S_stmt_expr: // stmt_expr value.template destroy< ast::stmt_expr::ptr > (); break; case symbol_kind::S_stmt_for: // stmt_for value.template destroy< ast::stmt_for::ptr > (); break; case symbol_kind::S_stmt_foreach: // stmt_foreach value.template destroy< ast::stmt_foreach::ptr > (); break; case symbol_kind::S_stmt_if: // stmt_if value.template destroy< ast::stmt_if::ptr > (); break; case symbol_kind::S_stmt_ifelse: // stmt_ifelse value.template destroy< ast::stmt_ifelse::ptr > (); break; case symbol_kind::S_stmt_dev: // stmt_dev case symbol_kind::S_stmt_block: // stmt_block case symbol_kind::S_stmt_list: // stmt_list value.template destroy< ast::stmt_list::ptr > (); break; case symbol_kind::S_stmt_notify: // stmt_notify value.template destroy< ast::stmt_notify::ptr > (); break; case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin value.template destroy< ast::stmt_prof_begin::ptr > (); break; case symbol_kind::S_stmt_prof_end: // stmt_prof_end value.template destroy< ast::stmt_prof_end::ptr > (); break; case symbol_kind::S_stmt_return: // stmt_return value.template destroy< ast::stmt_return::ptr > (); break; case symbol_kind::S_stmt_switch: // stmt_switch value.template destroy< ast::stmt_switch::ptr > (); break; case symbol_kind::S_stmt_wait: // stmt_wait value.template destroy< ast::stmt_wait::ptr > (); break; case symbol_kind::S_stmt_waitframe: // stmt_waitframe value.template destroy< ast::stmt_waitframe::ptr > (); break; case symbol_kind::S_stmt_waittill: // stmt_waittill value.template destroy< ast::stmt_waittill::ptr > (); break; case symbol_kind::S_stmt_waittillframeend: // stmt_waittillframeend value.template destroy< ast::stmt_waittillframeend::ptr > (); break; case symbol_kind::S_stmt_waittillmatch: // stmt_waittillmatch value.template destroy< ast::stmt_waittillmatch::ptr > (); break; case symbol_kind::S_stmt_while: // stmt_while value.template destroy< ast::stmt_while::ptr > (); break; case symbol_kind::S_PATH: // "path" case symbol_kind::S_IDENTIFIER: // "identifier" case symbol_kind::S_STRING: // "string literal" case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; default: break; } Base::clear (); } /// The user-facing name of this symbol. const char *name () const YY_NOEXCEPT { return parser::symbol_name (this->kind ()); } /// Backward compatibility (Bison 3.6). symbol_kind_type type_get () const YY_NOEXCEPT; /// Whether empty. bool empty () const YY_NOEXCEPT; /// Destructive move, \a s is emptied into this. void move (basic_symbol& s); /// The semantic value. semantic_type value; /// The location. location_type location; private: #if YY_CPLUSPLUS < 201103L /// Assignment operator. basic_symbol& operator= (const basic_symbol& that); #endif }; /// Type access provider for token (enum) based symbols. struct by_kind { /// Default constructor. by_kind (); #if 201103L <= YY_CPLUSPLUS /// Move constructor. by_kind (by_kind&& that); #endif /// Copy constructor. by_kind (const by_kind& that); /// The symbol kind as needed by the constructor. typedef token_kind_type kind_type; /// Constructor from (external) token numbers. by_kind (kind_type t); /// Record that this symbol is empty. void clear () YY_NOEXCEPT; /// Steal the symbol kind from \a that. void move (by_kind& that); /// The (internal) type number (corresponding to \a type). /// \a empty when empty. symbol_kind_type kind () const YY_NOEXCEPT; /// Backward compatibility (Bison 3.6). symbol_kind_type type_get () const YY_NOEXCEPT; /// The symbol kind. /// \a S_YYEMPTY when empty. symbol_kind_type kind_; }; /// Backward compatibility for a private implementation detail (Bison 3.6). typedef by_kind by_type; /// "External" symbols: returned by the scanner. struct symbol_type : basic_symbol { /// Superclass. typedef basic_symbol super_type; /// Empty symbol. symbol_type () {} /// Constructor for valueless symbols, and symbols from each type. #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) #endif { S4_ASSERT (tok == token::S4EOF || (token::S4error <= tok && tok <= token::MOD) || (token::ADD_ARRAY <= tok && tok <= token::POSTDEC)); } #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, std::string v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) #else symbol_type (int tok, const std::string& v, const location_type& l) : super_type(token_type (tok), v, l) #endif { S4_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; /// Build a parser object. parser (yyscan_t yyscanner_yyarg, xsk::gsc::context* ctx_yyarg, xsk::gsc::ast::program::ptr& ast_yyarg); virtual ~parser (); #if 201103L <= YY_CPLUSPLUS /// Non copyable. parser (const parser&) = delete; /// Non copyable. parser& operator= (const parser&) = delete; #endif /// Parse. An alias for parse (). /// \returns 0 iff parsing succeeded. int operator() (); /// Parse. /// \returns 0 iff parsing succeeded. virtual int parse (); #if S4DEBUG /// The current debugging stream. std::ostream& debug_stream () const YY_ATTRIBUTE_PURE; /// Set the current debugging stream. void set_debug_stream (std::ostream &); /// Type for debugging levels. typedef int debug_level_type; /// The current debugging level. debug_level_type debug_level () const YY_ATTRIBUTE_PURE; /// Set the current debugging level. void set_debug_level (debug_level_type l); #endif /// Report a syntax error. /// \param loc where the syntax error is found. /// \param msg a description of the syntax error. virtual void error (const location_type& loc, const std::string& msg); /// Report a syntax error. void error (const syntax_error& err); /// The user-facing name of the symbol whose (internal) number is /// YYSYMBOL. No bounds checking. static const char *symbol_name (symbol_kind_type yysymbol); // Implementation of make_symbol for each symbol type. #if 201103L <= YY_CPLUSPLUS static symbol_type make_S4EOF (location_type l) { return symbol_type (token::S4EOF, std::move (l)); } #else static symbol_type make_S4EOF (const location_type& l) { return symbol_type (token::S4EOF, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_S4error (location_type l) { return symbol_type (token::S4error, std::move (l)); } #else static symbol_type make_S4error (const location_type& l) { return symbol_type (token::S4error, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_S4UNDEF (location_type l) { return symbol_type (token::S4UNDEF, std::move (l)); } #else static symbol_type make_S4UNDEF (const location_type& l) { return symbol_type (token::S4UNDEF, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DEVBEGIN (location_type l) { return symbol_type (token::DEVBEGIN, std::move (l)); } #else static symbol_type make_DEVBEGIN (const location_type& l) { return symbol_type (token::DEVBEGIN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DEVEND (location_type l) { return symbol_type (token::DEVEND, std::move (l)); } #else static symbol_type make_DEVEND (const location_type& l) { return symbol_type (token::DEVEND, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_INLINE (location_type l) { return symbol_type (token::INLINE, std::move (l)); } #else static symbol_type make_INLINE (const location_type& l) { return symbol_type (token::INLINE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_INCLUDE (location_type l) { return symbol_type (token::INCLUDE, std::move (l)); } #else static symbol_type make_INCLUDE (const location_type& l) { return symbol_type (token::INCLUDE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_USINGTREE (location_type l) { return symbol_type (token::USINGTREE, std::move (l)); } #else static symbol_type make_USINGTREE (const location_type& l) { return symbol_type (token::USINGTREE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ANIMTREE (location_type l) { return symbol_type (token::ANIMTREE, std::move (l)); } #else static symbol_type make_ANIMTREE (const location_type& l) { return symbol_type (token::ANIMTREE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ENDON (location_type l) { return symbol_type (token::ENDON, std::move (l)); } #else static symbol_type make_ENDON (const location_type& l) { return symbol_type (token::ENDON, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_NOTIFY (location_type l) { return symbol_type (token::NOTIFY, std::move (l)); } #else static symbol_type make_NOTIFY (const location_type& l) { return symbol_type (token::NOTIFY, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_WAIT (location_type l) { return symbol_type (token::WAIT, std::move (l)); } #else static symbol_type make_WAIT (const location_type& l) { return symbol_type (token::WAIT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_WAITTILL (location_type l) { return symbol_type (token::WAITTILL, std::move (l)); } #else static symbol_type make_WAITTILL (const location_type& l) { return symbol_type (token::WAITTILL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_WAITTILLMATCH (location_type l) { return symbol_type (token::WAITTILLMATCH, std::move (l)); } #else static symbol_type make_WAITTILLMATCH (const location_type& l) { return symbol_type (token::WAITTILLMATCH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_WAITTILLFRAMEEND (location_type l) { return symbol_type (token::WAITTILLFRAMEEND, std::move (l)); } #else static symbol_type make_WAITTILLFRAMEEND (const location_type& l) { return symbol_type (token::WAITTILLFRAMEEND, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_WAITFRAME (location_type l) { return symbol_type (token::WAITFRAME, std::move (l)); } #else static symbol_type make_WAITFRAME (const location_type& l) { return symbol_type (token::WAITFRAME, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_IF (location_type l) { return symbol_type (token::IF, std::move (l)); } #else static symbol_type make_IF (const location_type& l) { return symbol_type (token::IF, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ELSE (location_type l) { return symbol_type (token::ELSE, std::move (l)); } #else static symbol_type make_ELSE (const location_type& l) { return symbol_type (token::ELSE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DO (location_type l) { return symbol_type (token::DO, std::move (l)); } #else static symbol_type make_DO (const location_type& l) { return symbol_type (token::DO, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_WHILE (location_type l) { return symbol_type (token::WHILE, std::move (l)); } #else static symbol_type make_WHILE (const location_type& l) { return symbol_type (token::WHILE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_FOR (location_type l) { return symbol_type (token::FOR, std::move (l)); } #else static symbol_type make_FOR (const location_type& l) { return symbol_type (token::FOR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_FOREACH (location_type l) { return symbol_type (token::FOREACH, std::move (l)); } #else static symbol_type make_FOREACH (const location_type& l) { return symbol_type (token::FOREACH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_IN (location_type l) { return symbol_type (token::IN, std::move (l)); } #else static symbol_type make_IN (const location_type& l) { return symbol_type (token::IN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_SWITCH (location_type l) { return symbol_type (token::SWITCH, std::move (l)); } #else static symbol_type make_SWITCH (const location_type& l) { return symbol_type (token::SWITCH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CASE (location_type l) { return symbol_type (token::CASE, std::move (l)); } #else static symbol_type make_CASE (const location_type& l) { return symbol_type (token::CASE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DEFAULT (location_type l) { return symbol_type (token::DEFAULT, std::move (l)); } #else static symbol_type make_DEFAULT (const location_type& l) { return symbol_type (token::DEFAULT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_BREAK (location_type l) { return symbol_type (token::BREAK, std::move (l)); } #else static symbol_type make_BREAK (const location_type& l) { return symbol_type (token::BREAK, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONTINUE (location_type l) { return symbol_type (token::CONTINUE, std::move (l)); } #else static symbol_type make_CONTINUE (const location_type& l) { return symbol_type (token::CONTINUE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RETURN (location_type l) { return symbol_type (token::RETURN, std::move (l)); } #else static symbol_type make_RETURN (const location_type& l) { return symbol_type (token::RETURN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_BREAKPOINT (location_type l) { return symbol_type (token::BREAKPOINT, std::move (l)); } #else static symbol_type make_BREAKPOINT (const location_type& l) { return symbol_type (token::BREAKPOINT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_PROFBEGIN (location_type l) { return symbol_type (token::PROFBEGIN, std::move (l)); } #else static symbol_type make_PROFBEGIN (const location_type& l) { return symbol_type (token::PROFBEGIN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_PROFEND (location_type l) { return symbol_type (token::PROFEND, std::move (l)); } #else static symbol_type make_PROFEND (const location_type& l) { return symbol_type (token::PROFEND, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_THREAD (location_type l) { return symbol_type (token::THREAD, std::move (l)); } #else static symbol_type make_THREAD (const location_type& l) { return symbol_type (token::THREAD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CHILDTHREAD (location_type l) { return symbol_type (token::CHILDTHREAD, std::move (l)); } #else static symbol_type make_CHILDTHREAD (const location_type& l) { return symbol_type (token::CHILDTHREAD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_THISTHREAD (location_type l) { return symbol_type (token::THISTHREAD, std::move (l)); } #else static symbol_type make_THISTHREAD (const location_type& l) { return symbol_type (token::THISTHREAD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CALL (location_type l) { return symbol_type (token::CALL, std::move (l)); } #else static symbol_type make_CALL (const location_type& l) { return symbol_type (token::CALL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_TRUE (location_type l) { return symbol_type (token::TRUE, std::move (l)); } #else static symbol_type make_TRUE (const location_type& l) { return symbol_type (token::TRUE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_FALSE (location_type l) { return symbol_type (token::FALSE, std::move (l)); } #else static symbol_type make_FALSE (const location_type& l) { return symbol_type (token::FALSE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_UNDEFINED (location_type l) { return symbol_type (token::UNDEFINED, std::move (l)); } #else static symbol_type make_UNDEFINED (const location_type& l) { return symbol_type (token::UNDEFINED, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_SIZE (location_type l) { return symbol_type (token::SIZE, std::move (l)); } #else static symbol_type make_SIZE (const location_type& l) { return symbol_type (token::SIZE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_GAME (location_type l) { return symbol_type (token::GAME, std::move (l)); } #else static symbol_type make_GAME (const location_type& l) { return symbol_type (token::GAME, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_SELF (location_type l) { return symbol_type (token::SELF, std::move (l)); } #else static symbol_type make_SELF (const location_type& l) { return symbol_type (token::SELF, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ANIM (location_type l) { return symbol_type (token::ANIM, std::move (l)); } #else static symbol_type make_ANIM (const location_type& l) { return symbol_type (token::ANIM, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_LEVEL (location_type l) { return symbol_type (token::LEVEL, std::move (l)); } #else static symbol_type make_LEVEL (const location_type& l) { return symbol_type (token::LEVEL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ISDEFINED (location_type l) { return symbol_type (token::ISDEFINED, std::move (l)); } #else static symbol_type make_ISDEFINED (const location_type& l) { return symbol_type (token::ISDEFINED, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ISTRUE (location_type l) { return symbol_type (token::ISTRUE, std::move (l)); } #else static symbol_type make_ISTRUE (const location_type& l) { return symbol_type (token::ISTRUE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_LPAREN (location_type l) { return symbol_type (token::LPAREN, std::move (l)); } #else static symbol_type make_LPAREN (const location_type& l) { return symbol_type (token::LPAREN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RPAREN (location_type l) { return symbol_type (token::RPAREN, std::move (l)); } #else static symbol_type make_RPAREN (const location_type& l) { return symbol_type (token::RPAREN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_LBRACE (location_type l) { return symbol_type (token::LBRACE, std::move (l)); } #else static symbol_type make_LBRACE (const location_type& l) { return symbol_type (token::LBRACE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RBRACE (location_type l) { return symbol_type (token::RBRACE, std::move (l)); } #else static symbol_type make_RBRACE (const location_type& l) { return symbol_type (token::RBRACE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_LBRACKET (location_type l) { return symbol_type (token::LBRACKET, std::move (l)); } #else static symbol_type make_LBRACKET (const location_type& l) { return symbol_type (token::LBRACKET, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RBRACKET (location_type l) { return symbol_type (token::RBRACKET, std::move (l)); } #else static symbol_type make_RBRACKET (const location_type& l) { return symbol_type (token::RBRACKET, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_COMMA (location_type l) { return symbol_type (token::COMMA, std::move (l)); } #else static symbol_type make_COMMA (const location_type& l) { return symbol_type (token::COMMA, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DOT (location_type l) { return symbol_type (token::DOT, std::move (l)); } #else static symbol_type make_DOT (const location_type& l) { return symbol_type (token::DOT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DOUBLECOLON (location_type l) { return symbol_type (token::DOUBLECOLON, std::move (l)); } #else static symbol_type make_DOUBLECOLON (const location_type& l) { return symbol_type (token::DOUBLECOLON, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_COLON (location_type l) { return symbol_type (token::COLON, std::move (l)); } #else static symbol_type make_COLON (const location_type& l) { return symbol_type (token::COLON, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_SEMICOLON (location_type l) { return symbol_type (token::SEMICOLON, std::move (l)); } #else static symbol_type make_SEMICOLON (const location_type& l) { return symbol_type (token::SEMICOLON, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_QMARK (location_type l) { return symbol_type (token::QMARK, std::move (l)); } #else static symbol_type make_QMARK (const location_type& l) { return symbol_type (token::QMARK, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_INCREMENT (location_type l) { return symbol_type (token::INCREMENT, std::move (l)); } #else static symbol_type make_INCREMENT (const location_type& l) { return symbol_type (token::INCREMENT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DECREMENT (location_type l) { return symbol_type (token::DECREMENT, std::move (l)); } #else static symbol_type make_DECREMENT (const location_type& l) { return symbol_type (token::DECREMENT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_LSHIFT (location_type l) { return symbol_type (token::LSHIFT, std::move (l)); } #else static symbol_type make_LSHIFT (const location_type& l) { return symbol_type (token::LSHIFT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RSHIFT (location_type l) { return symbol_type (token::RSHIFT, std::move (l)); } #else static symbol_type make_RSHIFT (const location_type& l) { return symbol_type (token::RSHIFT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OR (location_type l) { return symbol_type (token::OR, std::move (l)); } #else static symbol_type make_OR (const location_type& l) { return symbol_type (token::OR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_AND (location_type l) { return symbol_type (token::AND, std::move (l)); } #else static symbol_type make_AND (const location_type& l) { return symbol_type (token::AND, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_EQUALITY (location_type l) { return symbol_type (token::EQUALITY, std::move (l)); } #else static symbol_type make_EQUALITY (const location_type& l) { return symbol_type (token::EQUALITY, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_INEQUALITY (location_type l) { return symbol_type (token::INEQUALITY, std::move (l)); } #else static symbol_type make_INEQUALITY (const location_type& l) { return symbol_type (token::INEQUALITY, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_LESS_EQUAL (location_type l) { return symbol_type (token::LESS_EQUAL, std::move (l)); } #else static symbol_type make_LESS_EQUAL (const location_type& l) { return symbol_type (token::LESS_EQUAL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_GREATER_EQUAL (location_type l) { return symbol_type (token::GREATER_EQUAL, std::move (l)); } #else static symbol_type make_GREATER_EQUAL (const location_type& l) { return symbol_type (token::GREATER_EQUAL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_LESS (location_type l) { return symbol_type (token::LESS, std::move (l)); } #else static symbol_type make_LESS (const location_type& l) { return symbol_type (token::LESS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_GREATER (location_type l) { return symbol_type (token::GREATER, std::move (l)); } #else static symbol_type make_GREATER (const location_type& l) { return symbol_type (token::GREATER, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_NOT (location_type l) { return symbol_type (token::NOT, std::move (l)); } #else static symbol_type make_NOT (const location_type& l) { return symbol_type (token::NOT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_COMPLEMENT (location_type l) { return symbol_type (token::COMPLEMENT, std::move (l)); } #else static symbol_type make_COMPLEMENT (const location_type& l) { return symbol_type (token::COMPLEMENT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN (location_type l) { return symbol_type (token::ASSIGN, std::move (l)); } #else static symbol_type make_ASSIGN (const location_type& l) { return symbol_type (token::ASSIGN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_ADD (location_type l) { return symbol_type (token::ASSIGN_ADD, std::move (l)); } #else static symbol_type make_ASSIGN_ADD (const location_type& l) { return symbol_type (token::ASSIGN_ADD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_SUB (location_type l) { return symbol_type (token::ASSIGN_SUB, std::move (l)); } #else static symbol_type make_ASSIGN_SUB (const location_type& l) { return symbol_type (token::ASSIGN_SUB, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_MUL (location_type l) { return symbol_type (token::ASSIGN_MUL, std::move (l)); } #else static symbol_type make_ASSIGN_MUL (const location_type& l) { return symbol_type (token::ASSIGN_MUL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_DIV (location_type l) { return symbol_type (token::ASSIGN_DIV, std::move (l)); } #else static symbol_type make_ASSIGN_DIV (const location_type& l) { return symbol_type (token::ASSIGN_DIV, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_MOD (location_type l) { return symbol_type (token::ASSIGN_MOD, std::move (l)); } #else static symbol_type make_ASSIGN_MOD (const location_type& l) { return symbol_type (token::ASSIGN_MOD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_BW_OR (location_type l) { return symbol_type (token::ASSIGN_BW_OR, std::move (l)); } #else static symbol_type make_ASSIGN_BW_OR (const location_type& l) { return symbol_type (token::ASSIGN_BW_OR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_BW_AND (location_type l) { return symbol_type (token::ASSIGN_BW_AND, std::move (l)); } #else static symbol_type make_ASSIGN_BW_AND (const location_type& l) { return symbol_type (token::ASSIGN_BW_AND, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_BW_EXOR (location_type l) { return symbol_type (token::ASSIGN_BW_EXOR, std::move (l)); } #else static symbol_type make_ASSIGN_BW_EXOR (const location_type& l) { return symbol_type (token::ASSIGN_BW_EXOR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_RSHIFT (location_type l) { return symbol_type (token::ASSIGN_RSHIFT, std::move (l)); } #else static symbol_type make_ASSIGN_RSHIFT (const location_type& l) { return symbol_type (token::ASSIGN_RSHIFT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ASSIGN_LSHIFT (location_type l) { return symbol_type (token::ASSIGN_LSHIFT, std::move (l)); } #else static symbol_type make_ASSIGN_LSHIFT (const location_type& l) { return symbol_type (token::ASSIGN_LSHIFT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_BITWISE_OR (location_type l) { return symbol_type (token::BITWISE_OR, std::move (l)); } #else static symbol_type make_BITWISE_OR (const location_type& l) { return symbol_type (token::BITWISE_OR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_BITWISE_AND (location_type l) { return symbol_type (token::BITWISE_AND, std::move (l)); } #else static symbol_type make_BITWISE_AND (const location_type& l) { return symbol_type (token::BITWISE_AND, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_BITWISE_EXOR (location_type l) { return symbol_type (token::BITWISE_EXOR, std::move (l)); } #else static symbol_type make_BITWISE_EXOR (const location_type& l) { return symbol_type (token::BITWISE_EXOR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ADD (location_type l) { return symbol_type (token::ADD, std::move (l)); } #else static symbol_type make_ADD (const location_type& l) { return symbol_type (token::ADD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_SUB (location_type l) { return symbol_type (token::SUB, std::move (l)); } #else static symbol_type make_SUB (const location_type& l) { return symbol_type (token::SUB, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_MUL (location_type l) { return symbol_type (token::MUL, std::move (l)); } #else static symbol_type make_MUL (const location_type& l) { return symbol_type (token::MUL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DIV (location_type l) { return symbol_type (token::DIV, std::move (l)); } #else static symbol_type make_DIV (const location_type& l) { return symbol_type (token::DIV, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_MOD (location_type l) { return symbol_type (token::MOD, std::move (l)); } #else static symbol_type make_MOD (const location_type& l) { return symbol_type (token::MOD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_PATH (std::string v, location_type l) { return symbol_type (token::PATH, std::move (v), std::move (l)); } #else static symbol_type make_PATH (const std::string& v, const location_type& l) { return symbol_type (token::PATH, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_IDENTIFIER (std::string v, location_type l) { return symbol_type (token::IDENTIFIER, std::move (v), std::move (l)); } #else static symbol_type make_IDENTIFIER (const std::string& v, const location_type& l) { return symbol_type (token::IDENTIFIER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_STRING (std::string v, location_type l) { return symbol_type (token::STRING, std::move (v), std::move (l)); } #else static symbol_type make_STRING (const std::string& v, const location_type& l) { return symbol_type (token::STRING, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ISTRING (std::string v, location_type l) { return symbol_type (token::ISTRING, std::move (v), std::move (l)); } #else static symbol_type make_ISTRING (const std::string& v, const location_type& l) { return symbol_type (token::ISTRING, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_COLOR (std::string v, location_type l) { return symbol_type (token::COLOR, std::move (v), std::move (l)); } #else static symbol_type make_COLOR (const std::string& v, const location_type& l) { return symbol_type (token::COLOR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_FLOAT (std::string v, location_type l) { return symbol_type (token::FLOAT, std::move (v), std::move (l)); } #else static symbol_type make_FLOAT (const std::string& v, const location_type& l) { return symbol_type (token::FLOAT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_INTEGER (std::string v, location_type l) { return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type make_INTEGER (const std::string& v, const location_type& l) { return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ADD_ARRAY (location_type l) { return symbol_type (token::ADD_ARRAY, std::move (l)); } #else static symbol_type make_ADD_ARRAY (const location_type& l) { return symbol_type (token::ADD_ARRAY, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_THEN (location_type l) { return symbol_type (token::THEN, std::move (l)); } #else static symbol_type make_THEN (const location_type& l) { return symbol_type (token::THEN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_TERN (location_type l) { return symbol_type (token::TERN, std::move (l)); } #else static symbol_type make_TERN (const location_type& l) { return symbol_type (token::TERN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_NEG (location_type l) { return symbol_type (token::NEG, std::move (l)); } #else static symbol_type make_NEG (const location_type& l) { return symbol_type (token::NEG, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ANIMREF (location_type l) { return symbol_type (token::ANIMREF, std::move (l)); } #else static symbol_type make_ANIMREF (const location_type& l) { return symbol_type (token::ANIMREF, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_PREINC (location_type l) { return symbol_type (token::PREINC, std::move (l)); } #else static symbol_type make_PREINC (const location_type& l) { return symbol_type (token::PREINC, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_PREDEC (location_type l) { return symbol_type (token::PREDEC, std::move (l)); } #else static symbol_type make_PREDEC (const location_type& l) { return symbol_type (token::PREDEC, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_POSTINC (location_type l) { return symbol_type (token::POSTINC, std::move (l)); } #else static symbol_type make_POSTINC (const location_type& l) { return symbol_type (token::POSTINC, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_POSTDEC (location_type l) { return symbol_type (token::POSTDEC, std::move (l)); } #else static symbol_type make_POSTDEC (const location_type& l) { return symbol_type (token::POSTDEC, l); } #endif class context { public: context (const parser& yyparser, const symbol_type& yyla); const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; } symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); } const location_type& location () const YY_NOEXCEPT { return yyla_.location; } /// Put in YYARG at most YYARGN of the expected tokens, and return the /// number of tokens stored in YYARG. If YYARG is null, return the /// number of expected tokens (guaranteed to be less than YYNTOKENS). int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; private: const parser& yyparser_; const symbol_type& yyla_; }; private: #if YY_CPLUSPLUS < 201103L /// Non copyable. parser (const parser&); /// Non copyable. parser& operator= (const parser&); #endif /// Check the lookahead yytoken. /// \returns true iff the token will be eventually shifted. bool yy_lac_check_ (symbol_kind_type yytoken) const; /// Establish the initial context if no initial context currently exists. /// \returns true iff the token will be eventually shifted. bool yy_lac_establish_ (symbol_kind_type yytoken); /// Discard any previous initial lookahead context because of event. /// \param event the event which caused the lookahead to be discarded. /// Only used for debbuging output. void yy_lac_discard_ (const char* event); /// Stored state numbers (used for stacks). typedef short state_type; /// The arguments of the error message. int yy_syntax_error_arguments_ (const context& yyctx, symbol_kind_type yyarg[], int yyargn) const; /// Generate an error message. /// \param yyctx the context in which the error occurred. virtual std::string yysyntax_error_ (const context& yyctx) const; /// Compute post-reduction state. /// \param yystate the current state /// \param yysym the nonterminal to push on the stack static state_type yy_lr_goto_state_ (state_type yystate, int yysym); /// Whether the given \c yypact_ value indicates a defaulted state. /// \param yyvalue the value to check static bool yy_pact_value_is_default_ (int yyvalue); /// Whether the given \c yytable_ value indicates a syntax error. /// \param yyvalue the value to check static bool yy_table_value_is_error_ (int yyvalue); static const short yypact_ninf_; static const short yytable_ninf_; /// Convert a scanner token kind \a t to a symbol kind. /// In theory \a t should be a token_kind_type, but character literals /// are valid, yet not members of the token_type enum. static symbol_kind_type yytranslate_ (int t); // Tables. // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing // STATE-NUM. static const short yypact_[]; // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero // means the default is an error. static const unsigned char yydefact_[]; // YYPGOTO[NTERM-NUM]. static const short yypgoto_[]; // YYDEFGOTO[NTERM-NUM]. static const short yydefgoto_[]; // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const short yytable_[]; static const short yycheck_[]; // YYSTOS[STATE-NUM] -- The (internal number of the) accessing // symbol of state STATE-NUM. static const unsigned char yystos_[]; // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. static const unsigned char yyr1_[]; // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. static const signed char yyr2_[]; #if S4DEBUG // YYRLINE[YYN] -- Source line where rule number YYN was defined. static const short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. virtual void yy_reduce_print_ (int r) const; /// Print the state stack on the debug stream. virtual void yy_stack_print_ () const; /// Debugging level. int yydebug_; /// Debug stream. std::ostream* yycdebug_; /// \brief Display a symbol kind, value and location. /// \param yyo The output stream. /// \param yysym The symbol. template void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; #endif /// \brief Reclaim the memory associated to a symbol. /// \param yymsg Why this token is reclaimed. /// If null, print nothing. /// \param yysym The symbol. template void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; private: /// Type access provider for state based symbols. struct by_state { /// Default constructor. by_state () YY_NOEXCEPT; /// The symbol kind as needed by the constructor. typedef state_type kind_type; /// Constructor. by_state (kind_type s) YY_NOEXCEPT; /// Copy constructor. by_state (const by_state& that) YY_NOEXCEPT; /// Record that this symbol is empty. void clear () YY_NOEXCEPT; /// Steal the symbol kind from \a that. void move (by_state& that); /// The symbol kind (corresponding to \a state). /// \a symbol_kind::S_YYEMPTY when empty. symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. /// We use the initial state, as it does not have a value. enum { empty_state = 0 }; /// The state. /// \a empty when empty. state_type state; }; /// "Internal" symbol: element of the stack. struct stack_symbol_type : basic_symbol { /// Superclass. typedef basic_symbol super_type; /// Construct an empty symbol. stack_symbol_type (); /// Move or copy construction. stack_symbol_type (YY_RVREF (stack_symbol_type) that); /// Steal the contents from \a sym to build this. stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); #if YY_CPLUSPLUS < 201103L /// Assignment, needed by push_back by some old implementations. /// Moves the contents of that. stack_symbol_type& operator= (stack_symbol_type& that); /// Assignment, needed by push_back by other implementations. /// Needed by some other old implementations. stack_symbol_type& operator= (const stack_symbol_type& that); #endif }; /// A stack with random access from its top. template > class stack { public: // Hide our reversed order. typedef typename S::iterator iterator; typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; typedef typename std::ptrdiff_t index_type; stack (size_type n = 200) : seq_ (n) {} #if 201103L <= YY_CPLUSPLUS /// Non copyable. stack (const stack&) = delete; /// Non copyable. stack& operator= (const stack&) = delete; #endif /// Random access. /// /// Index 0 returns the topmost element. const T& operator[] (index_type i) const { return seq_[size_type (size () - 1 - i)]; } /// Random access. /// /// Index 0 returns the topmost element. T& operator[] (index_type i) { return seq_[size_type (size () - 1 - i)]; } /// Steal the contents of \a t. /// /// Close to move-semantics. void push (YY_MOVE_REF (T) t) { seq_.push_back (T ()); operator[] (0).move (t); } /// Pop elements from the stack. void pop (std::ptrdiff_t n = 1) YY_NOEXCEPT { for (; 0 < n; --n) seq_.pop_back (); } /// Pop all elements from the stack. void clear () YY_NOEXCEPT { seq_.clear (); } /// Number of elements on the stack. index_type size () const YY_NOEXCEPT { return index_type (seq_.size ()); } /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { return seq_.end (); } /// Present a slice of the top of a stack. class slice { public: slice (const stack& stack, index_type range) : stack_ (stack) , range_ (range) {} const T& operator[] (index_type i) const { return stack_[range_ - i]; } private: const stack& stack_; index_type range_; }; private: #if YY_CPLUSPLUS < 201103L /// Non copyable. stack (const stack&); /// Non copyable. stack& operator= (const stack&); #endif /// The wrapped container. S seq_; }; /// Stack type. typedef stack stack_type; /// The stack. stack_type yystack_; /// The stack for LAC. /// Logically, the yy_lac_stack's lifetime is confined to the function /// yy_lac_check_. We just store it as a member of this class to hold /// on to the memory and to avoid frequent reallocations. /// Since yy_lac_check_ is const, this member must be mutable. mutable std::vector yylac_stack_; /// Whether an initial LAC context was established. bool yy_lac_established_; /// Push a new state on the stack. /// \param m a debug message to display /// if null, no trace is output. /// \param sym the symbol /// \warning the contents of \a s.value is stolen. void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); /// Push a new look ahead token on the state on the stack. /// \param m a debug message to display /// if null, no trace is output. /// \param s the state /// \param sym the symbol (for its value and location). /// \warning the contents of \a sym.value is stolen. void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); /// Pop \a n symbols from the stack. void yypop_ (int n = 1); /// Constants. enum { yylast_ = 2336, ///< Last index in yytable_. yynnts_ = 83, ///< Number of nonterminal symbols. yyfinal_ = 21 ///< Termination state number. }; // User arguments. yyscan_t yyscanner; xsk::gsc::context* ctx; xsk::gsc::ast::program::ptr& ast; }; inline parser::symbol_kind_type parser::yytranslate_ (int t) { return static_cast (t); } // basic_symbol. template parser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) , value () , location (that.location) { switch (this->kind ()) { case symbol_kind::S_expr_function: // expr_function case symbol_kind::S_expr_pointer: // expr_pointer value.copy< ast::call > (YY_MOVE (that.value)); break; case symbol_kind::S_declaration: // declaration value.copy< ast::decl > (YY_MOVE (that.value)); break; case symbol_kind::S_decl_constant: // decl_constant value.copy< ast::decl_constant::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_decl_thread: // decl_thread value.copy< ast::decl_thread::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_decl_usingtree: // decl_usingtree value.copy< ast::decl_usingtree::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr: // expr case symbol_kind::S_expr_or_empty: // expr_or_empty case symbol_kind::S_expr_assign: // expr_assign case symbol_kind::S_expr_increment: // expr_increment case symbol_kind::S_expr_decrement: // expr_decrement case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_add_array: // expr_add_array value.copy< ast::expr_add_array::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_anim: // expr_anim value.copy< ast::expr_anim::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_animation: // expr_animation value.copy< ast::expr_animation::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_animtree: // expr_animtree value.copy< ast::expr_animtree::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_arguments: // expr_arguments case symbol_kind::S_expr_arguments_no_empty: // expr_arguments_no_empty value.copy< ast::expr_arguments::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_array: // expr_array value.copy< ast::expr_array::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_call: // expr_call value.copy< ast::expr_call::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_color: // expr_color value.copy< ast::expr_color::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_complement: // expr_complement value.copy< ast::expr_complement::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_empty_array: // expr_empty_array value.copy< ast::expr_empty_array::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_false: // expr_false value.copy< ast::expr_false::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_field: // expr_field value.copy< ast::expr_field::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_float: // expr_float value.copy< ast::expr_float::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_game: // expr_game value.copy< ast::expr_game::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_identifier: // expr_identifier value.copy< ast::expr_identifier::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_integer: // expr_integer value.copy< ast::expr_integer::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_isdefined: // expr_isdefined value.copy< ast::expr_isdefined::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_istring: // expr_istring value.copy< ast::expr_istring::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_istrue: // expr_istrue value.copy< ast::expr_istrue::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_level: // expr_level value.copy< ast::expr_level::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_method: // expr_method value.copy< ast::expr_method::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_not: // expr_not value.copy< ast::expr_not::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_parameters: // expr_parameters value.copy< ast::expr_parameters::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_paren: // expr_paren value.copy< ast::expr_paren::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_path: // expr_path value.copy< ast::expr_path::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_reference: // expr_reference value.copy< ast::expr_reference::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_self: // expr_self value.copy< ast::expr_self::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_size: // expr_size value.copy< ast::expr_size::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_string: // expr_string value.copy< ast::expr_string::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_thisthread: // expr_thisthread value.copy< ast::expr_thisthread::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_true: // expr_true value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_expr_vector: // expr_vector value.copy< ast::expr_vector::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_include: // include value.copy< ast::include::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_program: // program value.copy< ast::program::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt: // stmt value.copy< ast::stmt > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_assign: // stmt_assign value.copy< ast::stmt_assign::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_break: // stmt_break value.copy< ast::stmt_break::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint value.copy< ast::stmt_breakpoint::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_call: // stmt_call value.copy< ast::stmt_call::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_case: // stmt_case value.copy< ast::stmt_case::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_continue: // stmt_continue value.copy< ast::stmt_continue::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_default: // stmt_default value.copy< ast::stmt_default::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_dowhile: // stmt_dowhile value.copy< ast::stmt_dowhile::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_endon: // stmt_endon value.copy< ast::stmt_endon::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_expr: // stmt_expr value.copy< ast::stmt_expr::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_for: // stmt_for value.copy< ast::stmt_for::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_foreach: // stmt_foreach value.copy< ast::stmt_foreach::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_if: // stmt_if value.copy< ast::stmt_if::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_ifelse: // stmt_ifelse value.copy< ast::stmt_ifelse::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_dev: // stmt_dev case symbol_kind::S_stmt_block: // stmt_block case symbol_kind::S_stmt_list: // stmt_list value.copy< ast::stmt_list::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_notify: // stmt_notify value.copy< ast::stmt_notify::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin value.copy< ast::stmt_prof_begin::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_prof_end: // stmt_prof_end value.copy< ast::stmt_prof_end::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_return: // stmt_return value.copy< ast::stmt_return::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_switch: // stmt_switch value.copy< ast::stmt_switch::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_wait: // stmt_wait value.copy< ast::stmt_wait::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_waitframe: // stmt_waitframe value.copy< ast::stmt_waitframe::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_waittill: // stmt_waittill value.copy< ast::stmt_waittill::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_waittillframeend: // stmt_waittillframeend value.copy< ast::stmt_waittillframeend::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_waittillmatch: // stmt_waittillmatch value.copy< ast::stmt_waittillmatch::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_stmt_while: // stmt_while value.copy< ast::stmt_while::ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_PATH: // "path" case symbol_kind::S_IDENTIFIER: // "identifier" case symbol_kind::S_STRING: // "string literal" case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; default: break; } } template parser::symbol_kind_type parser::basic_symbol::type_get () const YY_NOEXCEPT { return this->kind (); } template bool parser::basic_symbol::empty () const YY_NOEXCEPT { return this->kind () == symbol_kind::S_YYEMPTY; } template void parser::basic_symbol::move (basic_symbol& s) { super_type::move (s); switch (this->kind ()) { case symbol_kind::S_expr_function: // expr_function case symbol_kind::S_expr_pointer: // expr_pointer value.move< ast::call > (YY_MOVE (s.value)); break; case symbol_kind::S_declaration: // declaration value.move< ast::decl > (YY_MOVE (s.value)); break; case symbol_kind::S_decl_constant: // decl_constant value.move< ast::decl_constant::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_decl_thread: // decl_thread value.move< ast::decl_thread::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_decl_usingtree: // decl_usingtree value.move< ast::decl_usingtree::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr: // expr case symbol_kind::S_expr_or_empty: // expr_or_empty case symbol_kind::S_expr_assign: // expr_assign case symbol_kind::S_expr_increment: // expr_increment case symbol_kind::S_expr_decrement: // expr_decrement case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_add_array: // expr_add_array value.move< ast::expr_add_array::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_anim: // expr_anim value.move< ast::expr_anim::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_animation: // expr_animation value.move< ast::expr_animation::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_animtree: // expr_animtree value.move< ast::expr_animtree::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_arguments: // expr_arguments case symbol_kind::S_expr_arguments_no_empty: // expr_arguments_no_empty value.move< ast::expr_arguments::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_array: // expr_array value.move< ast::expr_array::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_call: // expr_call value.move< ast::expr_call::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_color: // expr_color value.move< ast::expr_color::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_complement: // expr_complement value.move< ast::expr_complement::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_empty_array: // expr_empty_array value.move< ast::expr_empty_array::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_false: // expr_false value.move< ast::expr_false::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_field: // expr_field value.move< ast::expr_field::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_float: // expr_float value.move< ast::expr_float::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_game: // expr_game value.move< ast::expr_game::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_identifier: // expr_identifier value.move< ast::expr_identifier::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_integer: // expr_integer value.move< ast::expr_integer::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_isdefined: // expr_isdefined value.move< ast::expr_isdefined::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_istring: // expr_istring value.move< ast::expr_istring::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_istrue: // expr_istrue value.move< ast::expr_istrue::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_level: // expr_level value.move< ast::expr_level::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_method: // expr_method value.move< ast::expr_method::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_not: // expr_not value.move< ast::expr_not::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_parameters: // expr_parameters value.move< ast::expr_parameters::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_paren: // expr_paren value.move< ast::expr_paren::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_path: // expr_path value.move< ast::expr_path::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_reference: // expr_reference value.move< ast::expr_reference::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_self: // expr_self value.move< ast::expr_self::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_size: // expr_size value.move< ast::expr_size::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_string: // expr_string value.move< ast::expr_string::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_thisthread: // expr_thisthread value.move< ast::expr_thisthread::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_true: // expr_true value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_expr_vector: // expr_vector value.move< ast::expr_vector::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_include: // include value.move< ast::include::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_program: // program value.move< ast::program::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt: // stmt value.move< ast::stmt > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_assign: // stmt_assign value.move< ast::stmt_assign::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_break: // stmt_break value.move< ast::stmt_break::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint value.move< ast::stmt_breakpoint::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_call: // stmt_call value.move< ast::stmt_call::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_case: // stmt_case value.move< ast::stmt_case::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_continue: // stmt_continue value.move< ast::stmt_continue::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_default: // stmt_default value.move< ast::stmt_default::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_dowhile: // stmt_dowhile value.move< ast::stmt_dowhile::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_endon: // stmt_endon value.move< ast::stmt_endon::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_expr: // stmt_expr value.move< ast::stmt_expr::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_for: // stmt_for value.move< ast::stmt_for::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_foreach: // stmt_foreach value.move< ast::stmt_foreach::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_if: // stmt_if value.move< ast::stmt_if::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_ifelse: // stmt_ifelse value.move< ast::stmt_ifelse::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_dev: // stmt_dev case symbol_kind::S_stmt_block: // stmt_block case symbol_kind::S_stmt_list: // stmt_list value.move< ast::stmt_list::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_notify: // stmt_notify value.move< ast::stmt_notify::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin value.move< ast::stmt_prof_begin::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_prof_end: // stmt_prof_end value.move< ast::stmt_prof_end::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_return: // stmt_return value.move< ast::stmt_return::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_switch: // stmt_switch value.move< ast::stmt_switch::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_wait: // stmt_wait value.move< ast::stmt_wait::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_waitframe: // stmt_waitframe value.move< ast::stmt_waitframe::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_waittill: // stmt_waittill value.move< ast::stmt_waittill::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_waittillframeend: // stmt_waittillframeend value.move< ast::stmt_waittillframeend::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_waittillmatch: // stmt_waittillmatch value.move< ast::stmt_waittillmatch::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_stmt_while: // stmt_while value.move< ast::stmt_while::ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_PATH: // "path" case symbol_kind::S_IDENTIFIER: // "identifier" case symbol_kind::S_STRING: // "string literal" case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; default: break; } location = YY_MOVE (s.location); } // by_kind. inline parser::by_kind::by_kind () : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS inline parser::by_kind::by_kind (by_kind&& that) : kind_ (that.kind_) { that.clear (); } #endif inline parser::by_kind::by_kind (const by_kind& that) : kind_ (that.kind_) {} inline parser::by_kind::by_kind (token_kind_type t) : kind_ (yytranslate_ (t)) {} inline void parser::by_kind::clear () YY_NOEXCEPT { kind_ = symbol_kind::S_YYEMPTY; } inline void parser::by_kind::move (by_kind& that) { kind_ = that.kind_; that.clear (); } inline parser::symbol_kind_type parser::by_kind::kind () const YY_NOEXCEPT { return kind_; } inline parser::symbol_kind_type parser::by_kind::type_get () const YY_NOEXCEPT { return this->kind (); } #line 13 "parser.ypp" } } } // xsk::gsc::s4 #line 5448 "parser.hpp" #endif // !YY_S4_PARSER_HPP_INCLUDED