0 $)ˆl–Ü4ý(”Ò~ê�ÆŸ¸Ó*bÑ¿Ë „l"y¯ÆÀÍ?÷)# C++ skeleton for Bison # Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . m4_include(b4_skeletonsdir/[c++.m4]) # api.value.type=variant is valid. m4_define([b4_value_type_setup_variant]) # Check the value of %define parse.lac, where LAC stands for lookahead # correction. b4_percent_define_default([[parse.lac]], [[none]]) b4_percent_define_check_values([[[[parse.lac]], [[full]], [[none]]]]) b4_define_flag_if([lac]) m4_define([b4_lac_flag], [m4_if(b4_percent_define_get([[parse.lac]]), [none], [[0]], [[1]])]) # b4_tname_if(TNAME-NEEDED, TNAME-NOT-NEEDED) # ------------------------------------------- m4_define([b4_tname_if], [m4_case(b4_percent_define_get([[parse.error]]), [verbose], [$1], [b4_token_table_if([$1], [$2])])]) # b4_integral_parser_table_declare(TABLE-NAME, CONTENT, COMMENT) # -------------------------------------------------------------- # Declare "parser::yy_" whose contents is CONTENT. m4_define([b4_integral_parser_table_declare], [m4_ifval([$3], [b4_comment([$3], [ ]) ])dnl static const b4_int_type_for([$2]) yy$1_[[]];dnl ]) # b4_integral_parser_table_define(TABLE-NAME, CONTENT, COMMENT) # ------------------------------------------------------------- # Define "parser::yy_" whose contents is CONTENT. m4_define([b4_integral_parser_table_define], [ const b4_int_type_for([$2]) b4_parser_class::yy$1_[[]] = { $2 };dnl ]) # b4_symbol_kind(NUM) # ------------------- m4_define([b4_symbol_kind], [symbol_kind::b4_symbol_kind_base($@)]) # b4_symbol_value_template(VAL, SYMBOL-NUM, [TYPE]) # ------------------------------------------------- # Same as b4_symbol_value, but used in a template method. It makes # a difference when using variants. Note that b4_value_type_setup_union # overrides b4_symbol_value, so we must override it again. m4_copy([b4_symbol_value], [b4_symbol_value_template]) m4_append([b4_value_type_setup_union], [m4_copy_force([b4_symbol_value_union], [b4_symbol_value_template])]) # b4_lhs_value(SYMBOL-NUM, [TYPE]) # -------------------------------- # See README. m4_define([b4_lhs_value], [b4_symbol_value([yylhs.value], [$1], [$2])]) # b4_lhs_location() # ----------------- # Expansion of @$. m4_define([b4_lhs_location], [yylhs.location]) # b4_rhs_data(RULE-LENGTH, POS) # ----------------------------- # See README. m4_define([b4_rhs_data], [yystack_@{b4_subtract($@)@}]) # b4_rhs_state(RULE-LENGTH, POS) # ------------------------------ # The state corresponding to the symbol #POS, where the current # rule has RULE-LENGTH symbols on RHS. m4_define([b4_rhs_state], [b4_rhs_data([$1], [$2]).state]) # b4_rhs_value(RULE-LENGTH, POS, SYMBOL-NUM, [TYPE]) # -------------------------------------------------- # See README. m4_define([_b4_rhs_value], [b4_symbol_value([b4_rhs_data([$1], [$2]).value], [$3], [$4])]) m4_define([b4_rhs_value], [b4_percent_define_ifdef([api.value.automove], [YY_MOVE (_b4_rhs_value($@))], [_b4_rhs_value($@)])]) # b4_rhs_location(RULE-LENGTH, POS) # --------------------------------- # Expansion of @POS, where the current rule has RULE-LENGTH symbols # on RHS. m4_define([b4_rhs_location], [b4_rhs_data([$1], [$2]).location]) # b4_symbol_action(SYMBOL-NUM, KIND) # ---------------------------------- # Run t