xref: /aosp_15_r20/prebuilts/build-tools/common/bison/skeletons/yacc.c (revision cda5da8d549138a6648c5ee6d7a49cf8f4a657be)
1*cda5da8dSAndroid Build Coastguard Worker #                                                            -*- C -*-
2*cda5da8dSAndroid Build Coastguard Worker # Yacc compatible skeleton for Bison
3*cda5da8dSAndroid Build Coastguard Worker 
4*cda5da8dSAndroid Build Coastguard Worker # Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software
5*cda5da8dSAndroid Build Coastguard Worker # Foundation, Inc.
6*cda5da8dSAndroid Build Coastguard Worker 
7*cda5da8dSAndroid Build Coastguard Worker m4_pushdef([b4_copyright_years],
8*cda5da8dSAndroid Build Coastguard Worker            [1984, 1989-1990, 2000-2015, 2018-2021])
9*cda5da8dSAndroid Build Coastguard Worker 
10*cda5da8dSAndroid Build Coastguard Worker # This program is free software: you can redistribute it and/or modify
11*cda5da8dSAndroid Build Coastguard Worker # it under the terms of the GNU General Public License as published by
12*cda5da8dSAndroid Build Coastguard Worker # the Free Software Foundation, either version 3 of the License, or
13*cda5da8dSAndroid Build Coastguard Worker # (at your option) any later version.
14*cda5da8dSAndroid Build Coastguard Worker #
15*cda5da8dSAndroid Build Coastguard Worker # This program is distributed in the hope that it will be useful,
16*cda5da8dSAndroid Build Coastguard Worker # but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cda5da8dSAndroid Build Coastguard Worker # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cda5da8dSAndroid Build Coastguard Worker # GNU General Public License for more details.
19*cda5da8dSAndroid Build Coastguard Worker #
20*cda5da8dSAndroid Build Coastguard Worker # You should have received a copy of the GNU General Public License
21*cda5da8dSAndroid Build Coastguard Worker # along with this program.  If not, see <https://www.gnu.org/licenses/>.
22*cda5da8dSAndroid Build Coastguard Worker 
23*cda5da8dSAndroid Build Coastguard Worker m4_include(b4_skeletonsdir/[c.m4])
24*cda5da8dSAndroid Build Coastguard Worker 
25*cda5da8dSAndroid Build Coastguard Worker 
26*cda5da8dSAndroid Build Coastguard Worker ## ---------- ##
27*cda5da8dSAndroid Build Coastguard Worker ## api.pure.  ##
28*cda5da8dSAndroid Build Coastguard Worker ## ---------- ##
29*cda5da8dSAndroid Build Coastguard Worker 
30*cda5da8dSAndroid Build Coastguard Worker b4_percent_define_default([[api.pure]], [[false]])
31*cda5da8dSAndroid Build Coastguard Worker b4_percent_define_check_values([[[[api.pure]],
32*cda5da8dSAndroid Build Coastguard Worker                                  [[false]], [[true]], [[]], [[full]]]])
33*cda5da8dSAndroid Build Coastguard Worker 
34*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_pure_flag], [[0]])
35*cda5da8dSAndroid Build Coastguard Worker m4_case(b4_percent_define_get([[api.pure]]),
36*cda5da8dSAndroid Build Coastguard Worker         [false], [m4_define([b4_pure_flag], [[0]])],
37*cda5da8dSAndroid Build Coastguard Worker         [true],  [m4_define([b4_pure_flag], [[1]])],
38*cda5da8dSAndroid Build Coastguard Worker         [],      [m4_define([b4_pure_flag], [[1]])],
39*cda5da8dSAndroid Build Coastguard Worker         [full],  [m4_define([b4_pure_flag], [[2]])])
40*cda5da8dSAndroid Build Coastguard Worker 
41*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_pure_if],
42*cda5da8dSAndroid Build Coastguard Worker [m4_case(b4_pure_flag,
43*cda5da8dSAndroid Build Coastguard Worker          [0], [$2],
44*cda5da8dSAndroid Build Coastguard Worker          [1], [$1],
45*cda5da8dSAndroid Build Coastguard Worker          [2], [$1])])
46*cda5da8dSAndroid Build Coastguard Worker          [m4_fatal([invalid api.pure value: ]$1)])])
47*cda5da8dSAndroid Build Coastguard Worker 
48*cda5da8dSAndroid Build Coastguard Worker ## --------------- ##
49*cda5da8dSAndroid Build Coastguard Worker ## api.push-pull.  ##
50*cda5da8dSAndroid Build Coastguard Worker ## --------------- ##
51*cda5da8dSAndroid Build Coastguard Worker 
52*cda5da8dSAndroid Build Coastguard Worker # b4_pull_if, b4_push_if
53*cda5da8dSAndroid Build Coastguard Worker # ----------------------
54*cda5da8dSAndroid Build Coastguard Worker # Whether the pull/push APIs are needed.  Both can be enabled.
55*cda5da8dSAndroid Build Coastguard Worker 
56*cda5da8dSAndroid Build Coastguard Worker b4_percent_define_default([[api.push-pull]], [[pull]])
57*cda5da8dSAndroid Build Coastguard Worker b4_percent_define_check_values([[[[api.push-pull]],
58*cda5da8dSAndroid Build Coastguard Worker                                  [[pull]], [[push]], [[both]]]])
59*cda5da8dSAndroid Build Coastguard Worker b4_define_flag_if([pull]) m4_define([b4_pull_flag], [[1]])
60*cda5da8dSAndroid Build Coastguard Worker b4_define_flag_if([push]) m4_define([b4_push_flag], [[1]])
61*cda5da8dSAndroid Build Coastguard Worker m4_case(b4_percent_define_get([[api.push-pull]]),
62*cda5da8dSAndroid Build Coastguard Worker         [pull], [m4_define([b4_push_flag], [[0]])],
63*cda5da8dSAndroid Build Coastguard Worker         [push], [m4_define([b4_pull_flag], [[0]])])
64*cda5da8dSAndroid Build Coastguard Worker 
65*cda5da8dSAndroid Build Coastguard Worker # Handle BISON_USE_PUSH_FOR_PULL for the test suite.  So that push parsing
66*cda5da8dSAndroid Build Coastguard Worker # tests function as written, do not let BISON_USE_PUSH_FOR_PULL modify the
67*cda5da8dSAndroid Build Coastguard Worker # behavior of Bison at all when push parsing is already requested.
68*cda5da8dSAndroid Build Coastguard Worker b4_define_flag_if([use_push_for_pull])
69*cda5da8dSAndroid Build Coastguard Worker b4_use_push_for_pull_if([
70*cda5da8dSAndroid Build Coastguard Worker   b4_push_if([m4_define([b4_use_push_for_pull_flag], [[0]])],
71*cda5da8dSAndroid Build Coastguard Worker              [m4_define([b4_push_flag], [[1]])])])
72*cda5da8dSAndroid Build Coastguard Worker 
73*cda5da8dSAndroid Build Coastguard Worker ## ----------- ##
74*cda5da8dSAndroid Build Coastguard Worker ## parse.lac.  ##
75*cda5da8dSAndroid Build Coastguard Worker ## ----------- ##
76*cda5da8dSAndroid Build Coastguard Worker 
77*cda5da8dSAndroid Build Coastguard Worker b4_percent_define_default([[parse.lac]], [[none]])
78*cda5da8dSAndroid Build Coastguard Worker b4_percent_define_default([[parse.lac.es-capacity-initial]], [[20]])
79*cda5da8dSAndroid Build Coastguard Worker b4_percent_define_default([[parse.lac.memory-trace]], [[failures]])
80*cda5da8dSAndroid Build Coastguard Worker b4_percent_define_check_values([[[[parse.lac]], [[full]], [[none]]]],
81*cda5da8dSAndroid Build Coastguard Worker                                [[[[parse.lac.memory-trace]],
82*cda5da8dSAndroid Build Coastguard Worker                                  [[failures]], [[full]]]])
83*cda5da8dSAndroid Build Coastguard Worker b4_define_flag_if([lac])
84*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_lac_flag],
85*cda5da8dSAndroid Build Coastguard Worker           [m4_if(b4_percent_define_get([[parse.lac]]),
86*cda5da8dSAndroid Build Coastguard Worker                  [none], [[0]], [[1]])])
87*cda5da8dSAndroid Build Coastguard Worker 
88*cda5da8dSAndroid Build Coastguard Worker ## ---------------- ##
89*cda5da8dSAndroid Build Coastguard Worker ## Default values.  ##
90*cda5da8dSAndroid Build Coastguard Worker ## ---------------- ##
91*cda5da8dSAndroid Build Coastguard Worker 
92*cda5da8dSAndroid Build Coastguard Worker # Stack parameters.
93*cda5da8dSAndroid Build Coastguard Worker m4_define_default([b4_stack_depth_max], [10000])
94*cda5da8dSAndroid Build Coastguard Worker m4_define_default([b4_stack_depth_init],  [200])
95*cda5da8dSAndroid Build Coastguard Worker 
96*cda5da8dSAndroid Build Coastguard Worker 
97*cda5da8dSAndroid Build Coastguard Worker # b4_yyerror_arg_loc_if(ARG)
98*cda5da8dSAndroid Build Coastguard Worker # --------------------------
99*cda5da8dSAndroid Build Coastguard Worker # Expand ARG iff yyerror is to be given a location as argument.
100*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_yyerror_arg_loc_if],
101*cda5da8dSAndroid Build Coastguard Worker [b4_locations_if([m4_case(b4_pure_flag,
102*cda5da8dSAndroid Build Coastguard Worker                           [1], [m4_ifset([b4_parse_param], [$1])],
103*cda5da8dSAndroid Build Coastguard Worker                           [2], [$1])])])
104*cda5da8dSAndroid Build Coastguard Worker 
105*cda5da8dSAndroid Build Coastguard Worker # b4_yyerror_formals
106*cda5da8dSAndroid Build Coastguard Worker # ------------------
107*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_yyerror_formals],
108*cda5da8dSAndroid Build Coastguard Worker [b4_pure_if([b4_locations_if([, [[const ]b4_api_PREFIX[LTYPE *yyllocp], [&yylloc]]])[]dnl
109*cda5da8dSAndroid Build Coastguard Worker m4_ifdef([b4_parse_param], [, b4_parse_param])[]dnl
110*cda5da8dSAndroid Build Coastguard Worker ,])dnl
111*cda5da8dSAndroid Build Coastguard Worker [[const char *msg], [msg]]])
112*cda5da8dSAndroid Build Coastguard Worker 
113*cda5da8dSAndroid Build Coastguard Worker 
114*cda5da8dSAndroid Build Coastguard Worker 
115*cda5da8dSAndroid Build Coastguard Worker # b4_yyerror_args
116*cda5da8dSAndroid Build Coastguard Worker # ---------------
117*cda5da8dSAndroid Build Coastguard Worker # Arguments passed to yyerror: user args plus yylloc.
118*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_yyerror_args],
119*cda5da8dSAndroid Build Coastguard Worker [b4_yyerror_arg_loc_if([&yylloc, ])dnl
120*cda5da8dSAndroid Build Coastguard Worker m4_ifset([b4_parse_param], [b4_args(b4_parse_param), ])])
121*cda5da8dSAndroid Build Coastguard Worker 
122*cda5da8dSAndroid Build Coastguard Worker 
123*cda5da8dSAndroid Build Coastguard Worker 
124*cda5da8dSAndroid Build Coastguard Worker ## ----------------- ##
125*cda5da8dSAndroid Build Coastguard Worker ## Semantic Values.  ##
126*cda5da8dSAndroid Build Coastguard Worker ## ----------------- ##
127*cda5da8dSAndroid Build Coastguard Worker 
128*cda5da8dSAndroid Build Coastguard Worker 
129*cda5da8dSAndroid Build Coastguard Worker # b4_accept([SYMBOL-NUM])
130*cda5da8dSAndroid Build Coastguard Worker # -----------------------
131*cda5da8dSAndroid Build Coastguard Worker # Used in actions of the rules of accept, the initial symbol, to call
132*cda5da8dSAndroid Build Coastguard Worker # YYACCEPT.  If SYMBOL-NUM is specified, run "yyvalue->SLOT = $2;"
133*cda5da8dSAndroid Build Coastguard Worker # before, using the slot of SYMBOL-NUM.
134*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_accept],
135*cda5da8dSAndroid Build Coastguard Worker [m4_ifval([$1],
136*cda5da8dSAndroid Build Coastguard Worker           [b4_symbol_value(yyimpl->yyvalue, [$1]) = b4_rhs_value(2, 1, [$1]); ]) YYACCEPT])
137*cda5da8dSAndroid Build Coastguard Worker 
138*cda5da8dSAndroid Build Coastguard Worker 
139*cda5da8dSAndroid Build Coastguard Worker # b4_lhs_value(SYMBOL-NUM, [TYPE])
140*cda5da8dSAndroid Build Coastguard Worker # --------------------------------
141*cda5da8dSAndroid Build Coastguard Worker # See README.
142*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_lhs_value],
143*cda5da8dSAndroid Build Coastguard Worker [b4_symbol_value(yyval, [$1], [$2])])
144*cda5da8dSAndroid Build Coastguard Worker 
145*cda5da8dSAndroid Build Coastguard Worker 
146*cda5da8dSAndroid Build Coastguard Worker # b4_rhs_value(RULE-LENGTH, POS, [SYMBOL-NUM], [TYPE])
147*cda5da8dSAndroid Build Coastguard Worker # ----------------------------------------------------
148*cda5da8dSAndroid Build Coastguard Worker # See README.
149*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_rhs_value],
150*cda5da8dSAndroid Build Coastguard Worker [b4_symbol_value([yyvsp@{b4_subtract([$2], [$1])@}], [$3], [$4])])
151*cda5da8dSAndroid Build Coastguard Worker 
152*cda5da8dSAndroid Build Coastguard Worker 
153*cda5da8dSAndroid Build Coastguard Worker ## ----------- ##
154*cda5da8dSAndroid Build Coastguard Worker ## Locations.  ##
155*cda5da8dSAndroid Build Coastguard Worker ## ----------- ##
156*cda5da8dSAndroid Build Coastguard Worker 
157*cda5da8dSAndroid Build Coastguard Worker # b4_lhs_location()
158*cda5da8dSAndroid Build Coastguard Worker # -----------------
159*cda5da8dSAndroid Build Coastguard Worker # Expansion of @$.
160*cda5da8dSAndroid Build Coastguard Worker # Overparenthetized to avoid obscure problems with "foo$$bar = foo$1bar".
161*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_lhs_location],
162*cda5da8dSAndroid Build Coastguard Worker [(yyloc)])
163*cda5da8dSAndroid Build Coastguard Worker 
164*cda5da8dSAndroid Build Coastguard Worker 
165*cda5da8dSAndroid Build Coastguard Worker # b4_rhs_location(RULE-LENGTH, POS)
166*cda5da8dSAndroid Build Coastguard Worker # ---------------------------------
167*cda5da8dSAndroid Build Coastguard Worker # Expansion of @POS, where the current rule has RULE-LENGTH symbols
168*cda5da8dSAndroid Build Coastguard Worker # on RHS.
169*cda5da8dSAndroid Build Coastguard Worker # Overparenthetized to avoid obscure problems with "foo$$bar = foo$1bar".
170*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_rhs_location],
171*cda5da8dSAndroid Build Coastguard Worker [(yylsp@{b4_subtract([$2], [$1])@})])
172*cda5da8dSAndroid Build Coastguard Worker 
173*cda5da8dSAndroid Build Coastguard Worker 
174*cda5da8dSAndroid Build Coastguard Worker ## -------------- ##
175*cda5da8dSAndroid Build Coastguard Worker ## Declarations.  ##
176*cda5da8dSAndroid Build Coastguard Worker ## -------------- ##
177*cda5da8dSAndroid Build Coastguard Worker 
178*cda5da8dSAndroid Build Coastguard Worker # _b4_declare_sub_yyparse(START-SYMBOL-NUM, SWITCHING-TOKEN-SYMBOL-NUM)
179*cda5da8dSAndroid Build Coastguard Worker # ---------------------------------------------------------------------
180*cda5da8dSAndroid Build Coastguard Worker # Define the return type of the parsing function for SYMBOL-NUM, and
181*cda5da8dSAndroid Build Coastguard Worker # declare its parsing function.
182*cda5da8dSAndroid Build Coastguard Worker m4_define([_b4_declare_sub_yyparse],
183*cda5da8dSAndroid Build Coastguard Worker [[
184*cda5da8dSAndroid Build Coastguard Worker // Return type when parsing one ]_b4_symbol($1, tag)[.
185*cda5da8dSAndroid Build Coastguard Worker typedef struct
186*cda5da8dSAndroid Build Coastguard Worker {]b4_symbol_if([$1], [has_type], [[
187*cda5da8dSAndroid Build Coastguard Worker   ]_b4_symbol($1, type)[ yyvalue;]])[
188*cda5da8dSAndroid Build Coastguard Worker   int yystatus;
189*cda5da8dSAndroid Build Coastguard Worker   int yynerrs;
190*cda5da8dSAndroid Build Coastguard Worker } ]b4_prefix[parse_]_b4_symbol($1, id)[_t;
191*cda5da8dSAndroid Build Coastguard Worker 
192*cda5da8dSAndroid Build Coastguard Worker // Parse one ]_b4_symbol($1, tag)[.
193*cda5da8dSAndroid Build Coastguard Worker ]b4_prefix[parse_]_b4_symbol($1, id)[_t ]b4_prefix[parse_]_b4_symbol($1, id)[ (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[);
194*cda5da8dSAndroid Build Coastguard Worker ]])
195*cda5da8dSAndroid Build Coastguard Worker 
196*cda5da8dSAndroid Build Coastguard Worker 
197*cda5da8dSAndroid Build Coastguard Worker # _b4_first_switching_token
198*cda5da8dSAndroid Build Coastguard Worker # -------------------------
199*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_first], [$1])
200*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_second], [$2])
201*cda5da8dSAndroid Build Coastguard Worker m4_define([_b4_first_switching_token],
202*cda5da8dSAndroid Build Coastguard Worker [b4_second(b4_first(b4_start_symbols))])
203*cda5da8dSAndroid Build Coastguard Worker 
204*cda5da8dSAndroid Build Coastguard Worker 
205*cda5da8dSAndroid Build Coastguard Worker # _b4_define_sub_yyparse(START-SYMBOL-NUM, SWITCHING-TOKEN-SYMBOL-NUM)
206*cda5da8dSAndroid Build Coastguard Worker # --------------------------------------------------------------------
207*cda5da8dSAndroid Build Coastguard Worker # Define the parsing function for START-SYMBOL-NUM.
208*cda5da8dSAndroid Build Coastguard Worker m4_define([_b4_define_sub_yyparse],
209*cda5da8dSAndroid Build Coastguard Worker [[
210*cda5da8dSAndroid Build Coastguard Worker ]b4_prefix[parse_]_b4_symbol($1, id)[_t
211*cda5da8dSAndroid Build Coastguard Worker ]b4_prefix[parse_]_b4_symbol($1, id)[ (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[)
212*cda5da8dSAndroid Build Coastguard Worker {
213*cda5da8dSAndroid Build Coastguard Worker   ]b4_prefix[parse_]_b4_symbol($1, id)[_t yyres;
214*cda5da8dSAndroid Build Coastguard Worker   yy_parse_impl_t yyimpl;
215*cda5da8dSAndroid Build Coastguard Worker   yyres.yystatus = yy_parse_impl (]b4_symbol($2, id)[, &yyimpl]m4_ifset([b4_parse_param],
216*cda5da8dSAndroid Build Coastguard Worker                            [[, ]b4_args(b4_parse_param)])[);]b4_symbol_if([$1], [has_type], [[
217*cda5da8dSAndroid Build Coastguard Worker   yyres.yyvalue = yyimpl.yyvalue.]b4_symbol($1, slot)[;]])[
218*cda5da8dSAndroid Build Coastguard Worker   yyres.yynerrs = yyimpl.yynerrs;
219*cda5da8dSAndroid Build Coastguard Worker   return yyres;
220*cda5da8dSAndroid Build Coastguard Worker }
221*cda5da8dSAndroid Build Coastguard Worker ]])
222*cda5da8dSAndroid Build Coastguard Worker 
223*cda5da8dSAndroid Build Coastguard Worker 
224*cda5da8dSAndroid Build Coastguard Worker # b4_declare_scanner_communication_variables
225*cda5da8dSAndroid Build Coastguard Worker # ------------------------------------------
226*cda5da8dSAndroid Build Coastguard Worker # Declare the variables that are global, or local to YYPARSE if
227*cda5da8dSAndroid Build Coastguard Worker # pure-parser.
228*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_declare_scanner_communication_variables], [[
229*cda5da8dSAndroid Build Coastguard Worker ]m4_ifdef([b4_start_symbols], [],
230*cda5da8dSAndroid Build Coastguard Worker [[/* Lookahead token kind.  */
231*cda5da8dSAndroid Build Coastguard Worker int yychar;
232*cda5da8dSAndroid Build Coastguard Worker ]])[
233*cda5da8dSAndroid Build Coastguard Worker ]b4_pure_if([[
234*cda5da8dSAndroid Build Coastguard Worker /* The semantic value of the lookahead symbol.  */
235*cda5da8dSAndroid Build Coastguard Worker /* Default value used for initialization, for pacifying older GCCs
236*cda5da8dSAndroid Build Coastguard Worker    or non-GCC compilers.  */
237*cda5da8dSAndroid Build Coastguard Worker YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
238*cda5da8dSAndroid Build Coastguard Worker YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);]b4_locations_if([[
239*cda5da8dSAndroid Build Coastguard Worker 
240*cda5da8dSAndroid Build Coastguard Worker /* Location data for the lookahead symbol.  */
241*cda5da8dSAndroid Build Coastguard Worker static YYLTYPE yyloc_default]b4_yyloc_default[;
242*cda5da8dSAndroid Build Coastguard Worker YYLTYPE yylloc = yyloc_default;]])],
243*cda5da8dSAndroid Build Coastguard Worker [[/* The semantic value of the lookahead symbol.  */
244*cda5da8dSAndroid Build Coastguard Worker YYSTYPE yylval;]b4_locations_if([[
245*cda5da8dSAndroid Build Coastguard Worker /* Location data for the lookahead symbol.  */
246*cda5da8dSAndroid Build Coastguard Worker YYLTYPE yylloc]b4_yyloc_default[;]])[
247*cda5da8dSAndroid Build Coastguard Worker /* Number of syntax errors so far.  */
248*cda5da8dSAndroid Build Coastguard Worker int yynerrs;]])])
249*cda5da8dSAndroid Build Coastguard Worker 
250*cda5da8dSAndroid Build Coastguard Worker 
251*cda5da8dSAndroid Build Coastguard Worker # b4_declare_parser_state_variables([INIT])
252*cda5da8dSAndroid Build Coastguard Worker # -----------------------------------------
253*cda5da8dSAndroid Build Coastguard Worker # Declare all the variables that are needed to maintain the parser state
254*cda5da8dSAndroid Build Coastguard Worker # between calls to yypush_parse.
255*cda5da8dSAndroid Build Coastguard Worker # If INIT is non-null, initialize these variables.
256*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_declare_parser_state_variables],
257*cda5da8dSAndroid Build Coastguard Worker [b4_pure_if([[
258*cda5da8dSAndroid Build Coastguard Worker     /* Number of syntax errors so far.  */
259*cda5da8dSAndroid Build Coastguard Worker     int yynerrs]m4_ifval([$1], [ = 0])[;
260*cda5da8dSAndroid Build Coastguard Worker ]])[
261*cda5da8dSAndroid Build Coastguard Worker     yy_state_fast_t yystate]m4_ifval([$1], [ = 0])[;
262*cda5da8dSAndroid Build Coastguard Worker     /* Number of tokens to shift before error messages enabled.  */
263*cda5da8dSAndroid Build Coastguard Worker     int yyerrstatus]m4_ifval([$1], [ = 0])[;
264*cda5da8dSAndroid Build Coastguard Worker 
265*cda5da8dSAndroid Build Coastguard Worker     /* Refer to the stacks through separate pointers, to allow yyoverflow
266*cda5da8dSAndroid Build Coastguard Worker        to reallocate them elsewhere.  */
267*cda5da8dSAndroid Build Coastguard Worker 
268*cda5da8dSAndroid Build Coastguard Worker     /* Their size.  */
269*cda5da8dSAndroid Build Coastguard Worker     YYPTRDIFF_T yystacksize]m4_ifval([$1], [ = YYINITDEPTH])[;
270*cda5da8dSAndroid Build Coastguard Worker 
271*cda5da8dSAndroid Build Coastguard Worker     /* The state stack: array, bottom, top.  */
272*cda5da8dSAndroid Build Coastguard Worker     yy_state_t yyssa[YYINITDEPTH];
273*cda5da8dSAndroid Build Coastguard Worker     yy_state_t *yyss]m4_ifval([$1], [ = yyssa])[;
274*cda5da8dSAndroid Build Coastguard Worker     yy_state_t *yyssp]m4_ifval([$1], [ = yyss])[;
275*cda5da8dSAndroid Build Coastguard Worker 
276*cda5da8dSAndroid Build Coastguard Worker     /* The semantic value stack: array, bottom, top.  */
277*cda5da8dSAndroid Build Coastguard Worker     YYSTYPE yyvsa[YYINITDEPTH];
278*cda5da8dSAndroid Build Coastguard Worker     YYSTYPE *yyvs]m4_ifval([$1], [ = yyvsa])[;
279*cda5da8dSAndroid Build Coastguard Worker     YYSTYPE *yyvsp]m4_ifval([$1], [ = yyvs])[;]b4_locations_if([[
280*cda5da8dSAndroid Build Coastguard Worker 
281*cda5da8dSAndroid Build Coastguard Worker     /* The location stack: array, bottom, top.  */
282*cda5da8dSAndroid Build Coastguard Worker     YYLTYPE yylsa[YYINITDEPTH];
283*cda5da8dSAndroid Build Coastguard Worker     YYLTYPE *yyls]m4_ifval([$1], [ = yylsa])[;
284*cda5da8dSAndroid Build Coastguard Worker     YYLTYPE *yylsp]m4_ifval([$1], [ = yyls])[;]])[]b4_lac_if([[
285*cda5da8dSAndroid Build Coastguard Worker 
286*cda5da8dSAndroid Build Coastguard Worker     yy_state_t yyesa@{]b4_percent_define_get([[parse.lac.es-capacity-initial]])[@};
287*cda5da8dSAndroid Build Coastguard Worker     yy_state_t *yyes]m4_ifval([$1], [ = yyesa])[;
288*cda5da8dSAndroid Build Coastguard Worker     YYPTRDIFF_T yyes_capacity][]m4_ifval([$1],
289*cda5da8dSAndroid Build Coastguard Worker             [m4_do([ = b4_percent_define_get([[parse.lac.es-capacity-initial]]) < YYMAXDEPTH],
290*cda5da8dSAndroid Build Coastguard Worker                    [ ? b4_percent_define_get([[parse.lac.es-capacity-initial]])],
291*cda5da8dSAndroid Build Coastguard Worker                    [ : YYMAXDEPTH])])[;]])])
292*cda5da8dSAndroid Build Coastguard Worker 
293*cda5da8dSAndroid Build Coastguard Worker 
294*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_macro_define],
295*cda5da8dSAndroid Build Coastguard Worker [[#]define $1 $2])
296*cda5da8dSAndroid Build Coastguard Worker 
297*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_macro_undef],
298*cda5da8dSAndroid Build Coastguard Worker [[#]undef $1])
299*cda5da8dSAndroid Build Coastguard Worker 
300*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_pstate_macro_define],
301*cda5da8dSAndroid Build Coastguard Worker [b4_macro_define([$1], [yyps->$1])])
302*cda5da8dSAndroid Build Coastguard Worker 
303*cda5da8dSAndroid Build Coastguard Worker # b4_parse_state_variable_macros(b4_macro_define|b4_macro_undef)
304*cda5da8dSAndroid Build Coastguard Worker # --------------------------------------------------------------
305*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_parse_state_variable_macros],
306*cda5da8dSAndroid Build Coastguard Worker [b4_pure_if([$1([b4_prefix[]nerrs])])
307*cda5da8dSAndroid Build Coastguard Worker $1([yystate])
308*cda5da8dSAndroid Build Coastguard Worker $1([yyerrstatus])
309*cda5da8dSAndroid Build Coastguard Worker $1([yyssa])
310*cda5da8dSAndroid Build Coastguard Worker $1([yyss])
311*cda5da8dSAndroid Build Coastguard Worker $1([yyssp])
312*cda5da8dSAndroid Build Coastguard Worker $1([yyvsa])
313*cda5da8dSAndroid Build Coastguard Worker $1([yyvs])
314*cda5da8dSAndroid Build Coastguard Worker $1([yyvsp])[]b4_locations_if([
315*cda5da8dSAndroid Build Coastguard Worker $1([yylsa])
316*cda5da8dSAndroid Build Coastguard Worker $1([yyls])
317*cda5da8dSAndroid Build Coastguard Worker $1([yylsp])])
318*cda5da8dSAndroid Build Coastguard Worker $1([yystacksize])[]b4_lac_if([
319*cda5da8dSAndroid Build Coastguard Worker $1([yyesa])
320*cda5da8dSAndroid Build Coastguard Worker $1([yyes])
321*cda5da8dSAndroid Build Coastguard Worker $1([yyes_capacity])])])
322*cda5da8dSAndroid Build Coastguard Worker 
323*cda5da8dSAndroid Build Coastguard Worker 
324*cda5da8dSAndroid Build Coastguard Worker 
325*cda5da8dSAndroid Build Coastguard Worker 
326*cda5da8dSAndroid Build Coastguard Worker # _b4_declare_yyparse_push
327*cda5da8dSAndroid Build Coastguard Worker # ------------------------
328*cda5da8dSAndroid Build Coastguard Worker # Declaration of yyparse (and dependencies) when using the push parser
329*cda5da8dSAndroid Build Coastguard Worker # (including in pull mode).
330*cda5da8dSAndroid Build Coastguard Worker m4_define([_b4_declare_yyparse_push],
331*cda5da8dSAndroid Build Coastguard Worker [[#ifndef YYPUSH_MORE_DEFINED
332*cda5da8dSAndroid Build Coastguard Worker # define YYPUSH_MORE_DEFINED
333*cda5da8dSAndroid Build Coastguard Worker enum { YYPUSH_MORE = 4 };
334*cda5da8dSAndroid Build Coastguard Worker #endif
335*cda5da8dSAndroid Build Coastguard Worker 
336*cda5da8dSAndroid Build Coastguard Worker typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
337*cda5da8dSAndroid Build Coastguard Worker 
338*cda5da8dSAndroid Build Coastguard Worker ]b4_pull_if([[
339*cda5da8dSAndroid Build Coastguard Worker int ]b4_prefix[parse (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[);]])[
340*cda5da8dSAndroid Build Coastguard Worker int ]b4_prefix[push_parse (]b4_prefix[pstate *ps]b4_pure_if([[,
341*cda5da8dSAndroid Build Coastguard Worker                   int pushed_char, ]b4_api_PREFIX[STYPE const *pushed_val]b4_locations_if([[, ]b4_api_PREFIX[LTYPE *pushed_loc]])])b4_user_formals[);
342*cda5da8dSAndroid Build Coastguard Worker ]b4_pull_if([[int ]b4_prefix[pull_parse (]b4_prefix[pstate *ps]b4_user_formals[);]])[
343*cda5da8dSAndroid Build Coastguard Worker ]b4_prefix[pstate *]b4_prefix[pstate_new (void);
344*cda5da8dSAndroid Build Coastguard Worker void ]b4_prefix[pstate_delete (]b4_prefix[pstate *ps);
345*cda5da8dSAndroid Build Coastguard Worker ]])
346*cda5da8dSAndroid Build Coastguard Worker 
347*cda5da8dSAndroid Build Coastguard Worker 
348*cda5da8dSAndroid Build Coastguard Worker # _b4_declare_yyparse
349*cda5da8dSAndroid Build Coastguard Worker # -------------------
350*cda5da8dSAndroid Build Coastguard Worker # When not the push parser.
351*cda5da8dSAndroid Build Coastguard Worker m4_define([_b4_declare_yyparse],
352*cda5da8dSAndroid Build Coastguard Worker [[int ]b4_prefix[parse (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[);
353*cda5da8dSAndroid Build Coastguard Worker ]m4_ifdef([b4_start_symbols],
354*cda5da8dSAndroid Build Coastguard Worker           [m4_map([_b4_declare_sub_yyparse], m4_defn([b4_start_symbols]))])])
355*cda5da8dSAndroid Build Coastguard Worker 
356*cda5da8dSAndroid Build Coastguard Worker 
357*cda5da8dSAndroid Build Coastguard Worker # b4_declare_yyparse
358*cda5da8dSAndroid Build Coastguard Worker # ------------------
359*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_declare_yyparse],
360*cda5da8dSAndroid Build Coastguard Worker [b4_push_if([_b4_declare_yyparse_push],
361*cda5da8dSAndroid Build Coastguard Worker             [_b4_declare_yyparse])[]dnl
362*cda5da8dSAndroid Build Coastguard Worker ])
363*cda5da8dSAndroid Build Coastguard Worker 
364*cda5da8dSAndroid Build Coastguard Worker 
365*cda5da8dSAndroid Build Coastguard Worker # b4_declare_yyerror_and_yylex
366*cda5da8dSAndroid Build Coastguard Worker # ----------------------------
367*cda5da8dSAndroid Build Coastguard Worker # Comply with POSIX Yacc.
368*cda5da8dSAndroid Build Coastguard Worker # <https://austingroupbugs.net/view.php?id=1388#c5220>
369*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_declare_yyerror_and_yylex],
370*cda5da8dSAndroid Build Coastguard Worker [b4_posix_if([[#if !defined ]b4_prefix[error && !defined ]b4_api_PREFIX[ERROR_IS_DECLARED
371*cda5da8dSAndroid Build Coastguard Worker ]b4_function_declare([b4_prefix[error]], void, b4_yyerror_formals)[
372*cda5da8dSAndroid Build Coastguard Worker #endif
373*cda5da8dSAndroid Build Coastguard Worker #if !defined ]b4_prefix[lex && !defined ]b4_api_PREFIX[LEX_IS_DECLARED
374*cda5da8dSAndroid Build Coastguard Worker ]b4_function_declare([b4_prefix[lex]], int, b4_yylex_formals)[
375*cda5da8dSAndroid Build Coastguard Worker #endif
376*cda5da8dSAndroid Build Coastguard Worker ]])dnl
377*cda5da8dSAndroid Build Coastguard Worker ])
378*cda5da8dSAndroid Build Coastguard Worker 
379*cda5da8dSAndroid Build Coastguard Worker 
380*cda5da8dSAndroid Build Coastguard Worker # b4_shared_declarations
381*cda5da8dSAndroid Build Coastguard Worker # ----------------------
382*cda5da8dSAndroid Build Coastguard Worker # Declarations that might either go into the header (if --header)
383*cda5da8dSAndroid Build Coastguard Worker # or into the implementation file.
384*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_shared_declarations],
385*cda5da8dSAndroid Build Coastguard Worker [b4_cpp_guard_open([b4_spec_mapped_header_file])[
386*cda5da8dSAndroid Build Coastguard Worker ]b4_declare_yydebug[
387*cda5da8dSAndroid Build Coastguard Worker ]b4_percent_code_get([[requires]])[
388*cda5da8dSAndroid Build Coastguard Worker ]b4_token_enums_defines[
389*cda5da8dSAndroid Build Coastguard Worker ]b4_declare_yylstype[
390*cda5da8dSAndroid Build Coastguard Worker ]b4_declare_yyerror_and_yylex[
391*cda5da8dSAndroid Build Coastguard Worker ]b4_declare_yyparse[
392*cda5da8dSAndroid Build Coastguard Worker ]b4_percent_code_get([[provides]])[
393*cda5da8dSAndroid Build Coastguard Worker ]b4_cpp_guard_close([b4_spec_mapped_header_file])[]dnl
394*cda5da8dSAndroid Build Coastguard Worker ])
395*cda5da8dSAndroid Build Coastguard Worker 
396*cda5da8dSAndroid Build Coastguard Worker 
397*cda5da8dSAndroid Build Coastguard Worker # b4_header_include_if(IF-TRUE, IF-FALSE)
398*cda5da8dSAndroid Build Coastguard Worker # ---------------------------------------
399*cda5da8dSAndroid Build Coastguard Worker # Run IF-TRUE if we generate an output file and api.header.include
400*cda5da8dSAndroid Build Coastguard Worker # is defined.
401*cda5da8dSAndroid Build Coastguard Worker m4_define([b4_header_include_if],
402*cda5da8dSAndroid Build Coastguard Worker [m4_ifval(m4_quote(b4_spec_header_file),
403*cda5da8dSAndroid Build Coastguard Worker           [b4_percent_define_ifdef([[api.header.include]],
404*cda5da8dSAndroid Build Coastguard Worker                                    [$1],
405*cda5da8dSAndroid Build Coastguard Worker                                    [$2])],
406*cda5da8dSAndroid Build Coastguard Worker           [$2])])
407*cda5da8dSAndroid Build Coastguard Worker 
408*cda5da8dSAndroid Build Coastguard Worker m4_if(b4_spec_header_file, [y.tab.h], [],
409*cda5da8dSAndroid Build Coastguard Worker       [b4_percent_define_default([[api.header.include]],
410*cda5da8dSAndroid Build Coastguard Worker                                  [["@basename(]b4_spec_header_file[@)"]])])
411*cda5da8dSAndroid Build Coastguard Worker 
412*cda5da8dSAndroid Build Coastguard Worker 
413*cda5da8dSAndroid Build Coastguard Worker 
414*cda5da8dSAndroid Build Coastguard Worker 
415*cda5da8dSAndroid Build Coastguard Worker ## -------------- ##
416*cda5da8dSAndroid Build Coastguard Worker ## Output files.  ##
417*cda5da8dSAndroid Build Coastguard Worker ## -------------- ##
418*cda5da8dSAndroid Build Coastguard Worker 
419*cda5da8dSAndroid Build Coastguard Worker 
420*cda5da8dSAndroid Build Coastguard Worker b4_header_if([[
421*cda5da8dSAndroid Build Coastguard Worker ]b4_output_begin([b4_spec_header_file])[
422*cda5da8dSAndroid Build Coastguard Worker ]b4_copyright([Bison interface for Yacc-like parsers in C])[
423*cda5da8dSAndroid Build Coastguard Worker ]b4_disclaimer[
424*cda5da8dSAndroid Build Coastguard Worker ]b4_shared_declarations[
425*cda5da8dSAndroid Build Coastguard Worker ]b4_output_end[
426*cda5da8dSAndroid Build Coastguard Worker ]])# b4_header_if
427*cda5da8dSAndroid Build Coastguard Worker 
428*cda5da8dSAndroid Build Coastguard Worker b4_output_begin([b4_parser_file_name])[
429*cda5da8dSAndroid Build Coastguard Worker ]b4_copyright([Bison implementation for Yacc-like parsers in C])[
430*cda5da8dSAndroid Build Coastguard Worker /* C LALR(1) parser skeleton written by Richard Stallman, by
431*cda5da8dSAndroid Build Coastguard Worker    simplifying the original so-called "semantic" parser.  */
432*cda5da8dSAndroid Build Coastguard Worker 
433*cda5da8dSAndroid Build Coastguard Worker ]b4_disclaimer[
434*cda5da8dSAndroid Build Coastguard Worker /* All symbols defined below should begin with yy or YY, to avoid
435*cda5da8dSAndroid Build Coastguard Worker    infringing on user name space.  This should be done even for local
436*cda5da8dSAndroid Build Coastguard Worker    variables, as they might otherwise be expanded by user macros.
437*cda5da8dSAndroid Build Coastguard Worker    There are some unavoidable exceptions within include files to
438*cda5da8dSAndroid Build Coastguard Worker    define necessary library symbols; they are noted "INFRINGES ON
439*cda5da8dSAndroid Build Coastguard Worker    USER NAME SPACE" below.  */
440*cda5da8dSAndroid Build Coastguard Worker 
441*cda5da8dSAndroid Build Coastguard Worker ]b4_identification[
442*cda5da8dSAndroid Build Coastguard Worker ]b4_percent_code_get([[top]])[]dnl
443*cda5da8dSAndroid Build Coastguard Worker m4_if(b4_api_prefix, [yy], [],
444*cda5da8dSAndroid Build Coastguard Worker [[/* Substitute the type names.  */
445*cda5da8dSAndroid Build Coastguard Worker #define YYSTYPE         ]b4_api_PREFIX[STYPE]b4_locations_if([[
446*cda5da8dSAndroid Build Coastguard Worker #define YYLTYPE         ]b4_api_PREFIX[LTYPE]])])[
447*cda5da8dSAndroid Build Coastguard Worker ]m4_if(b4_prefix, [yy], [],
448*cda5da8dSAndroid Build Coastguard Worker [[/* Substitute the variable and function names.  */]b4_pull_if([[
449*cda5da8dSAndroid Build Coastguard Worker #define yyparse         ]b4_prefix[parse]])b4_push_if([[
450*cda5da8dSAndroid Build Coastguard Worker #define yypush_parse    ]b4_prefix[push_parse]b4_pull_if([[
451*cda5da8dSAndroid Build Coastguard Worker #define yypull_parse    ]b4_prefix[pull_parse]])[
452*cda5da8dSAndroid Build Coastguard Worker #define yypstate_new    ]b4_prefix[pstate_new
453*cda5da8dSAndroid Build Coastguard Worker #define yypstate_clear  ]b4_prefix[pstate_clear
454*cda5da8dSAndroid Build Coastguard Worker #define yypstate_delete ]b4_prefix[pstate_delete
455*cda5da8dSAndroid Build Coastguard Worker #define yypstate        ]b4_prefix[pstate]])[
456*cda5da8dSAndroid Build Coastguard Worker #define yylex           ]b4_prefix[lex
457*cda5da8dSAndroid Build Coastguard Worker #define yyerror         ]b4_prefix[error
458*cda5da8dSAndroid Build Coastguard Worker #define yydebug         ]b4_prefix[debug
459*cda5da8dSAndroid Build Coastguard Worker #define yynerrs         ]b4_prefix[nerrs]]b4_pure_if([], [[
460*cda5da8dSAndroid Build Coastguard Worker #define yylval          ]b4_prefix[lval
461*cda5da8dSAndroid Build Coastguard Worker #define yychar          ]b4_prefix[char]b4_locations_if([[
462*cda5da8dSAndroid Build Coastguard Worker #define yylloc          ]b4_prefix[lloc]])]))[
463*cda5da8dSAndroid Build Coastguard Worker 
464*cda5da8dSAndroid Build Coastguard Worker ]b4_user_pre_prologue[
465*cda5da8dSAndroid Build Coastguard Worker ]b4_cast_define[
466*cda5da8dSAndroid Build Coastguard Worker ]b4_null_define[
467*cda5da8dSAndroid Build Coastguard Worker 
468*cda5da8dSAndroid Build Coastguard Worker ]b4_header_include_if([[#include ]b4_percent_define_get([[api.header.include]])],
469*cda5da8dSAndroid Build Coastguard Worker                       [m4_ifval(m4_quote(b4_spec_header_file),
470*cda5da8dSAndroid Build Coastguard Worker                                 [/* Use api.header.include to #include this header
471*cda5da8dSAndroid Build Coastguard Worker    instead of duplicating it here.  */
472*cda5da8dSAndroid Build Coastguard Worker ])b4_shared_declarations])[
473*cda5da8dSAndroid Build Coastguard Worker ]b4_declare_symbol_enum[
474*cda5da8dSAndroid Build Coastguard Worker 
475*cda5da8dSAndroid Build Coastguard Worker ]b4_user_post_prologue[
476*cda5da8dSAndroid Build Coastguard Worker ]b4_percent_code_get[
477*cda5da8dSAndroid Build Coastguard Worker ]b4_c99_int_type_define[
478*cda5da8dSAndroid Build Coastguard Worker 
479*cda5da8dSAndroid Build Coastguard Worker ]b4_sizes_types_define[
480*cda5da8dSAndroid Build Coastguard Worker 
481*cda5da8dSAndroid Build Coastguard Worker /* Stored state numbers (used for stacks). */
482*cda5da8dSAndroid Build Coastguard Worker typedef ]b4_int_type(0, m4_eval(b4_states_number - 1))[ yy_state_t;
483*cda5da8dSAndroid Build Coastguard Worker 
484*cda5da8dSAndroid Build Coastguard Worker /* State numbers in computations.  */
485*cda5da8dSAndroid Build Coastguard Worker typedef int yy_state_fast_t;
486*cda5da8dSAndroid Build Coastguard Worker 
487*cda5da8dSAndroid Build Coastguard Worker #ifndef YY_
488*cda5da8dSAndroid Build Coastguard Worker # if defined YYENABLE_NLS && YYENABLE_NLS
489*cda5da8dSAndroid Build Coastguard Worker #  if ENABLE_NLS
490*cda5da8dSAndroid Build Coastguard Worker #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
491*cda5da8dSAndroid Build Coastguard Worker #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
492*cda5da8dSAndroid Build Coastguard Worker #  endif
493*cda5da8dSAndroid Build Coastguard Worker # endif
494*cda5da8dSAndroid Build Coastguard Worker # ifndef YY_
495*cda5da8dSAndroid Build Coastguard Worker #  define YY_(Msgid) Msgid
496*cda5da8dSAndroid Build Coastguard Worker # endif
497*cda5da8dSAndroid Build Coastguard Worker #endif
498*cda5da8dSAndroid Build Coastguard Worker ]b4_has_translations_if([
499*cda5da8dSAndroid Build Coastguard Worker #ifndef N_
500*cda5da8dSAndroid Build Coastguard Worker # define N_(Msgid) Msgid
501*cda5da8dSAndroid Build Coastguard Worker #endif
502*cda5da8dSAndroid Build Coastguard Worker ])[
503*cda5da8dSAndroid Build Coastguard Worker 
504*cda5da8dSAndroid Build Coastguard Worker ]b4_attribute_define[
505*cda5da8dSAndroid Build Coastguard Worker 
506*cda5da8dSAndroid Build Coastguard Worker ]b4_parse_assert_if([[#ifdef NDEBUG
507*cda5da8dSAndroid Build Coastguard Worker # define YY_ASSERT(E) ((void) (0 && (E)))
508*cda5da8dSAndroid Build Coastguard Worker #else
509*cda5da8dSAndroid Build Coastguard Worker # include <assert.h> /* INFRINGES ON USER NAME SPACE */
510*cda5da8dSAndroid Build Coastguard Worker # define YY_ASSERT(E) assert (E)
511*cda5da8dSAndroid Build Coastguard Worker #endif
512*cda5da8dSAndroid Build Coastguard Worker ]],
513*cda5da8dSAndroid Build Coastguard Worker [[#define YY_ASSERT(E) ((void) (0 && (E)))]])[
514*cda5da8dSAndroid Build Coastguard Worker 
515*cda5da8dSAndroid Build Coastguard Worker #if ]b4_lac_if([[1]], [b4_parse_error_case([simple], [[!defined yyoverflow]], [[1]])])[
516*cda5da8dSAndroid Build Coastguard Worker 
517*cda5da8dSAndroid Build Coastguard Worker /* The parser invokes alloca or malloc; define the necessary symbols.  */]dnl
518*cda5da8dSAndroid Build Coastguard Worker b4_push_if([], [b4_lac_if([], [[
519*cda5da8dSAndroid Build Coastguard Worker 
520*cda5da8dSAndroid Build Coastguard Worker # ifdef YYSTACK_USE_ALLOCA
521*cda5da8dSAndroid Build Coastguard Worker #  if YYSTACK_USE_ALLOCA
522*cda5da8dSAndroid Build Coastguard Worker #   ifdef __GNUC__
523*cda5da8dSAndroid Build Coastguard Worker #    define YYSTACK_ALLOC __builtin_alloca
524*cda5da8dSAndroid Build Coastguard Worker #   elif defined __BUILTIN_VA_ARG_INCR
525*cda5da8dSAndroid Build Coastguard Worker #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
526*cda5da8dSAndroid Build Coastguard Worker #   elif defined _AIX
527*cda5da8dSAndroid Build Coastguard Worker #    define YYSTACK_ALLOC __alloca
528*cda5da8dSAndroid Build Coastguard Worker #   elif defined _MSC_VER
529*cda5da8dSAndroid Build Coastguard Worker #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
530*cda5da8dSAndroid Build Coastguard Worker #    define alloca _alloca
531*cda5da8dSAndroid Build Coastguard Worker #   else
532*cda5da8dSAndroid Build Coastguard Worker #    define YYSTACK_ALLOC alloca
533*cda5da8dSAndroid Build Coastguard Worker #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
534*cda5da8dSAndroid Build Coastguard Worker #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
535*cda5da8dSAndroid Build Coastguard Worker       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
536*cda5da8dSAndroid Build Coastguard Worker #     ifndef EXIT_SUCCESS
537*cda5da8dSAndroid Build Coastguard Worker #      define EXIT_SUCCESS 0
538*cda5da8dSAndroid Build Coastguard Worker #     endif
539*cda5da8dSAndroid Build Coastguard Worker #    endif
540*cda5da8dSAndroid Build Coastguard Worker #   endif
541*cda5da8dSAndroid Build Coastguard Worker #  endif
542*cda5da8dSAndroid Build Coastguard Worker # endif]])])[
543*cda5da8dSAndroid Build Coastguard Worker 
544*cda5da8dSAndroid Build Coastguard Worker # ifdef YYSTACK_ALLOC
545*cda5da8dSAndroid Build Coastguard Worker    /* Pacify GCC's 'empty if-body' warning.  */
546*cda5da8dSAndroid Build Coastguard Worker #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
547*cda5da8dSAndroid Build Coastguard Worker #  ifndef YYSTACK_ALLOC_MAXIMUM
548*cda5da8dSAndroid Build Coastguard Worker     /* The OS might guarantee only one guard page at the bottom of the stack,
549*cda5da8dSAndroid Build Coastguard Worker        and a page size can be as small as 4096 bytes.  So we cannot safely
550*cda5da8dSAndroid Build Coastguard Worker        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
551*cda5da8dSAndroid Build Coastguard Worker        to allow for a few compiler-allocated temporary stack slots.  */
552*cda5da8dSAndroid Build Coastguard Worker #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
553*cda5da8dSAndroid Build Coastguard Worker #  endif
554*cda5da8dSAndroid Build Coastguard Worker # else
555*cda5da8dSAndroid Build Coastguard Worker #  define YYSTACK_ALLOC YYMALLOC
556*cda5da8dSAndroid Build Coastguard Worker #  define YYSTACK_FREE YYFREE
557*cda5da8dSAndroid Build Coastguard Worker #  ifndef YYSTACK_ALLOC_MAXIMUM
558*cda5da8dSAndroid Build Coastguard Worker #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
559*cda5da8dSAndroid Build Coastguard Worker #  endif
560*cda5da8dSAndroid Build Coastguard Worker #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
561*cda5da8dSAndroid Build Coastguard Worker        && ! ((defined YYMALLOC || defined malloc) \
562*cda5da8dSAndroid Build Coastguard Worker              && (defined YYFREE || defined free)))
563*cda5da8dSAndroid Build Coastguard Worker #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
564*cda5da8dSAndroid Build Coastguard Worker #   ifndef EXIT_SUCCESS
565*cda5da8dSAndroid Build Coastguard Worker #    define EXIT_SUCCESS 0
566*cda5da8dSAndroid Build Coastguard Worker #   endif
567*cda5da8dSAndroid Build Coastguard Worker #  endif
568*cda5da8dSAndroid Build Coastguard Worker #  ifndef YYMALLOC
569*cda5da8dSAndroid Build Coastguard Worker #   define YYMALLOC malloc
570*cda5da8dSAndroid Build Coastguard Worker #   if ! defined malloc && ! defined EXIT_SUCCESS
571*cda5da8dSAndroid Build Coastguard Worker void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
572*cda5da8dSAndroid Build Coastguard Worker #   endif
573*cda5da8dSAndroid Build Coastguard Worker #  endif
574*cda5da8dSAndroid Build Coastguard Worker #  ifndef YYFREE
575*cda5da8dSAndroid Build Coastguard Worker #   define YYFREE free
576*cda5da8dSAndroid Build Coastguard Worker #   if ! defined free && ! defined EXIT_SUCCESS
577*cda5da8dSAndroid Build Coastguard Worker void free (void *); /* INFRINGES ON USER NAME SPACE */
578*cda5da8dSAndroid Build Coastguard Worker #   endif
579*cda5da8dSAndroid Build Coastguard Worker #  endif
580*cda5da8dSAndroid Build Coastguard Worker # endif]b4_lac_if([[
581*cda5da8dSAndroid Build Coastguard Worker # define YYCOPY_NEEDED 1]])[
582*cda5da8dSAndroid Build Coastguard Worker #endif /* ]b4_lac_if([[1]], [b4_parse_error_case([simple], [[!defined yyoverflow]], [[1]])])[ */
583*cda5da8dSAndroid Build Coastguard Worker 
584*cda5da8dSAndroid Build Coastguard Worker #if (! defined yyoverflow \
585*cda5da8dSAndroid Build Coastguard Worker      && (! defined __cplusplus \
586*cda5da8dSAndroid Build Coastguard Worker          || (]b4_locations_if([[defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL \
587*cda5da8dSAndroid Build Coastguard Worker              && ]])[defined ]b4_api_PREFIX[STYPE_IS_TRIVIAL && ]b4_api_PREFIX[STYPE_IS_TRIVIAL)))
588*cda5da8dSAndroid Build Coastguard Worker 
589*cda5da8dSAndroid Build Coastguard Worker /* A type that is properly aligned for any stack member.  */
590*cda5da8dSAndroid Build Coastguard Worker union yyalloc
591*cda5da8dSAndroid Build Coastguard Worker {
592*cda5da8dSAndroid Build Coastguard Worker   yy_state_t yyss_alloc;
593*cda5da8dSAndroid Build Coastguard Worker   YYSTYPE yyvs_alloc;]b4_locations_if([
594*cda5da8dSAndroid Build Coastguard Worker   YYLTYPE yyls_alloc;])[
595*cda5da8dSAndroid Build Coastguard Worker };
596*cda5da8dSAndroid Build Coastguard Worker 
597*cda5da8dSAndroid Build Coastguard Worker /* The size of the maximum gap between one aligned stack and the next.  */
598*cda5da8dSAndroid Build Coastguard Worker # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
599*cda5da8dSAndroid Build Coastguard Worker 
600*cda5da8dSAndroid Build Coastguard Worker /* The size of an array large to enough to hold all stacks, each with
601*cda5da8dSAndroid Build Coastguard Worker    N elements.  */
602*cda5da8dSAndroid Build Coastguard Worker ]b4_locations_if(
603*cda5da8dSAndroid Build Coastguard Worker [# define YYSTACK_BYTES(N) \
604*cda5da8dSAndroid Build Coastguard Worker      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
605*cda5da8dSAndroid Build Coastguard Worker              + YYSIZEOF (YYLTYPE)) \
606*cda5da8dSAndroid Build Coastguard Worker       + 2 * YYSTACK_GAP_MAXIMUM)],
607*cda5da8dSAndroid Build Coastguard Worker [# define YYSTACK_BYTES(N) \
608*cda5da8dSAndroid Build Coastguard Worker      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
609*cda5da8dSAndroid Build Coastguard Worker       + YYSTACK_GAP_MAXIMUM)])[
610*cda5da8dSAndroid Build Coastguard Worker 
611*cda5da8dSAndroid Build Coastguard Worker # define YYCOPY_NEEDED 1
612*cda5da8dSAndroid Build Coastguard Worker 
613*cda5da8dSAndroid Build Coastguard Worker /* Relocate STACK from its old location to the new one.  The
614*cda5da8dSAndroid Build Coastguard Worker    local variables YYSIZE and YYSTACKSIZE give the old and new number of
615*cda5da8dSAndroid Build Coastguard Worker    elements in the stack, and YYPTR gives the new location of the
616*cda5da8dSAndroid Build Coastguard Worker    stack.  Advance YYPTR to a properly aligned location for the next
617*cda5da8dSAndroid Build Coastguard Worker    stack.  */
618*cda5da8dSAndroid Build Coastguard Worker # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
619*cda5da8dSAndroid Build Coastguard Worker     do                                                                  \
620*cda5da8dSAndroid Build Coastguard Worker       {                                                                 \
621*cda5da8dSAndroid Build Coastguard Worker         YYPTRDIFF_T yynewbytes;                                         \
622*cda5da8dSAndroid Build Coastguard Worker         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
623*cda5da8dSAndroid Build Coastguard Worker         Stack = &yyptr->Stack_alloc;                                    \
624*cda5da8dSAndroid Build Coastguard Worker         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
625*cda5da8dSAndroid Build Coastguard Worker         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
626*cda5da8dSAndroid Build Coastguard Worker       }                                                                 \
627*cda5da8dSAndroid Build Coastguard Worker     while (0)
628*cda5da8dSAndroid Build Coastguard Worker 
629*cda5da8dSAndroid Build Coastguard Worker #endif
630*cda5da8dSAndroid Build Coastguard Worker 
631*cda5da8dSAndroid Build Coastguard Worker #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
632*cda5da8dSAndroid Build Coastguard Worker /* Copy COUNT objects from SRC to DST.  The source and destination do
633*cda5da8dSAndroid Build Coastguard Worker    not overlap.  */
634*cda5da8dSAndroid Build Coastguard Worker # ifndef YYCOPY
635*cda5da8dSAndroid Build Coastguard Worker #  if defined __GNUC__ && 1 < __GNUC__
636*cda5da8dSAndroid Build Coastguard Worker #   define YYCOPY(Dst, Src, Count) \
637*cda5da8dSAndroid Build Coastguard Worker       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
638*cda5da8dSAndroid Build Coastguard Worker #  else
639*cda5da8dSAndroid Build Coastguard Worker #   define YYCOPY(Dst, Src, Count)              \
640*cda5da8dSAndroid Build Coastguard Worker       do                                        \
641*cda5da8dSAndroid Build Coastguard Worker         {                                       \
642*cda5da8dSAndroid Build Coastguard Worker           YYPTRDIFF_T yyi;                      \
643*cda5da8dSAndroid Build Coastguard Worker           for (yyi = 0; yyi < (Count); yyi++)   \
644*cda5da8dSAndroid Build Coastguard Worker             (Dst)[yyi] = (Src)[yyi];            \
645*cda5da8dSAndroid Build Coastguard Worker         }                                       \
646*cda5da8dSAndroid Build Coastguard Worker       while (0)
647*cda5da8dSAndroid Build Coastguard Worker #  endif
648*cda5da8dSAndroid Build Coastguard Worker # endif
649*cda5da8dSAndroid Build Coastguard Worker #endif /* !YYCOPY_NEEDED */
650*cda5da8dSAndroid Build Coastguard Worker 
651*cda5da8dSAndroid Build Coastguard Worker /* YYFINAL -- State number of the termination state.  */
652*cda5da8dSAndroid Build Coastguard Worker #define YYFINAL  ]b4_final_state_number[
653*cda5da8dSAndroid Build Coastguard Worker /* YYLAST -- Last index in YYTABLE.  */
654*cda5da8dSAndroid Build Coastguard Worker #define YYLAST   ]b4_last[
655*cda5da8dSAndroid Build Coastguard Worker 
656*cda5da8dSAndroid Build Coastguard Worker /* YYNTOKENS -- Number of terminals.  */
657*cda5da8dSAndroid Build Coastguard Worker #define YYNTOKENS  ]b4_tokens_number[
658*cda5da8dSAndroid Build Coastguard Worker /* YYNNTS -- Number of nonterminals.  */
659*cda5da8dSAndroid Build Coastguard Worker #define YYNNTS  ]b4_nterms_number[
660*cda5da8dSAndroid Build Coastguard Worker /* YYNRULES -- Number of rules.  */
661*cda5da8dSAndroid Build Coastguard Worker #define YYNRULES  ]b4_rules_number[
662*cda5da8dSAndroid Build Coastguard Worker /* YYNSTATES -- Number of states.  */
663*cda5da8dSAndroid Build Coastguard Worker #define YYNSTATES  ]b4_states_number[
664*cda5da8dSAndroid Build Coastguard Worker 
665*cda5da8dSAndroid Build Coastguard Worker /* YYMAXUTOK -- Last valid token kind.  */
666*cda5da8dSAndroid Build Coastguard Worker #define YYMAXUTOK   ]b4_code_max[
667*cda5da8dSAndroid Build Coastguard Worker 
668*cda5da8dSAndroid Build Coastguard Worker 
669*cda5da8dSAndroid Build Coastguard Worker /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
670*cda5da8dSAndroid Build Coastguard Worker    as returned by yylex, with out-of-bounds checking.  */
671*cda5da8dSAndroid Build Coastguard Worker ]b4_api_token_raw_if(dnl
672*cda5da8dSAndroid Build Coastguard Worker [[#define YYTRANSLATE(YYX) YY_CAST (yysymbol_kind_t, YYX)]],
673*cda5da8dSAndroid Build Coastguard Worker [[#define YYTRANSLATE(YYX)                                \
674*cda5da8dSAndroid Build Coastguard Worker   (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
675*cda5da8dSAndroid Build Coastguard Worker    ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
676*cda5da8dSAndroid Build Coastguard Worker    : ]b4_symbol_prefix[YYUNDEF)
677*cda5da8dSAndroid Build Coastguard Worker 
678*cda5da8dSAndroid Build Coastguard Worker /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
679*cda5da8dSAndroid Build Coastguard Worker    as returned by yylex.  */
680*cda5da8dSAndroid Build Coastguard Worker static const ]b4_int_type_for([b4_translate])[ yytranslate[] =
681*cda5da8dSAndroid Build Coastguard Worker {
682*cda5da8dSAndroid Build Coastguard Worker   ]b4_translate[
683*cda5da8dSAndroid Build Coastguard Worker };]])[
684*cda5da8dSAndroid Build Coastguard Worker 
685*cda5da8dSAndroid Build Coastguard Worker #if ]b4_api_PREFIX[DEBUG
686*cda5da8dSAndroid Build Coastguard Worker ]b4_integral_parser_table_define([rline], [b4_rline],
687*cda5da8dSAndroid Build Coastguard Worker      [[YYRLINE[YYN] -- Source line where rule number YYN was defined.]])[
688*cda5da8dSAndroid Build Coastguard Worker #endif
689*cda5da8dSAndroid Build Coastguard Worker 
690*cda5da8dSAndroid Build Coastguard Worker /** Accessing symbol of state STATE.  */
691*cda5da8dSAndroid Build Coastguard Worker #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
692*cda5da8dSAndroid Build Coastguard Worker 
693*cda5da8dSAndroid Build Coastguard Worker #if ]b4_parse_error_case([simple], [b4_api_PREFIX[DEBUG || ]b4_token_table_flag], [[1]])[
694*cda5da8dSAndroid Build Coastguard Worker /* The user-facing name of the symbol whose (internal) number is
695*cda5da8dSAndroid Build Coastguard Worker    YYSYMBOL.  No bounds checking.  */
696*cda5da8dSAndroid Build Coastguard Worker static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
697*cda5da8dSAndroid Build Coastguard Worker 
698*cda5da8dSAndroid Build Coastguard Worker ]b4_parse_error_bmatch([simple\|verbose],
699*cda5da8dSAndroid Build Coastguard Worker [[/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
700*cda5da8dSAndroid Build Coastguard Worker    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
701*cda5da8dSAndroid Build Coastguard Worker static const char *const yytname[] =
702*cda5da8dSAndroid Build Coastguard Worker {
703*cda5da8dSAndroid Build Coastguard Worker   ]b4_tname[
704*cda5da8dSAndroid Build Coastguard Worker };
705*cda5da8dSAndroid Build Coastguard Worker 
706*cda5da8dSAndroid Build Coastguard Worker static const char *
707*cda5da8dSAndroid Build Coastguard Worker yysymbol_name (yysymbol_kind_t yysymbol)
708*cda5da8dSAndroid Build Coastguard Worker {
709*cda5da8dSAndroid Build Coastguard Worker   return yytname[yysymbol];
710*cda5da8dSAndroid Build Coastguard Worker }]],
711*cda5da8dSAndroid Build Coastguard Worker [[static const char *
712*cda5da8dSAndroid Build Coastguard Worker yysymbol_name (yysymbol_kind_t yysymbol)
713*cda5da8dSAndroid Build Coastguard Worker {
714*cda5da8dSAndroid Build Coastguard Worker   static const char *const yy_sname[] =
715*cda5da8dSAndroid Build Coastguard Worker   {
716*cda5da8dSAndroid Build Coastguard Worker   ]b4_symbol_names[
717*cda5da8dSAndroid Build Coastguard Worker   };]b4_has_translations_if([[
718*cda5da8dSAndroid Build Coastguard Worker   /* YYTRANSLATABLE[SYMBOL-NUM] -- Whether YY_SNAME[SYMBOL-NUM] is
719*cda5da8dSAndroid Build Coastguard Worker      internationalizable.  */
720*cda5da8dSAndroid Build Coastguard Worker   static ]b4_int_type_for([b4_translatable])[ yytranslatable[] =
721*cda5da8dSAndroid Build Coastguard Worker   {
722*cda5da8dSAndroid Build Coastguard Worker   ]b4_translatable[
723*cda5da8dSAndroid Build Coastguard Worker   };
724*cda5da8dSAndroid Build Coastguard Worker   return (yysymbol < YYNTOKENS && yytranslatable[yysymbol]
725*cda5da8dSAndroid Build Coastguard Worker           ? _(yy_sname[yysymbol])
726*cda5da8dSAndroid Build Coastguard Worker           : yy_sname[yysymbol]);]], [[
727*cda5da8dSAndroid Build Coastguard Worker   return yy_sname[yysymbol];]])[
728*cda5da8dSAndroid Build Coastguard Worker }]])[
729*cda5da8dSAndroid Build Coastguard Worker #endif
730*cda5da8dSAndroid Build Coastguard Worker 
731*cda5da8dSAndroid Build Coastguard Worker #define YYPACT_NINF (]b4_pact_ninf[)
732*cda5da8dSAndroid Build Coastguard Worker 
733*cda5da8dSAndroid Build Coastguard Worker #define yypact_value_is_default(Yyn) \
734*cda5da8dSAndroid Build Coastguard Worker   ]b4_table_value_equals([[pact]], [[Yyn]], [b4_pact_ninf], [YYPACT_NINF])[
735*cda5da8dSAndroid Build Coastguard Worker 
736*cda5da8dSAndroid Build Coastguard Worker #define YYTABLE_NINF (]b4_table_ninf[)
737*cda5da8dSAndroid Build Coastguard Worker 
738*cda5da8dSAndroid Build Coastguard Worker #define yytable_value_is_error(Yyn) \
739*cda5da8dSAndroid Build Coastguard Worker   ]b4_table_value_equals([[table]], [[Yyn]], [b4_table_ninf], [YYTABLE_NINF])[
740*cda5da8dSAndroid Build Coastguard Worker 
741*cda5da8dSAndroid Build Coastguard Worker ]b4_parser_tables_define[
742*cda5da8dSAndroid Build Coastguard Worker 
743*cda5da8dSAndroid Build Coastguard Worker enum { YYENOMEM = -2 };
744*cda5da8dSAndroid Build Coastguard Worker 
745*cda5da8dSAndroid Build Coastguard Worker #define yyerrok         (yyerrstatus = 0)
746*cda5da8dSAndroid Build Coastguard Worker #define yyclearin       (yychar = ]b4_symbol(empty, id)[)
747*cda5da8dSAndroid Build Coastguard Worker 
748*cda5da8dSAndroid Build Coastguard Worker #define YYACCEPT        goto yyacceptlab
749*cda5da8dSAndroid Build Coastguard Worker #define YYABORT         goto yyabortlab
750*cda5da8dSAndroid Build Coastguard Worker #define YYERROR         goto yyerrorlab
751*cda5da8dSAndroid Build Coastguard Worker #define YYNOMEM         goto yyexhaustedlab
752*cda5da8dSAndroid Build Coastguard Worker 
753*cda5da8dSAndroid Build Coastguard Worker 
754*cda5da8dSAndroid Build Coastguard Worker #define YYRECOVERING()  (!!yyerrstatus)
755*cda5da8dSAndroid Build Coastguard Worker 
756*cda5da8dSAndroid Build Coastguard Worker #define YYBACKUP(Token, Value)                                    \
757*cda5da8dSAndroid Build Coastguard Worker   do                                                              \
758*cda5da8dSAndroid Build Coastguard Worker     if (yychar == ]b4_symbol(empty, id)[)                                        \
759*cda5da8dSAndroid Build Coastguard Worker       {                                                           \
760*cda5da8dSAndroid Build Coastguard Worker         yychar = (Token);                                         \
761*cda5da8dSAndroid Build Coastguard Worker         yylval = (Value);                                         \
762*cda5da8dSAndroid Build Coastguard Worker         YYPOPSTACK (yylen);                                       \
763*cda5da8dSAndroid Build Coastguard Worker         yystate = *yyssp;                                         \]b4_lac_if([[
764*cda5da8dSAndroid Build Coastguard Worker         YY_LAC_DISCARD ("YYBACKUP");                              \]])[
765*cda5da8dSAndroid Build Coastguard Worker         goto yybackup;                                            \
766*cda5da8dSAndroid Build Coastguard Worker       }                                                           \
767*cda5da8dSAndroid Build Coastguard Worker     else                                                          \
768*cda5da8dSAndroid Build Coastguard Worker       {                                                           \
769*cda5da8dSAndroid Build Coastguard Worker         yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")); \
770*cda5da8dSAndroid Build Coastguard Worker         YYERROR;                                                  \
771*cda5da8dSAndroid Build Coastguard Worker       }                                                           \
772*cda5da8dSAndroid Build Coastguard Worker   while (0)
773*cda5da8dSAndroid Build Coastguard Worker 
774*cda5da8dSAndroid Build Coastguard Worker /* Backward compatibility with an undocumented macro.
775*cda5da8dSAndroid Build Coastguard Worker    Use ]b4_symbol(error, id)[ or ]b4_symbol(undef, id)[. */
776*cda5da8dSAndroid Build Coastguard Worker #define YYERRCODE ]b4_symbol(undef, id)[
777*cda5da8dSAndroid Build Coastguard Worker ]b4_locations_if([[
778*cda5da8dSAndroid Build Coastguard Worker ]b4_yylloc_default_define[
779*cda5da8dSAndroid Build Coastguard Worker #define YYRHSLOC(Rhs, K) ((Rhs)[K])
780*cda5da8dSAndroid Build Coastguard Worker ]])[
781*cda5da8dSAndroid Build Coastguard Worker 
782*cda5da8dSAndroid Build Coastguard Worker /* Enable debugging if requested.  */
783*cda5da8dSAndroid Build Coastguard Worker #if ]b4_api_PREFIX[DEBUG
784*cda5da8dSAndroid Build Coastguard Worker 
785*cda5da8dSAndroid Build Coastguard Worker # ifndef YYFPRINTF
786*cda5da8dSAndroid Build Coastguard Worker #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
787*cda5da8dSAndroid Build Coastguard Worker #  define YYFPRINTF fprintf
788*cda5da8dSAndroid Build Coastguard Worker # endif
789*cda5da8dSAndroid Build Coastguard Worker 
790*cda5da8dSAndroid Build Coastguard Worker # define YYDPRINTF(Args)                        \
791*cda5da8dSAndroid Build Coastguard Worker do {                                            \
792*cda5da8dSAndroid Build Coastguard Worker   if (yydebug)                                  \
793*cda5da8dSAndroid Build Coastguard Worker     YYFPRINTF Args;                             \
794*cda5da8dSAndroid Build Coastguard Worker } while (0)
795*cda5da8dSAndroid Build Coastguard Worker 
796*cda5da8dSAndroid Build Coastguard Worker ]b4_yylocation_print_define[
797*cda5da8dSAndroid Build Coastguard Worker 
798*cda5da8dSAndroid Build Coastguard Worker # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
799*cda5da8dSAndroid Build Coastguard Worker do {                                                                      \
800*cda5da8dSAndroid Build Coastguard Worker   if (yydebug)                                                            \
801*cda5da8dSAndroid Build Coastguard Worker     {                                                                     \
802*cda5da8dSAndroid Build Coastguard Worker       YYFPRINTF (stderr, "%s ", Title);                                   \
803*cda5da8dSAndroid Build Coastguard Worker       yy_symbol_print (stderr,                                            \
804*cda5da8dSAndroid Build Coastguard Worker                   Kind, Value]b4_locations_if([, Location])[]b4_user_args[); \
805*cda5da8dSAndroid Build Coastguard Worker       YYFPRINTF (stderr, "\n");                                           \
806*cda5da8dSAndroid Build Coastguard Worker     }                                                                     \
807*cda5da8dSAndroid Build Coastguard Worker } while (0)
808*cda5da8dSAndroid Build Coastguard Worker 
809*cda5da8dSAndroid Build Coastguard Worker ]b4_yy_symbol_print_define[
810*cda5da8dSAndroid Build Coastguard Worker 
811*cda5da8dSAndroid Build Coastguard Worker /*------------------------------------------------------------------.
812*cda5da8dSAndroid Build Coastguard Worker | yy_stack_print -- Print the state stack from its BOTTOM up to its |
813*cda5da8dSAndroid Build Coastguard Worker | TOP (included).                                                   |
814*cda5da8dSAndroid Build Coastguard Worker `------------------------------------------------------------------*/
815*cda5da8dSAndroid Build Coastguard Worker 
816*cda5da8dSAndroid Build Coastguard Worker static void
817*cda5da8dSAndroid Build Coastguard Worker yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
818*cda5da8dSAndroid Build Coastguard Worker {
819*cda5da8dSAndroid Build Coastguard Worker   YYFPRINTF (stderr, "Stack now");
820*cda5da8dSAndroid Build Coastguard Worker   for (; yybottom <= yytop; yybottom++)
821*cda5da8dSAndroid Build Coastguard Worker     {
822*cda5da8dSAndroid Build Coastguard Worker       int yybot = *yybottom;
823*cda5da8dSAndroid Build Coastguard Worker       YYFPRINTF (stderr, " %d", yybot);
824*cda5da8dSAndroid Build Coastguard Worker     }
825*cda5da8dSAndroid Build Coastguard Worker   YYFPRINTF (stderr, "\n");
826*cda5da8dSAndroid Build Coastguard Worker }
827*cda5da8dSAndroid Build Coastguard Worker 
828*cda5da8dSAndroid Build Coastguard Worker # define YY_STACK_PRINT(Bottom, Top)                            \
829*cda5da8dSAndroid Build Coastguard Worker do {                                                            \
830*cda5da8dSAndroid Build Coastguard Worker   if (yydebug)                                                  \
831*cda5da8dSAndroid Build Coastguard Worker     yy_stack_print ((Bottom), (Top));                           \
832*cda5da8dSAndroid Build Coastguard Worker } while (0)
833*cda5da8dSAndroid Build Coastguard Worker 
834*cda5da8dSAndroid Build Coastguard Worker 
835*cda5da8dSAndroid Build Coastguard Worker /*------------------------------------------------.
836*cda5da8dSAndroid Build Coastguard Worker | Report that the YYRULE is going to be reduced.  |
837*cda5da8dSAndroid Build Coastguard Worker `------------------------------------------------*/
838*cda5da8dSAndroid Build Coastguard Worker 
839*cda5da8dSAndroid Build Coastguard Worker static void
840*cda5da8dSAndroid Build Coastguard Worker yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,]b4_locations_if([[ YYLTYPE *yylsp,]])[
841*cda5da8dSAndroid Build Coastguard Worker                  int yyrule]b4_user_formals[)
842*cda5da8dSAndroid Build Coastguard Worker {
843*cda5da8dSAndroid Build Coastguard Worker   int yylno = yyrline[yyrule];
844*cda5da8dSAndroid Build Coastguard Worker   int yynrhs = yyr2[yyrule];
845*cda5da8dSAndroid Build Coastguard Worker   int yyi;
846*cda5da8dSAndroid Build Coastguard Worker   YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
847*cda5da8dSAndroid Build Coastguard Worker              yyrule - 1, yylno);
848*cda5da8dSAndroid Build Coastguard Worker   /* The symbols being reduced.  */
849*cda5da8dSAndroid Build Coastguard Worker   for (yyi = 0; yyi < yynrhs; yyi++)
850*cda5da8dSAndroid Build Coastguard Worker     {
851*cda5da8dSAndroid Build Coastguard Worker       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
852*cda5da8dSAndroid Build Coastguard Worker       yy_symbol_print (stderr,
853*cda5da8dSAndroid Build Coastguard Worker                        YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
854*cda5da8dSAndroid Build Coastguard Worker                        &]b4_rhs_value(yynrhs, yyi + 1)[]b4_locations_if([,
855*cda5da8dSAndroid Build Coastguard Worker                        &]b4_rhs_location(yynrhs, yyi + 1))[]b4_user_args[);
856*cda5da8dSAndroid Build Coastguard Worker       YYFPRINTF (stderr, "\n");
857*cda5da8dSAndroid Build Coastguard Worker     }
858*cda5da8dSAndroid Build Coastguard Worker }
859*cda5da8dSAndroid Build Coastguard Worker 
860*cda5da8dSAndroid Build Coastguard Worker # define YY_REDUCE_PRINT(Rule)          \
861*cda5da8dSAndroid Build Coastguard Worker do {                                    \
862*cda5da8dSAndroid Build Coastguard Worker   if (yydebug)                          \
863*cda5da8dSAndroid Build Coastguard Worker     yy_reduce_print (yyssp, yyvsp, ]b4_locations_if([yylsp, ])[Rule]b4_user_args[); \
864*cda5da8dSAndroid Build Coastguard Worker } while (0)
865*cda5da8dSAndroid Build Coastguard Worker 
866*cda5da8dSAndroid Build Coastguard Worker /* Nonzero means print parse trace.  It is left uninitialized so that
867*cda5da8dSAndroid Build Coastguard Worker    multiple parsers can coexist.  */
868*cda5da8dSAndroid Build Coastguard Worker int yydebug;
869*cda5da8dSAndroid Build Coastguard Worker #else /* !]b4_api_PREFIX[DEBUG */
870*cda5da8dSAndroid Build Coastguard Worker # define YYDPRINTF(Args) ((void) 0)
871*cda5da8dSAndroid Build Coastguard Worker # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
872*cda5da8dSAndroid Build Coastguard Worker # define YY_STACK_PRINT(Bottom, Top)
873*cda5da8dSAndroid Build Coastguard Worker # define YY_REDUCE_PRINT(Rule)
874*cda5da8dSAndroid Build Coastguard Worker #endif /* !]b4_api_PREFIX[DEBUG */
875*cda5da8dSAndroid Build Coastguard Worker 
876*cda5da8dSAndroid Build Coastguard Worker 
877*cda5da8dSAndroid Build Coastguard Worker /* YYINITDEPTH -- initial size of the parser's stacks.  */
878*cda5da8dSAndroid Build Coastguard Worker #ifndef YYINITDEPTH
879*cda5da8dSAndroid Build Coastguard Worker # define YYINITDEPTH ]b4_stack_depth_init[
880*cda5da8dSAndroid Build Coastguard Worker #endif
881*cda5da8dSAndroid Build Coastguard Worker 
882*cda5da8dSAndroid Build Coastguard Worker /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
883*cda5da8dSAndroid Build Coastguard Worker    if the built-in stack extension method is used).
884*cda5da8dSAndroid Build Coastguard Worker 
885*cda5da8dSAndroid Build Coastguard Worker    Do not make this value too large; the results are undefined if
886*cda5da8dSAndroid Build Coastguard Worker    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
887*cda5da8dSAndroid Build Coastguard Worker    evaluated with infinite-precision integer arithmetic.  */
888*cda5da8dSAndroid Build Coastguard Worker 
889*cda5da8dSAndroid Build Coastguard Worker #ifndef YYMAXDEPTH
890*cda5da8dSAndroid Build Coastguard Worker # define YYMAXDEPTH ]b4_stack_depth_max[
891*cda5da8dSAndroid Build Coastguard Worker #endif]b4_push_if([[
892*cda5da8dSAndroid Build Coastguard Worker /* Parser data structure.  */
893*cda5da8dSAndroid Build Coastguard Worker struct yypstate
894*cda5da8dSAndroid Build Coastguard Worker   {]b4_declare_parser_state_variables[
895*cda5da8dSAndroid Build Coastguard Worker     /* Whether this instance has not started parsing yet.
896*cda5da8dSAndroid Build Coastguard Worker      * If 2, it corresponds to a finished parsing.  */
897*cda5da8dSAndroid Build Coastguard Worker     int yynew;
898*cda5da8dSAndroid Build Coastguard Worker   };]b4_pure_if([], [[
899*cda5da8dSAndroid Build Coastguard Worker 
900*cda5da8dSAndroid Build Coastguard Worker /* Whether the only allowed instance of yypstate is allocated.  */
901*cda5da8dSAndroid Build Coastguard Worker static char yypstate_allocated = 0;]])])[
902*cda5da8dSAndroid Build Coastguard Worker ]b4_lac_if([[
903*cda5da8dSAndroid Build Coastguard Worker 
904*cda5da8dSAndroid Build Coastguard Worker /* Given a state stack such that *YYBOTTOM is its bottom, such that
905*cda5da8dSAndroid Build Coastguard Worker    *YYTOP is either its top or is YYTOP_EMPTY to indicate an empty
906*cda5da8dSAndroid Build Coastguard Worker    stack, and such that *YYCAPACITY is the maximum number of elements it
907*cda5da8dSAndroid Build Coastguard Worker    can hold without a reallocation, make sure there is enough room to
908*cda5da8dSAndroid Build Coastguard Worker    store YYADD more elements.  If not, allocate a new stack using
909*cda5da8dSAndroid Build Coastguard Worker    YYSTACK_ALLOC, copy the existing elements, and adjust *YYBOTTOM,
910*cda5da8dSAndroid Build Coastguard Worker    *YYTOP, and *YYCAPACITY to reflect the new capacity and memory
911*cda5da8dSAndroid Build Coastguard Worker    location.  If *YYBOTTOM != YYBOTTOM_NO_FREE, then free the old stack
912*cda5da8dSAndroid Build Coastguard Worker    using YYSTACK_FREE.  Return 0 if successful or if no reallocation is
913*cda5da8dSAndroid Build Coastguard Worker    required.  Return YYENOMEM if memory is exhausted.  */
914*cda5da8dSAndroid Build Coastguard Worker static int
915*cda5da8dSAndroid Build Coastguard Worker yy_lac_stack_realloc (YYPTRDIFF_T *yycapacity, YYPTRDIFF_T yyadd,
916*cda5da8dSAndroid Build Coastguard Worker #if ]b4_api_PREFIX[DEBUG
917*cda5da8dSAndroid Build Coastguard Worker                       char const *yydebug_prefix,
918*cda5da8dSAndroid Build Coastguard Worker                       char const *yydebug_suffix,
919*cda5da8dSAndroid Build Coastguard Worker #endif
920*cda5da8dSAndroid Build Coastguard Worker                       yy_state_t **yybottom,
921*cda5da8dSAndroid Build Coastguard Worker                       yy_state_t *yybottom_no_free,
922*cda5da8dSAndroid Build Coastguard Worker                       yy_state_t **yytop, yy_state_t *yytop_empty)
923*cda5da8dSAndroid Build Coastguard Worker {
924*cda5da8dSAndroid Build Coastguard Worker   YYPTRDIFF_T yysize_old =
925*cda5da8dSAndroid Build Coastguard Worker     *yytop == yytop_empty ? 0 : *yytop - *yybottom + 1;
926*cda5da8dSAndroid Build Coastguard Worker   YYPTRDIFF_T yysize_new = yysize_old + yyadd;
927*cda5da8dSAndroid Build Coastguard Worker   if (*yycapacity < yysize_new)
928*cda5da8dSAndroid Build Coastguard Worker     {
929*cda5da8dSAndroid Build Coastguard Worker       YYPTRDIFF_T yyalloc = 2 * yysize_new;
930*cda5da8dSAndroid Build Coastguard Worker       yy_state_t *yybottom_new;
931*cda5da8dSAndroid Build Coastguard Worker       /* Use YYMAXDEPTH for maximum stack size given that the stack
932*cda5da8dSAndroid Build Coastguard Worker          should never need to grow larger than the main state stack
933*cda5da8dSAndroid Build Coastguard Worker          needs to grow without LAC.  */
934*cda5da8dSAndroid Build Coastguard Worker       if (YYMAXDEPTH < yysize_new)
935*cda5da8dSAndroid Build Coastguard Worker         {
936*cda5da8dSAndroid Build Coastguard Worker           YYDPRINTF ((stderr, "%smax size exceeded%s", yydebug_prefix,
937*cda5da8dSAndroid Build Coastguard Worker                       yydebug_suffix));
938*cda5da8dSAndroid Build Coastguard Worker           return YYENOMEM;
939*cda5da8dSAndroid Build Coastguard Worker         }
940*cda5da8dSAndroid Build Coastguard Worker       if (YYMAXDEPTH < yyalloc)
941*cda5da8dSAndroid Build Coastguard Worker         yyalloc = YYMAXDEPTH;
942*cda5da8dSAndroid Build Coastguard Worker       yybottom_new =
943*cda5da8dSAndroid Build Coastguard Worker         YY_CAST (yy_state_t *,
944*cda5da8dSAndroid Build Coastguard Worker                  YYSTACK_ALLOC (YY_CAST (YYSIZE_T,
945*cda5da8dSAndroid Build Coastguard Worker                                          yyalloc * YYSIZEOF (*yybottom_new))));
946*cda5da8dSAndroid Build Coastguard Worker       if (!yybottom_new)
947*cda5da8dSAndroid Build Coastguard Worker         {
948*cda5da8dSAndroid Build Coastguard Worker           YYDPRINTF ((stderr, "%srealloc failed%s", yydebug_prefix,
949*cda5da8dSAndroid Build Coastguard Worker                       yydebug_suffix));
950*cda5da8dSAndroid Build Coastguard Worker           return YYENOMEM;
951*cda5da8dSAndroid Build Coastguard Worker         }
952*cda5da8dSAndroid Build Coastguard Worker       if (*yytop != yytop_empty)
953*cda5da8dSAndroid Build Coastguard Worker         {
954*cda5da8dSAndroid Build Coastguard Worker           YYCOPY (yybottom_new, *yybottom, yysize_old);
955*cda5da8dSAndroid Build Coastguard Worker           *yytop = yybottom_new + (yysize_old - 1);
956*cda5da8dSAndroid Build Coastguard Worker         }
957*cda5da8dSAndroid Build Coastguard Worker       if (*yybottom != yybottom_no_free)
958*cda5da8dSAndroid Build Coastguard Worker         YYSTACK_FREE (*yybottom);
959*cda5da8dSAndroid Build Coastguard Worker       *yybottom = yybottom_new;
960*cda5da8dSAndroid Build Coastguard Worker       *yycapacity = yyalloc;]m4_if(b4_percent_define_get([[parse.lac.memory-trace]]),
961*cda5da8dSAndroid Build Coastguard Worker                                    [full], [[
962*cda5da8dSAndroid Build Coastguard Worker       YY_IGNORE_USELESS_CAST_BEGIN
963*cda5da8dSAndroid Build Coastguard Worker       YYDPRINTF ((stderr, "%srealloc to %ld%s", yydebug_prefix,
964*cda5da8dSAndroid Build Coastguard Worker                   YY_CAST (long, yyalloc), yydebug_suffix));
965*cda5da8dSAndroid Build Coastguard Worker       YY_IGNORE_USELESS_CAST_END]])[
966*cda5da8dSAndroid Build Coastguard Worker     }
967*cda5da8dSAndroid Build Coastguard Worker   return 0;
968*cda5da8dSAndroid Build Coastguard Worker }
969*cda5da8dSAndroid Build Coastguard Worker 
970*cda5da8dSAndroid Build Coastguard Worker /* Establish the initial context for the current lookahead if no initial
971*cda5da8dSAndroid Build Coastguard Worker    context is currently established.
972*cda5da8dSAndroid Build Coastguard Worker 
973*cda5da8dSAndroid Build Coastguard Worker    We define a context as a snapshot of the parser stacks.  We define
974*cda5da8dSAndroid Build Coastguard Worker    the initial context for a lookahead as the context in which the
975*cda5da8dSAndroid Build Coastguard Worker    parser initially examines that lookahead in order to select a
976*cda5da8dSAndroid Build Coastguard Worker    syntactic action.  Thus, if the lookahead eventually proves
977*cda5da8dSAndroid Build Coastguard Worker    syntactically unacceptable (possibly in a later context reached via a
978*cda5da8dSAndroid Build Coastguard Worker    series of reductions), the initial context can be used to determine
979*cda5da8dSAndroid Build Coastguard Worker    the exact set of tokens that would be syntactically acceptable in the
980*cda5da8dSAndroid Build Coastguard Worker    lookahead's place.  Moreover, it is the context after which any
981*cda5da8dSAndroid Build Coastguard Worker    further semantic actions would be erroneous because they would be
982*cda5da8dSAndroid Build Coastguard Worker    determined by a syntactically unacceptable token.
983*cda5da8dSAndroid Build Coastguard Worker 
984*cda5da8dSAndroid Build Coastguard Worker    YY_LAC_ESTABLISH should be invoked when a reduction is about to be
985*cda5da8dSAndroid Build Coastguard Worker    performed in an inconsistent state (which, for the purposes of LAC,
986*cda5da8dSAndroid Build Coastguard Worker    includes consistent states that don't know they're consistent because
987*cda5da8dSAndroid Build Coastguard Worker    their default reductions have been disabled).  Iff there is a
988*cda5da8dSAndroid Build Coastguard Worker    lookahead token, it should also be invoked before reporting a syntax
989*cda5da8dSAndroid Build Coastguard Worker    error.  This latter case is for the sake of the debugging output.
990*cda5da8dSAndroid Build Coastguard Worker 
991*cda5da8dSAndroid Build Coastguard Worker    For parse.lac=full, the implementation of YY_LAC_ESTABLISH is as
992*cda5da8dSAndroid Build Coastguard Worker    follows.  If no initial context is currently established for the
993*cda5da8dSAndroid Build Coastguard Worker    current lookahead, then check if that lookahead can eventually be
994*cda5da8dSAndroid Build Coastguard Worker    shifted if syntactic actions continue from the current context.
995*cda5da8dSAndroid Build Coastguard Worker    Report a syntax error if it cannot.  */
996*cda5da8dSAndroid Build Coastguard Worker #define YY_LAC_ESTABLISH                                                \
997*cda5da8dSAndroid Build Coastguard Worker do {                                                                    \
998*cda5da8dSAndroid Build Coastguard Worker   if (!yy_lac_established)                                              \
999*cda5da8dSAndroid Build Coastguard Worker     {                                                                   \
1000*cda5da8dSAndroid Build Coastguard Worker       YYDPRINTF ((stderr,                                               \
1001*cda5da8dSAndroid Build Coastguard Worker                   "LAC: initial context established for %s\n",          \
1002*cda5da8dSAndroid Build Coastguard Worker                   yysymbol_name (yytoken)));                            \
1003*cda5da8dSAndroid Build Coastguard Worker       yy_lac_established = 1;                                           \
1004*cda5da8dSAndroid Build Coastguard Worker       switch (yy_lac (yyesa, &yyes, &yyes_capacity, yyssp, yytoken))    \
1005*cda5da8dSAndroid Build Coastguard Worker         {                                                               \
1006*cda5da8dSAndroid Build Coastguard Worker         case YYENOMEM:                                                  \
1007*cda5da8dSAndroid Build Coastguard Worker           YYNOMEM;                                                      \
1008*cda5da8dSAndroid Build Coastguard Worker         case 1:                                                         \
1009*cda5da8dSAndroid Build Coastguard Worker           goto yyerrlab;                                                \
1010*cda5da8dSAndroid Build Coastguard Worker         }                                                               \
1011*cda5da8dSAndroid Build Coastguard Worker     }                                                                   \
1012*cda5da8dSAndroid Build Coastguard Worker } while (0)
1013*cda5da8dSAndroid Build Coastguard Worker 
1014*cda5da8dSAndroid Build Coastguard Worker /* Discard any previous initial lookahead context because of Event,
1015*cda5da8dSAndroid Build Coastguard Worker    which may be a lookahead change or an invalidation of the currently
1016*cda5da8dSAndroid Build Coastguard Worker    established initial context for the current lookahead.
1017*cda5da8dSAndroid Build Coastguard Worker 
1018*cda5da8dSAndroid Build Coastguard Worker    The most common example of a lookahead change is a shift.  An example
1019*cda5da8dSAndroid Build Coastguard Worker    of both cases is syntax error recovery.  That is, a syntax error
1020*cda5da8dSAndroid Build Coastguard Worker    occurs when the lookahead is syntactically erroneous for the
1021*cda5da8dSAndroid Build Coastguard Worker    currently established initial context, so error recovery manipulates
1022*cda5da8dSAndroid Build Coastguard Worker    the parser stacks to try to find a new initial context in which the
1023*cda5da8dSAndroid Build Coastguard Worker    current lookahead is syntactically acceptable.  If it fails to find
1024*cda5da8dSAndroid Build Coastguard Worker    such a context, it discards the lookahead.  */
1025*cda5da8dSAndroid Build Coastguard Worker #if ]b4_api_PREFIX[DEBUG
1026*cda5da8dSAndroid Build Coastguard Worker # define YY_LAC_DISCARD(Event)                                           \
1027*cda5da8dSAndroid Build Coastguard Worker do {                                                                     \
1028*cda5da8dSAndroid Build Coastguard Worker   if (yy_lac_established)                                                \
1029*cda5da8dSAndroid Build Coastguard Worker     {                                                                    \
1030*cda5da8dSAndroid Build Coastguard Worker       YYDPRINTF ((stderr, "LAC: initial context discarded due to "       \
1031*cda5da8dSAndroid Build Coastguard Worker                   Event "\n"));                                          \
1032*cda5da8dSAndroid Build Coastguard Worker       yy_lac_established = 0;                                            \
1033*cda5da8dSAndroid Build Coastguard Worker     }                                                                    \
1034*cda5da8dSAndroid Build Coastguard Worker } while (0)
1035*cda5da8dSAndroid Build Coastguard Worker #else
1036*cda5da8dSAndroid Build Coastguard Worker # define YY_LAC_DISCARD(Event) yy_lac_established = 0
1037*cda5da8dSAndroid Build Coastguard Worker #endif
1038*cda5da8dSAndroid Build Coastguard Worker 
1039*cda5da8dSAndroid Build Coastguard Worker /* Given the stack whose top is *YYSSP, return 0 iff YYTOKEN can
1040*cda5da8dSAndroid Build Coastguard Worker    eventually (after perhaps some reductions) be shifted, return 1 if
1041*cda5da8dSAndroid Build Coastguard Worker    not, or return YYENOMEM if memory is exhausted.  As preconditions and
1042*cda5da8dSAndroid Build Coastguard Worker    postconditions: *YYES_CAPACITY is the allocated size of the array to
1043*cda5da8dSAndroid Build Coastguard Worker    which *YYES points, and either *YYES = YYESA or *YYES points to an
1044*cda5da8dSAndroid Build Coastguard Worker    array allocated with YYSTACK_ALLOC.  yy_lac may overwrite the
1045*cda5da8dSAndroid Build Coastguard Worker    contents of either array, alter *YYES and *YYES_CAPACITY, and free
1046*cda5da8dSAndroid Build Coastguard Worker    any old *YYES other than YYESA.  */
1047*cda5da8dSAndroid Build Coastguard Worker static int
1048*cda5da8dSAndroid Build Coastguard Worker yy_lac (yy_state_t *yyesa, yy_state_t **yyes,
1049*cda5da8dSAndroid Build Coastguard Worker         YYPTRDIFF_T *yyes_capacity, yy_state_t *yyssp, yysymbol_kind_t yytoken)
1050*cda5da8dSAndroid Build Coastguard Worker {
1051*cda5da8dSAndroid Build Coastguard Worker   yy_state_t *yyes_prev = yyssp;
1052*cda5da8dSAndroid Build Coastguard Worker   yy_state_t *yyesp = yyes_prev;
1053*cda5da8dSAndroid Build Coastguard Worker   /* Reduce until we encounter a shift and thereby accept the token.  */
1054*cda5da8dSAndroid Build Coastguard Worker   YYDPRINTF ((stderr, "LAC: checking lookahead %s:", yysymbol_name (yytoken)));
1055*cda5da8dSAndroid Build Coastguard Worker   if (yytoken == ]b4_symbol_prefix[YYUNDEF)
1056*cda5da8dSAndroid Build Coastguard Worker     {
1057*cda5da8dSAndroid Build Coastguard Worker       YYDPRINTF ((stderr, " Always Err\n"));
1058*cda5da8dSAndroid Build Coastguard Worker       return 1;
1059*cda5da8dSAndroid Build Coastguard Worker     }
1060*cda5da8dSAndroid Build Coastguard Worker   while (1)
1061*cda5da8dSAndroid Build Coastguard Worker     {
1062*cda5da8dSAndroid Build Coastguard Worker       int yyrule = yypact[+*yyesp];
1063*cda5da8dSAndroid Build Coastguard Worker       if (yypact_value_is_default (yyrule)
1064*cda5da8dSAndroid Build Coastguard Worker           || (yyrule += yytoken) < 0 || YYLAST < yyrule
1065*cda5da8dSAndroid Build Coastguard Worker           || yycheck[yyrule] != yytoken)
1066*cda5da8dSAndroid Build Coastguard Worker         {
1067*cda5da8dSAndroid Build Coastguard Worker           /* Use the default action.  */
1068*cda5da8dSAndroid Build Coastguard Worker           yyrule = yydefact[+*yyesp];
1069*cda5da8dSAndroid Build Coastguard Worker           if (yyrule == 0)
1070*cda5da8dSAndroid Build Coastguard Worker             {
1071*cda5da8dSAndroid Build Coastguard Worker               YYDPRINTF ((stderr, " Err\n"));
1072*cda5da8dSAndroid Build Coastguard Worker               return 1;
1073*cda5da8dSAndroid Build Coastguard Worker             }
1074*cda5da8dSAndroid Build Coastguard Worker         }
1075*cda5da8dSAndroid Build Coastguard Worker       else
1076*cda5da8dSAndroid Build Coastguard Worker         {
1077*cda5da8dSAndroid Build Coastguard Worker           /* Use the action from yytable.  */
1078*cda5da8dSAndroid Build Coastguard Worker           yyrule = yytable[yyrule];
1079*cda5da8dSAndroid Build Coastguard Worker           if (yytable_value_is_error (yyrule))
1080*cda5da8dSAndroid Build Coastguard Worker             {
1081*cda5da8dSAndroid Build Coastguard Worker               YYDPRINTF ((stderr, " Err\n"));
1082*cda5da8dSAndroid Build Coastguard Worker               return 1;
1083*cda5da8dSAndroid Build Coastguard Worker             }
1084*cda5da8dSAndroid Build Coastguard Worker           if (0 < yyrule)
1085*cda5da8dSAndroid Build Coastguard Worker             {
1086*cda5da8dSAndroid Build Coastguard Worker               YYDPRINTF ((stderr, " S%d\n", yyrule));
1087*cda5da8dSAndroid Build Coastguard Worker               return 0;
1088*cda5da8dSAndroid Build Coastguard Worker             }
1089*cda5da8dSAndroid Build Coastguard Worker           yyrule = -yyrule;
1090*cda5da8dSAndroid Build Coastguard Worker         }
1091*cda5da8dSAndroid Build Coastguard Worker       /* By now we know we have to simulate a reduce.  */
1092*cda5da8dSAndroid Build Coastguard Worker       YYDPRINTF ((stderr, " R%d", yyrule - 1));
1093*cda5da8dSAndroid Build Coastguard Worker       {
1094*cda5da8dSAndroid Build Coastguard Worker         /* Pop the corresponding number of values from the stack.  */
1095*cda5da8dSAndroid Build Coastguard Worker         YYPTRDIFF_T yylen = yyr2[yyrule];
1096*cda5da8dSAndroid Build Coastguard Worker         /* First pop from the LAC stack as many tokens as possible.  */
1097*cda5da8dSAndroid Build Coastguard Worker         if (yyesp != yyes_prev)
1098*cda5da8dSAndroid Build Coastguard Worker           {
1099*cda5da8dSAndroid Build Coastguard Worker             YYPTRDIFF_T yysize = yyesp - *yyes + 1;
1100*cda5da8dSAndroid Build Coastguard Worker             if (yylen < yysize)
1101*cda5da8dSAndroid Build Coastguard Worker               {
1102*cda5da8dSAndroid Build Coastguard Worker                 yyesp -= yylen;
1103*cda5da8dSAndroid Build Coastguard Worker                 yylen = 0;
1104*cda5da8dSAndroid Build Coastguard Worker               }
1105*cda5da8dSAndroid Build Coastguard Worker             else
1106*cda5da8dSAndroid Build Coastguard Worker               {
1107*cda5da8dSAndroid Build Coastguard Worker                 yyesp = yyes_prev;
1108*cda5da8dSAndroid Build Coastguard Worker                 yylen -= yysize;
1109*cda5da8dSAndroid Build Coastguard Worker               }
1110*cda5da8dSAndroid Build Coastguard Worker           }
1111*cda5da8dSAndroid Build Coastguard Worker         /* Only afterwards look at the main stack.  */
1112*cda5da8dSAndroid Build Coastguard Worker         if (yylen)
1113*cda5da8dSAndroid Build Coastguard Worker           yyesp = yyes_prev -= yylen;
1114*cda5da8dSAndroid Build Coastguard Worker       }
1115*cda5da8dSAndroid Build Coastguard Worker       /* Push the resulting state of the reduction.  */
1116*cda5da8dSAndroid Build Coastguard Worker       {
1117*cda5da8dSAndroid Build Coastguard Worker         yy_state_fast_t yystate;
1118*cda5da8dSAndroid Build Coastguard Worker         {
1119*cda5da8dSAndroid Build Coastguard Worker           const int yylhs = yyr1[yyrule] - YYNTOKENS;
1120*cda5da8dSAndroid Build Coastguard Worker           const int yyi = yypgoto[yylhs] + *yyesp;
1121*cda5da8dSAndroid Build Coastguard Worker           yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyesp
1122*cda5da8dSAndroid Build Coastguard Worker                      ? yytable[yyi]
1123*cda5da8dSAndroid Build Coastguard Worker                      : yydefgoto[yylhs]);
1124*cda5da8dSAndroid Build Coastguard Worker         }
1125*cda5da8dSAndroid Build Coastguard Worker         if (yyesp == yyes_prev)
1126*cda5da8dSAndroid Build Coastguard Worker           {
1127*cda5da8dSAndroid Build Coastguard Worker             yyesp = *yyes;
1128*cda5da8dSAndroid Build Coastguard Worker             YY_IGNORE_USELESS_CAST_BEGIN
1129*cda5da8dSAndroid Build Coastguard Worker             *yyesp = YY_CAST (yy_state_t, yystate);
1130*cda5da8dSAndroid Build Coastguard Worker             YY_IGNORE_USELESS_CAST_END
1131*cda5da8dSAndroid Build Coastguard Worker           }
1132*cda5da8dSAndroid Build Coastguard Worker         else
1133*cda5da8dSAndroid Build Coastguard Worker           {
1134*cda5da8dSAndroid Build Coastguard Worker             if (yy_lac_stack_realloc (yyes_capacity, 1,
1135*cda5da8dSAndroid Build Coastguard Worker #if ]b4_api_PREFIX[DEBUG
1136*cda5da8dSAndroid Build Coastguard Worker                                       " (", ")",
1137*cda5da8dSAndroid Build Coastguard Worker #endif
1138*cda5da8dSAndroid Build Coastguard Worker                                       yyes, yyesa, &yyesp, yyes_prev))
1139*cda5da8dSAndroid Build Coastguard Worker               {
1140*cda5da8dSAndroid Build Coastguard Worker                 YYDPRINTF ((stderr, "\n"));
1141*cda5da8dSAndroid Build Coastguard Worker                 return YYENOMEM;
1142*cda5da8dSAndroid Build Coastguard Worker               }
1143*cda5da8dSAndroid Build Coastguard Worker             YY_IGNORE_USELESS_CAST_BEGIN
1144*cda5da8dSAndroid Build Coastguard Worker             *++yyesp = YY_CAST (yy_state_t, yystate);
1145*cda5da8dSAndroid Build Coastguard Worker             YY_IGNORE_USELESS_CAST_END
1146*cda5da8dSAndroid Build Coastguard Worker           }
1147*cda5da8dSAndroid Build Coastguard Worker         YYDPRINTF ((stderr, " G%d", yystate));
1148*cda5da8dSAndroid Build Coastguard Worker       }
1149*cda5da8dSAndroid Build Coastguard Worker     }
1150*cda5da8dSAndroid Build Coastguard Worker }]])[
1151*cda5da8dSAndroid Build Coastguard Worker 
1152*cda5da8dSAndroid Build Coastguard Worker ]b4_parse_error_case([simple], [],
1153*cda5da8dSAndroid Build Coastguard Worker [[/* Context of a parse error.  */
1154*cda5da8dSAndroid Build Coastguard Worker typedef struct
1155*cda5da8dSAndroid Build Coastguard Worker {]b4_push_if([[
1156*cda5da8dSAndroid Build Coastguard Worker   yypstate* yyps;]], [[
1157*cda5da8dSAndroid Build Coastguard Worker   yy_state_t *yyssp;]b4_lac_if([[
1158*cda5da8dSAndroid Build Coastguard Worker   yy_state_t *yyesa;
1159*cda5da8dSAndroid Build Coastguard Worker   yy_state_t **yyes;
1160*cda5da8dSAndroid Build Coastguard Worker   YYPTRDIFF_T *yyes_capacity;]])])[
1161*cda5da8dSAndroid Build Coastguard Worker   yysymbol_kind_t yytoken;]b4_locations_if([[
1162*cda5da8dSAndroid Build Coastguard Worker   YYLTYPE *yylloc;]])[
1163*cda5da8dSAndroid Build Coastguard Worker } yypcontext_t;
1164*cda5da8dSAndroid Build Coastguard Worker 
1165*cda5da8dSAndroid Build Coastguard Worker /* Put in YYARG at most YYARGN of the expected tokens given the
1166*cda5da8dSAndroid Build Coastguard Worker    current YYCTX, and return the number of tokens stored in YYARG.  If
1167*cda5da8dSAndroid Build Coastguard Worker    YYARG is null, return the number of expected tokens (guaranteed to
1168*cda5da8dSAndroid Build Coastguard Worker    be less than YYNTOKENS).  Return YYENOMEM on memory exhaustion.
1169*cda5da8dSAndroid Build Coastguard Worker    Return 0 if there are more than YYARGN expected tokens, yet fill
1170*cda5da8dSAndroid Build Coastguard Worker    YYARG up to YYARGN. */]b4_push_if([[
1171*cda5da8dSAndroid Build Coastguard Worker static int
1172*cda5da8dSAndroid Build Coastguard Worker yypstate_expected_tokens (yypstate *yyps,
1173*cda5da8dSAndroid Build Coastguard Worker                           yysymbol_kind_t yyarg[], int yyargn)]], [[
1174*cda5da8dSAndroid Build Coastguard Worker static int
1175*cda5da8dSAndroid Build Coastguard Worker yypcontext_expected_tokens (const yypcontext_t *yyctx,
1176*cda5da8dSAndroid Build Coastguard Worker                             yysymbol_kind_t yyarg[], int yyargn)]])[
1177*cda5da8dSAndroid Build Coastguard Worker {
1178*cda5da8dSAndroid Build Coastguard Worker   /* Actual size of YYARG. */
1179*cda5da8dSAndroid Build Coastguard Worker   int yycount = 0;
1180*cda5da8dSAndroid Build Coastguard Worker ]b4_lac_if([[
1181*cda5da8dSAndroid Build Coastguard Worker   int yyx;
1182*cda5da8dSAndroid Build Coastguard Worker   for (yyx = 0; yyx < YYNTOKENS; ++yyx)
1183*cda5da8dSAndroid Build Coastguard Worker     {
1184*cda5da8dSAndroid Build Coastguard Worker       yysymbol_kind_t yysym = YY_CAST (yysymbol_kind_t, yyx);
1185*cda5da8dSAndroid Build Coastguard Worker       if (yysym != ]b4_symbol(error, kind)[ && yysym != ]b4_symbol_prefix[YYUNDEF)
1186*cda5da8dSAndroid Build Coastguard Worker         switch (yy_lac (]b4_push_if([[yyps->yyesa, &yyps->yyes, &yyps->yyes_capacity, yyps->yyssp, yysym]],
1187*cda5da8dSAndroid Build Coastguard Worker                                     [[yyctx->yyesa, yyctx->yyes, yyctx->yyes_capacity, yyctx->yyssp, yysym]])[))
1188*cda5da8dSAndroid Build Coastguard Worker           {
1189*cda5da8dSAndroid Build Coastguard Worker           case YYENOMEM:
1190*cda5da8dSAndroid Build Coastguard Worker             return YYENOMEM;
1191*cda5da8dSAndroid Build Coastguard Worker           case 1:
1192*cda5da8dSAndroid Build Coastguard Worker             continue;
1193*cda5da8dSAndroid Build Coastguard Worker           default:
1194*cda5da8dSAndroid Build Coastguard Worker             if (!yyarg)
1195*cda5da8dSAndroid Build Coastguard Worker               ++yycount;
1196*cda5da8dSAndroid Build Coastguard Worker             else if (yycount == yyargn)
1197*cda5da8dSAndroid Build Coastguard Worker               return 0;
1198*cda5da8dSAndroid Build Coastguard Worker             else
1199*cda5da8dSAndroid Build Coastguard Worker               yyarg[yycount++] = yysym;
1200*cda5da8dSAndroid Build Coastguard Worker           }
1201*cda5da8dSAndroid Build Coastguard Worker     }]],
1202*cda5da8dSAndroid Build Coastguard Worker [[  int yyn = yypact@{+*]b4_push_if([yyps], [yyctx])[->yyssp@};
1203*cda5da8dSAndroid Build Coastguard Worker   if (!yypact_value_is_default (yyn))
1204*cda5da8dSAndroid Build Coastguard Worker     {
1205*cda5da8dSAndroid Build Coastguard Worker       /* Start YYX at -YYN if negative to avoid negative indexes in
1206*cda5da8dSAndroid Build Coastguard Worker          YYCHECK.  In other words, skip the first -YYN actions for
1207*cda5da8dSAndroid Build Coastguard Worker          this state because they are default actions.  */
1208*cda5da8dSAndroid Build Coastguard Worker       int yyxbegin = yyn < 0 ? -yyn : 0;
1209*cda5da8dSAndroid Build Coastguard Worker       /* Stay within bounds of both yycheck and yytname.  */
1210*cda5da8dSAndroid Build Coastguard Worker       int yychecklim = YYLAST - yyn + 1;
1211*cda5da8dSAndroid Build Coastguard Worker       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1212*cda5da8dSAndroid Build Coastguard Worker       int yyx;
1213*cda5da8dSAndroid Build Coastguard Worker       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1214*cda5da8dSAndroid Build Coastguard Worker         if (yycheck[yyx + yyn] == yyx && yyx != ]b4_symbol(error, kind)[
1215*cda5da8dSAndroid Build Coastguard Worker             && !yytable_value_is_error (yytable[yyx + yyn]))
1216*cda5da8dSAndroid Build Coastguard Worker           {
1217*cda5da8dSAndroid Build Coastguard Worker             if (!yyarg)
1218*cda5da8dSAndroid Build Coastguard Worker               ++yycount;
1219*cda5da8dSAndroid Build Coastguard Worker             else if (yycount == yyargn)
1220*cda5da8dSAndroid Build Coastguard Worker               return 0;
1221*cda5da8dSAndroid Build Coastguard Worker             else
1222*cda5da8dSAndroid Build Coastguard Worker               yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
1223*cda5da8dSAndroid Build Coastguard Worker           }
1224*cda5da8dSAndroid Build Coastguard Worker     }]])[
1225*cda5da8dSAndroid Build Coastguard Worker   if (yyarg && yycount == 0 && 0 < yyargn)
1226*cda5da8dSAndroid Build Coastguard Worker     yyarg[0] = ]b4_symbol(empty, kind)[;
1227*cda5da8dSAndroid Build Coastguard Worker   return yycount;
1228*cda5da8dSAndroid Build Coastguard Worker }
1229*cda5da8dSAndroid Build Coastguard Worker 
1230*cda5da8dSAndroid Build Coastguard Worker ]b4_push_if([[
1231*cda5da8dSAndroid Build Coastguard Worker /* Similar to the previous function.  */
1232*cda5da8dSAndroid Build Coastguard Worker static int
1233*cda5da8dSAndroid Build Coastguard Worker yypcontext_expected_tokens (const yypcontext_t *yyctx,
1234*cda5da8dSAndroid Build Coastguard Worker                             yysymbol_kind_t yyarg[], int yyargn)
1235*cda5da8dSAndroid Build Coastguard Worker {
1236*cda5da8dSAndroid Build Coastguard Worker   return yypstate_expected_tokens (yyctx->yyps, yyarg, yyargn);
1237*cda5da8dSAndroid Build Coastguard Worker }]])[
1238*cda5da8dSAndroid Build Coastguard Worker ]])[
1239*cda5da8dSAndroid Build Coastguard Worker 
1240*cda5da8dSAndroid Build Coastguard Worker ]b4_parse_error_bmatch(
1241*cda5da8dSAndroid Build Coastguard Worker          [custom],
1242*cda5da8dSAndroid Build Coastguard Worker [[/* The kind of the lookahead of this context.  */
1243*cda5da8dSAndroid Build Coastguard Worker static yysymbol_kind_t
1244*cda5da8dSAndroid Build Coastguard Worker yypcontext_token (const yypcontext_t *yyctx) YY_ATTRIBUTE_UNUSED;
1245*cda5da8dSAndroid Build Coastguard Worker 
1246*cda5da8dSAndroid Build Coastguard Worker static yysymbol_kind_t
1247*cda5da8dSAndroid Build Coastguard Worker yypcontext_token (const yypcontext_t *yyctx)
1248*cda5da8dSAndroid Build Coastguard Worker {
1249*cda5da8dSAndroid Build Coastguard Worker   return yyctx->yytoken;
1250*cda5da8dSAndroid Build Coastguard Worker }
1251*cda5da8dSAndroid Build Coastguard Worker 
1252*cda5da8dSAndroid Build Coastguard Worker ]b4_locations_if([[/* The location of the lookahead of this context.  */
1253*cda5da8dSAndroid Build Coastguard Worker static YYLTYPE *
1254*cda5da8dSAndroid Build Coastguard Worker yypcontext_location (const yypcontext_t *yyctx) YY_ATTRIBUTE_UNUSED;
1255*cda5da8dSAndroid Build Coastguard Worker 
1256*cda5da8dSAndroid Build Coastguard Worker static YYLTYPE *
1257*cda5da8dSAndroid Build Coastguard Worker yypcontext_location (const yypcontext_t *yyctx)
1258*cda5da8dSAndroid Build Coastguard Worker {
1259*cda5da8dSAndroid Build Coastguard Worker   return yyctx->yylloc;
1260*cda5da8dSAndroid Build Coastguard Worker }]])[
1261*cda5da8dSAndroid Build Coastguard Worker 
1262*cda5da8dSAndroid Build Coastguard Worker /* User defined function to report a syntax error.  */
1263*cda5da8dSAndroid Build Coastguard Worker static int
1264*cda5da8dSAndroid Build Coastguard Worker yyreport_syntax_error (const yypcontext_t *yyctx]b4_user_formals[);]],
1265*cda5da8dSAndroid Build Coastguard Worker          [detailed\|verbose],
1266*cda5da8dSAndroid Build Coastguard Worker [[#ifndef yystrlen
1267*cda5da8dSAndroid Build Coastguard Worker # if defined __GLIBC__ && defined _STRING_H
1268*cda5da8dSAndroid Build Coastguard Worker #  define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
1269*cda5da8dSAndroid Build Coastguard Worker # else
1270*cda5da8dSAndroid Build Coastguard Worker /* Return the length of YYSTR.  */
1271*cda5da8dSAndroid Build Coastguard Worker static YYPTRDIFF_T
1272*cda5da8dSAndroid Build Coastguard Worker yystrlen (const char *yystr)
1273*cda5da8dSAndroid Build Coastguard Worker {
1274*cda5da8dSAndroid Build Coastguard Worker   YYPTRDIFF_T yylen;
1275*cda5da8dSAndroid Build Coastguard Worker   for (yylen = 0; yystr[yylen]; yylen++)
1276*cda5da8dSAndroid Build Coastguard Worker     continue;
1277*cda5da8dSAndroid Build Coastguard Worker   return yylen;
1278*cda5da8dSAndroid Build Coastguard Worker }
1279*cda5da8dSAndroid Build Coastguard Worker # endif
1280*cda5da8dSAndroid Build Coastguard Worker #endif
1281*cda5da8dSAndroid Build Coastguard Worker 
1282*cda5da8dSAndroid Build Coastguard Worker #ifndef yystpcpy
1283*cda5da8dSAndroid Build Coastguard Worker # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1284*cda5da8dSAndroid Build Coastguard Worker #  define yystpcpy stpcpy
1285*cda5da8dSAndroid Build Coastguard Worker # else
1286*cda5da8dSAndroid Build Coastguard Worker /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1287*cda5da8dSAndroid Build Coastguard Worker    YYDEST.  */
1288*cda5da8dSAndroid Build Coastguard Worker static char *
1289*cda5da8dSAndroid Build Coastguard Worker yystpcpy (char *yydest, const char *yysrc)
1290*cda5da8dSAndroid Build Coastguard Worker {
1291*cda5da8dSAndroid Build Coastguard Worker   char *yyd = yydest;
1292*cda5da8dSAndroid Build Coastguard Worker   const char *yys = yysrc;
1293*cda5da8dSAndroid Build Coastguard Worker 
1294*cda5da8dSAndroid Build Coastguard Worker   while ((*yyd++ = *yys++) != '\0')
1295*cda5da8dSAndroid Build Coastguard Worker     continue;
1296*cda5da8dSAndroid Build Coastguard Worker 
1297*cda5da8dSAndroid Build Coastguard Worker   return yyd - 1;
1298*cda5da8dSAndroid Build Coastguard Worker }
1299*cda5da8dSAndroid Build Coastguard Worker # endif
1300*cda5da8dSAndroid Build Coastguard Worker #endif
1301*cda5da8dSAndroid Build Coastguard Worker 
1302*cda5da8dSAndroid Build Coastguard Worker ]b4_parse_error_case(
1303*cda5da8dSAndroid Build Coastguard Worker          [verbose],
1304*cda5da8dSAndroid Build Coastguard Worker [[#ifndef yytnamerr
1305*cda5da8dSAndroid Build Coastguard Worker /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1306*cda5da8dSAndroid Build Coastguard Worker    quotes and backslashes, so that it's suitable for yyerror.  The
1307*cda5da8dSAndroid Build Coastguard Worker    heuristic is that double-quoting is unnecessary unless the string
1308*cda5da8dSAndroid Build Coastguard Worker    contains an apostrophe, a comma, or backslash (other than
1309*cda5da8dSAndroid Build Coastguard Worker    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1310*cda5da8dSAndroid Build Coastguard Worker    null, do not copy; instead, return the length of what the result
1311*cda5da8dSAndroid Build Coastguard Worker    would have been.  */
1312*cda5da8dSAndroid Build Coastguard Worker static YYPTRDIFF_T
1313*cda5da8dSAndroid Build Coastguard Worker yytnamerr (char *yyres, const char *yystr)
1314*cda5da8dSAndroid Build Coastguard Worker {
1315*cda5da8dSAndroid Build Coastguard Worker   if (*yystr == '"')
1316*cda5da8dSAndroid Build Coastguard Worker     {
1317*cda5da8dSAndroid Build Coastguard Worker       YYPTRDIFF_T yyn = 0;
1318*cda5da8dSAndroid Build Coastguard Worker       char const *yyp = yystr;
1319*cda5da8dSAndroid Build Coastguard Worker       for (;;)
1320*cda5da8dSAndroid Build Coastguard Worker         switch (*++yyp)
1321*cda5da8dSAndroid Build Coastguard Worker           {
1322*cda5da8dSAndroid Build Coastguard Worker           case '\'':
1323*cda5da8dSAndroid Build Coastguard Worker           case ',':
1324*cda5da8dSAndroid Build Coastguard Worker             goto do_not_strip_quotes;
1325*cda5da8dSAndroid Build Coastguard Worker 
1326*cda5da8dSAndroid Build Coastguard Worker           case '\\':
1327*cda5da8dSAndroid Build Coastguard Worker             if (*++yyp != '\\')
1328*cda5da8dSAndroid Build Coastguard Worker               goto do_not_strip_quotes;
1329*cda5da8dSAndroid Build Coastguard Worker             else
1330*cda5da8dSAndroid Build Coastguard Worker               goto append;
1331*cda5da8dSAndroid Build Coastguard Worker 
1332*cda5da8dSAndroid Build Coastguard Worker           append:
1333*cda5da8dSAndroid Build Coastguard Worker           default:
1334*cda5da8dSAndroid Build Coastguard Worker             if (yyres)
1335*cda5da8dSAndroid Build Coastguard Worker               yyres[yyn] = *yyp;
1336*cda5da8dSAndroid Build Coastguard Worker             yyn++;
1337*cda5da8dSAndroid Build Coastguard Worker             break;
1338*cda5da8dSAndroid Build Coastguard Worker 
1339*cda5da8dSAndroid Build Coastguard Worker           case '"':
1340*cda5da8dSAndroid Build Coastguard Worker             if (yyres)
1341*cda5da8dSAndroid Build Coastguard Worker               yyres[yyn] = '\0';
1342*cda5da8dSAndroid Build Coastguard Worker             return yyn;
1343*cda5da8dSAndroid Build Coastguard Worker           }
1344*cda5da8dSAndroid Build Coastguard Worker     do_not_strip_quotes: ;
1345*cda5da8dSAndroid Build Coastguard Worker     }
1346*cda5da8dSAndroid Build Coastguard Worker 
1347*cda5da8dSAndroid Build Coastguard Worker   if (yyres)
1348*cda5da8dSAndroid Build Coastguard Worker     return yystpcpy (yyres, yystr) - yyres;
1349*cda5da8dSAndroid Build Coastguard Worker   else
1350*cda5da8dSAndroid Build Coastguard Worker     return yystrlen (yystr);
1351*cda5da8dSAndroid Build Coastguard Worker }
1352*cda5da8dSAndroid Build Coastguard Worker #endif
1353*cda5da8dSAndroid Build Coastguard Worker ]])[
1354*cda5da8dSAndroid Build Coastguard Worker 
1355*cda5da8dSAndroid Build Coastguard Worker static int
1356*cda5da8dSAndroid Build Coastguard Worker yy_syntax_error_arguments (const yypcontext_t *yyctx,
1357*cda5da8dSAndroid Build Coastguard Worker                            yysymbol_kind_t yyarg[], int yyargn)
1358*cda5da8dSAndroid Build Coastguard Worker {
1359*cda5da8dSAndroid Build Coastguard Worker   /* Actual size of YYARG. */
1360*cda5da8dSAndroid Build Coastguard Worker   int yycount = 0;
1361*cda5da8dSAndroid Build Coastguard Worker   /* There are many possibilities here to consider:
1362*cda5da8dSAndroid Build Coastguard Worker      - If this state is a consistent state with a default action, then
1363*cda5da8dSAndroid Build Coastguard Worker        the only way this function was invoked is if the default action
1364*cda5da8dSAndroid Build Coastguard Worker        is an error action.  In that case, don't check for expected
1365*cda5da8dSAndroid Build Coastguard Worker        tokens because there are none.
1366*cda5da8dSAndroid Build Coastguard Worker      - The only way there can be no lookahead present (in yychar) is if
1367*cda5da8dSAndroid Build Coastguard Worker        this state is a consistent state with a default action.  Thus,
1368*cda5da8dSAndroid Build Coastguard Worker        detecting the absence of a lookahead is sufficient to determine
1369*cda5da8dSAndroid Build Coastguard Worker        that there is no unexpected or expected token to report.  In that
1370*cda5da8dSAndroid Build Coastguard Worker        case, just report a simple "syntax error".
1371*cda5da8dSAndroid Build Coastguard Worker      - Don't assume there isn't a lookahead just because this state is a
1372*cda5da8dSAndroid Build Coastguard Worker        consistent state with a default action.  There might have been a
1373*cda5da8dSAndroid Build Coastguard Worker        previous inconsistent state, consistent state with a non-default
1374*cda5da8dSAndroid Build Coastguard Worker        action, or user semantic action that manipulated yychar.]b4_lac_if([[
1375*cda5da8dSAndroid Build Coastguard Worker        In the first two cases, it might appear that the current syntax
1376*cda5da8dSAndroid Build Coastguard Worker        error should have been detected in the previous state when yy_lac
1377*cda5da8dSAndroid Build Coastguard Worker        was invoked.  However, at that time, there might have been a
1378*cda5da8dSAndroid Build Coastguard Worker        different syntax error that discarded a different initial context
1379*cda5da8dSAndroid Build Coastguard Worker        during error recovery, leaving behind the current lookahead.]], [[
1380*cda5da8dSAndroid Build Coastguard Worker      - Of course, the expected token list depends on states to have
1381*cda5da8dSAndroid Build Coastguard Worker        correct lookahead information, and it depends on the parser not
1382*cda5da8dSAndroid Build Coastguard Worker        to perform extra reductions after fetching a lookahead from the
1383*cda5da8dSAndroid Build Coastguard Worker        scanner and before detecting a syntax error.  Thus, state merging
1384*cda5da8dSAndroid Build Coastguard Worker        (from LALR or IELR) and default reductions corrupt the expected
1385*cda5da8dSAndroid Build Coastguard Worker        token list.  However, the list is correct for canonical LR with
1386*cda5da8dSAndroid Build Coastguard Worker        one exception: it will still contain any token that will not be
1387*cda5da8dSAndroid Build Coastguard Worker        accepted due to an error action in a later state.]])[
1388*cda5da8dSAndroid Build Coastguard Worker   */
1389*cda5da8dSAndroid Build Coastguard Worker   if (yyctx->yytoken != ]b4_symbol(empty, kind)[)
1390*cda5da8dSAndroid Build Coastguard Worker     {
1391*cda5da8dSAndroid Build Coastguard Worker       int yyn;]b4_lac_if([[
1392*cda5da8dSAndroid Build Coastguard Worker       YYDPRINTF ((stderr, "Constructing syntax error message\n"));]])[
1393*cda5da8dSAndroid Build Coastguard Worker       if (yyarg)
1394*cda5da8dSAndroid Build Coastguard Worker         yyarg[yycount] = yyctx->yytoken;
1395*cda5da8dSAndroid Build Coastguard Worker       ++yycount;
1396*cda5da8dSAndroid Build Coastguard Worker       yyn = yypcontext_expected_tokens (yyctx,
1397*cda5da8dSAndroid Build Coastguard Worker                                         yyarg ? yyarg + 1 : yyarg, yyargn - 1);
1398*cda5da8dSAndroid Build Coastguard Worker       if (yyn == YYENOMEM)
1399*cda5da8dSAndroid Build Coastguard Worker         return YYENOMEM;]b4_lac_if([[
1400*cda5da8dSAndroid Build Coastguard Worker       else if (yyn == 0)
1401*cda5da8dSAndroid Build Coastguard Worker         YYDPRINTF ((stderr, "No expected tokens.\n"));]])[
1402*cda5da8dSAndroid Build Coastguard Worker       else
1403*cda5da8dSAndroid Build Coastguard Worker         yycount += yyn;
1404*cda5da8dSAndroid Build Coastguard Worker     }
1405*cda5da8dSAndroid Build Coastguard Worker   return yycount;
1406*cda5da8dSAndroid Build Coastguard Worker }
1407*cda5da8dSAndroid Build Coastguard Worker 
1408*cda5da8dSAndroid Build Coastguard Worker /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1409*cda5da8dSAndroid Build Coastguard Worker    about the unexpected token YYTOKEN for the state stack whose top is
1410*cda5da8dSAndroid Build Coastguard Worker    YYSSP.]b4_lac_if([[  In order to see if a particular token T is a
1411*cda5da8dSAndroid Build Coastguard Worker    valid looakhead, invoke yy_lac (YYESA, YYES, YYES_CAPACITY, YYSSP, T).]])[
1412*cda5da8dSAndroid Build Coastguard Worker 
1413*cda5da8dSAndroid Build Coastguard Worker    Return 0 if *YYMSG was successfully written.  Return -1 if *YYMSG is
1414*cda5da8dSAndroid Build Coastguard Worker    not large enough to hold the message.  In that case, also set
1415*cda5da8dSAndroid Build Coastguard Worker    *YYMSG_ALLOC to the required number of bytes.  Return YYENOMEM if the
1416*cda5da8dSAndroid Build Coastguard Worker    required number of bytes is too large to store]b4_lac_if([[ or if
1417*cda5da8dSAndroid Build Coastguard Worker    yy_lac returned YYENOMEM]])[.  */
1418*cda5da8dSAndroid Build Coastguard Worker static int
1419*cda5da8dSAndroid Build Coastguard Worker yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
1420*cda5da8dSAndroid Build Coastguard Worker                 const yypcontext_t *yyctx)
1421*cda5da8dSAndroid Build Coastguard Worker {
1422*cda5da8dSAndroid Build Coastguard Worker   enum { YYARGS_MAX = 5 };
1423*cda5da8dSAndroid Build Coastguard Worker   /* Internationalized format string. */
1424*cda5da8dSAndroid Build Coastguard Worker   const char *yyformat = YY_NULLPTR;
1425*cda5da8dSAndroid Build Coastguard Worker   /* Arguments of yyformat: reported tokens (one for the "unexpected",
1426*cda5da8dSAndroid Build Coastguard Worker      one per "expected"). */
1427*cda5da8dSAndroid Build Coastguard Worker   yysymbol_kind_t yyarg[YYARGS_MAX];
1428*cda5da8dSAndroid Build Coastguard Worker   /* Cumulated lengths of YYARG.  */
1429*cda5da8dSAndroid Build Coastguard Worker   YYPTRDIFF_T yysize = 0;
1430*cda5da8dSAndroid Build Coastguard Worker 
1431*cda5da8dSAndroid Build Coastguard Worker   /* Actual size of YYARG. */
1432*cda5da8dSAndroid Build Coastguard Worker   int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
1433*cda5da8dSAndroid Build Coastguard Worker   if (yycount == YYENOMEM)
1434*cda5da8dSAndroid Build Coastguard Worker     return YYENOMEM;
1435*cda5da8dSAndroid Build Coastguard Worker 
1436*cda5da8dSAndroid Build Coastguard Worker   switch (yycount)
1437*cda5da8dSAndroid Build Coastguard Worker     {
1438*cda5da8dSAndroid Build Coastguard Worker #define YYCASE_(N, S)                       \
1439*cda5da8dSAndroid Build Coastguard Worker       case N:                               \
1440*cda5da8dSAndroid Build Coastguard Worker         yyformat = S;                       \
1441*cda5da8dSAndroid Build Coastguard Worker         break
1442*cda5da8dSAndroid Build Coastguard Worker     default: /* Avoid compiler warnings. */
1443*cda5da8dSAndroid Build Coastguard Worker       YYCASE_(0, YY_("syntax error"));
1444*cda5da8dSAndroid Build Coastguard Worker       YYCASE_(1, YY_("syntax error, unexpected %s"));
1445*cda5da8dSAndroid Build Coastguard Worker       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1446*cda5da8dSAndroid Build Coastguard Worker       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1447*cda5da8dSAndroid Build Coastguard Worker       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1448*cda5da8dSAndroid Build Coastguard Worker       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1449*cda5da8dSAndroid Build Coastguard Worker #undef YYCASE_
1450*cda5da8dSAndroid Build Coastguard Worker     }
1451*cda5da8dSAndroid Build Coastguard Worker 
1452*cda5da8dSAndroid Build Coastguard Worker   /* Compute error message size.  Don't count the "%s"s, but reserve
1453*cda5da8dSAndroid Build Coastguard Worker      room for the terminator.  */
1454*cda5da8dSAndroid Build Coastguard Worker   yysize = yystrlen (yyformat) - 2 * yycount + 1;
1455*cda5da8dSAndroid Build Coastguard Worker   {
1456*cda5da8dSAndroid Build Coastguard Worker     int yyi;
1457*cda5da8dSAndroid Build Coastguard Worker     for (yyi = 0; yyi < yycount; ++yyi)
1458*cda5da8dSAndroid Build Coastguard Worker       {
1459*cda5da8dSAndroid Build Coastguard Worker         YYPTRDIFF_T yysize1
1460*cda5da8dSAndroid Build Coastguard Worker           = yysize + ]b4_parse_error_case(
1461*cda5da8dSAndroid Build Coastguard Worker                               [verbose], [[yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]])]],
1462*cda5da8dSAndroid Build Coastguard Worker                               [[yystrlen (yysymbol_name (yyarg[yyi]))]]);[
1463*cda5da8dSAndroid Build Coastguard Worker         if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1464*cda5da8dSAndroid Build Coastguard Worker           yysize = yysize1;
1465*cda5da8dSAndroid Build Coastguard Worker         else
1466*cda5da8dSAndroid Build Coastguard Worker           return YYENOMEM;
1467*cda5da8dSAndroid Build Coastguard Worker       }
1468*cda5da8dSAndroid Build Coastguard Worker   }
1469*cda5da8dSAndroid Build Coastguard Worker 
1470*cda5da8dSAndroid Build Coastguard Worker   if (*yymsg_alloc < yysize)
1471*cda5da8dSAndroid Build Coastguard Worker     {
1472*cda5da8dSAndroid Build Coastguard Worker       *yymsg_alloc = 2 * yysize;
1473*cda5da8dSAndroid Build Coastguard Worker       if (! (yysize <= *yymsg_alloc
1474*cda5da8dSAndroid Build Coastguard Worker              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1475*cda5da8dSAndroid Build Coastguard Worker         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1476*cda5da8dSAndroid Build Coastguard Worker       return -1;
1477*cda5da8dSAndroid Build Coastguard Worker     }
1478*cda5da8dSAndroid Build Coastguard Worker 
1479*cda5da8dSAndroid Build Coastguard Worker   /* Avoid sprintf, as that infringes on the user's name space.
1480*cda5da8dSAndroid Build Coastguard Worker      Don't have undefined behavior even if the translation
1481*cda5da8dSAndroid Build Coastguard Worker      produced a string with the wrong number of "%s"s.  */
1482*cda5da8dSAndroid Build Coastguard Worker   {
1483*cda5da8dSAndroid Build Coastguard Worker     char *yyp = *yymsg;
1484*cda5da8dSAndroid Build Coastguard Worker     int yyi = 0;
1485*cda5da8dSAndroid Build Coastguard Worker     while ((*yyp = *yyformat) != '\0')
1486*cda5da8dSAndroid Build Coastguard Worker       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1487*cda5da8dSAndroid Build Coastguard Worker         {]b4_parse_error_case([verbose], [[
1488*cda5da8dSAndroid Build Coastguard Worker           yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);]], [[
1489*cda5da8dSAndroid Build Coastguard Worker           yyp = yystpcpy (yyp, yysymbol_name (yyarg[yyi++]));]])[
1490*cda5da8dSAndroid Build Coastguard Worker           yyformat += 2;
1491*cda5da8dSAndroid Build Coastguard Worker         }
1492*cda5da8dSAndroid Build Coastguard Worker       else
1493*cda5da8dSAndroid Build Coastguard Worker         {
1494*cda5da8dSAndroid Build Coastguard Worker           ++yyp;
1495*cda5da8dSAndroid Build Coastguard Worker           ++yyformat;
1496*cda5da8dSAndroid Build Coastguard Worker         }
1497*cda5da8dSAndroid Build Coastguard Worker   }
1498*cda5da8dSAndroid Build Coastguard Worker   return 0;
1499*cda5da8dSAndroid Build Coastguard Worker }
1500*cda5da8dSAndroid Build Coastguard Worker ]])[
1501*cda5da8dSAndroid Build Coastguard Worker 
1502*cda5da8dSAndroid Build Coastguard Worker ]b4_yydestruct_define[
1503*cda5da8dSAndroid Build Coastguard Worker 
1504*cda5da8dSAndroid Build Coastguard Worker ]b4_pure_if([], [b4_declare_scanner_communication_variables])[
1505*cda5da8dSAndroid Build Coastguard Worker 
1506*cda5da8dSAndroid Build Coastguard Worker ]b4_push_if([b4_pull_if([[
1507*cda5da8dSAndroid Build Coastguard Worker 
1508*cda5da8dSAndroid Build Coastguard Worker int
1509*cda5da8dSAndroid Build Coastguard Worker yyparse (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[)
1510*cda5da8dSAndroid Build Coastguard Worker {
1511*cda5da8dSAndroid Build Coastguard Worker   yypstate *yyps = yypstate_new ();
1512*cda5da8dSAndroid Build Coastguard Worker   if (!yyps)
1513*cda5da8dSAndroid Build Coastguard Worker     {]b4_pure_if([b4_locations_if([[
1514*cda5da8dSAndroid Build Coastguard Worker       static YYLTYPE yyloc_default][]b4_yyloc_default[;
1515*cda5da8dSAndroid Build Coastguard Worker       YYLTYPE yylloc = yyloc_default;]])[
1516*cda5da8dSAndroid Build Coastguard Worker       yyerror (]b4_yyerror_args[YY_("memory exhausted"));]], [[
1517*cda5da8dSAndroid Build Coastguard Worker       if (!yypstate_allocated)
1518*cda5da8dSAndroid Build Coastguard Worker         yyerror (]b4_yyerror_args[YY_("memory exhausted"));]])[
1519*cda5da8dSAndroid Build Coastguard Worker       return 2;
1520*cda5da8dSAndroid Build Coastguard Worker     }
1521*cda5da8dSAndroid Build Coastguard Worker   int yystatus = yypull_parse (yyps]b4_user_args[);
1522*cda5da8dSAndroid Build Coastguard Worker   yypstate_delete (yyps);
1523*cda5da8dSAndroid Build Coastguard Worker   return yystatus;
1524*cda5da8dSAndroid Build Coastguard Worker }
1525*cda5da8dSAndroid Build Coastguard Worker 
1526*cda5da8dSAndroid Build Coastguard Worker int
1527*cda5da8dSAndroid Build Coastguard Worker yypull_parse (yypstate *yyps]b4_user_formals[)
1528*cda5da8dSAndroid Build Coastguard Worker {
1529*cda5da8dSAndroid Build Coastguard Worker   YY_ASSERT (yyps);]b4_pure_if([b4_locations_if([[
1530*cda5da8dSAndroid Build Coastguard Worker   static YYLTYPE yyloc_default][]b4_yyloc_default[;
1531*cda5da8dSAndroid Build Coastguard Worker   YYLTYPE yylloc = yyloc_default;]])])[
1532*cda5da8dSAndroid Build Coastguard Worker   int yystatus;
1533*cda5da8dSAndroid Build Coastguard Worker   do {
1534*cda5da8dSAndroid Build Coastguard Worker ]b4_pure_if([[    YYSTYPE yylval;
1535*cda5da8dSAndroid Build Coastguard Worker     int ]])[yychar = ]b4_yylex[;
1536*cda5da8dSAndroid Build Coastguard Worker     yystatus = yypush_parse (yyps]b4_pure_if([[, yychar, &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [, b4_args(b4_parse_param)])[);
1537*cda5da8dSAndroid Build Coastguard Worker   } while (yystatus == YYPUSH_MORE);
1538*cda5da8dSAndroid Build Coastguard Worker   return yystatus;
1539*cda5da8dSAndroid Build Coastguard Worker }]])[
1540*cda5da8dSAndroid Build Coastguard Worker 
1541*cda5da8dSAndroid Build Coastguard Worker ]b4_parse_state_variable_macros([b4_pstate_macro_define])[
1542*cda5da8dSAndroid Build Coastguard Worker 
1543*cda5da8dSAndroid Build Coastguard Worker /* Initialize the parser data structure.  */
1544*cda5da8dSAndroid Build Coastguard Worker static void
1545*cda5da8dSAndroid Build Coastguard Worker yypstate_clear (yypstate *yyps)
1546*cda5da8dSAndroid Build Coastguard Worker {
1547*cda5da8dSAndroid Build Coastguard Worker   yynerrs = 0;
1548*cda5da8dSAndroid Build Coastguard Worker   yystate = 0;
1549*cda5da8dSAndroid Build Coastguard Worker   yyerrstatus = 0;
1550*cda5da8dSAndroid Build Coastguard Worker 
1551*cda5da8dSAndroid Build Coastguard Worker   yyssp = yyss;
1552*cda5da8dSAndroid Build Coastguard Worker   yyvsp = yyvs;]b4_locations_if([[
1553*cda5da8dSAndroid Build Coastguard Worker   yylsp = yyls;]])[
1554*cda5da8dSAndroid Build Coastguard Worker 
1555*cda5da8dSAndroid Build Coastguard Worker   /* Initialize the state stack, in case yypcontext_expected_tokens is
1556*cda5da8dSAndroid Build Coastguard Worker      called before the first call to yyparse. */
1557*cda5da8dSAndroid Build Coastguard Worker   *yyssp = 0;
1558*cda5da8dSAndroid Build Coastguard Worker   yyps->yynew = 1;
1559*cda5da8dSAndroid Build Coastguard Worker }
1560*cda5da8dSAndroid Build Coastguard Worker 
1561*cda5da8dSAndroid Build Coastguard Worker /* Initialize the parser data structure.  */
1562*cda5da8dSAndroid Build Coastguard Worker yypstate *
1563*cda5da8dSAndroid Build Coastguard Worker yypstate_new (void)
1564*cda5da8dSAndroid Build Coastguard Worker {
1565*cda5da8dSAndroid Build Coastguard Worker   yypstate *yyps;]b4_pure_if([], [[
1566*cda5da8dSAndroid Build Coastguard Worker   if (yypstate_allocated)
1567*cda5da8dSAndroid Build Coastguard Worker     return YY_NULLPTR;]])[
1568*cda5da8dSAndroid Build Coastguard Worker   yyps = YY_CAST (yypstate *, YYMALLOC (sizeof *yyps));
1569*cda5da8dSAndroid Build Coastguard Worker   if (!yyps)
1570*cda5da8dSAndroid Build Coastguard Worker     return YY_NULLPTR;]b4_pure_if([], [[
1571*cda5da8dSAndroid Build Coastguard Worker   yypstate_allocated = 1;]])[
1572*cda5da8dSAndroid Build Coastguard Worker   yystacksize = YYINITDEPTH;
1573*cda5da8dSAndroid Build Coastguard Worker   yyss = yyssa;
1574*cda5da8dSAndroid Build Coastguard Worker   yyvs = yyvsa;]b4_locations_if([[
1575*cda5da8dSAndroid Build Coastguard Worker   yyls = yylsa;]])[]b4_lac_if([[
1576*cda5da8dSAndroid Build Coastguard Worker   yyes = yyesa;
1577*cda5da8dSAndroid Build Coastguard Worker   yyes_capacity = ]b4_percent_define_get([[parse.lac.es-capacity-initial]])[;
1578*cda5da8dSAndroid Build Coastguard Worker   if (YYMAXDEPTH < yyes_capacity)
1579*cda5da8dSAndroid Build Coastguard Worker     yyes_capacity = YYMAXDEPTH;]])[
1580*cda5da8dSAndroid Build Coastguard Worker   yypstate_clear (yyps);
1581*cda5da8dSAndroid Build Coastguard Worker   return yyps;
1582*cda5da8dSAndroid Build Coastguard Worker }
1583*cda5da8dSAndroid Build Coastguard Worker 
1584*cda5da8dSAndroid Build Coastguard Worker void
1585*cda5da8dSAndroid Build Coastguard Worker yypstate_delete (yypstate *yyps)
1586*cda5da8dSAndroid Build Coastguard Worker {
1587*cda5da8dSAndroid Build Coastguard Worker   if (yyps)
1588*cda5da8dSAndroid Build Coastguard Worker     {
1589*cda5da8dSAndroid Build Coastguard Worker #ifndef yyoverflow
1590*cda5da8dSAndroid Build Coastguard Worker       /* If the stack was reallocated but the parse did not complete, then the
1591*cda5da8dSAndroid Build Coastguard Worker          stack still needs to be freed.  */
1592*cda5da8dSAndroid Build Coastguard Worker       if (yyss != yyssa)
1593*cda5da8dSAndroid Build Coastguard Worker         YYSTACK_FREE (yyss);
1594*cda5da8dSAndroid Build Coastguard Worker #endif]b4_lac_if([[
1595*cda5da8dSAndroid Build Coastguard Worker       if (yyes != yyesa)
1596*cda5da8dSAndroid Build Coastguard Worker         YYSTACK_FREE (yyes);]])[
1597*cda5da8dSAndroid Build Coastguard Worker       YYFREE (yyps);]b4_pure_if([], [[
1598*cda5da8dSAndroid Build Coastguard Worker       yypstate_allocated = 0;]])[
1599*cda5da8dSAndroid Build Coastguard Worker     }
1600*cda5da8dSAndroid Build Coastguard Worker }
1601*cda5da8dSAndroid Build Coastguard Worker ]])[
1602*cda5da8dSAndroid Build Coastguard Worker 
1603*cda5da8dSAndroid Build Coastguard Worker ]b4_push_if([[
1604*cda5da8dSAndroid Build Coastguard Worker /*---------------.
1605*cda5da8dSAndroid Build Coastguard Worker | yypush_parse.  |
1606*cda5da8dSAndroid Build Coastguard Worker `---------------*/
1607*cda5da8dSAndroid Build Coastguard Worker 
1608*cda5da8dSAndroid Build Coastguard Worker int
1609*cda5da8dSAndroid Build Coastguard Worker yypush_parse (yypstate *yyps]b4_pure_if([[,
1610*cda5da8dSAndroid Build Coastguard Worker               int yypushed_char, YYSTYPE const *yypushed_val]b4_locations_if([[, YYLTYPE *yypushed_loc]])])b4_user_formals[)]],
1611*cda5da8dSAndroid Build Coastguard Worker [[
1612*cda5da8dSAndroid Build Coastguard Worker /*----------.
1613*cda5da8dSAndroid Build Coastguard Worker | yyparse.  |
1614*cda5da8dSAndroid Build Coastguard Worker `----------*/
1615*cda5da8dSAndroid Build Coastguard Worker 
1616*cda5da8dSAndroid Build Coastguard Worker ]m4_ifdef([b4_start_symbols],
1617*cda5da8dSAndroid Build Coastguard Worker [[// Extract data from the parser.
1618*cda5da8dSAndroid Build Coastguard Worker typedef struct
1619*cda5da8dSAndroid Build Coastguard Worker {
1620*cda5da8dSAndroid Build Coastguard Worker   YYSTYPE yyvalue;
1621*cda5da8dSAndroid Build Coastguard Worker   int yynerrs;
1622*cda5da8dSAndroid Build Coastguard Worker } yy_parse_impl_t;
1623*cda5da8dSAndroid Build Coastguard Worker 
1624*cda5da8dSAndroid Build Coastguard Worker // Run a full parse, using YYCHAR as switching token.
1625*cda5da8dSAndroid Build Coastguard Worker static int
1626*cda5da8dSAndroid Build Coastguard Worker yy_parse_impl (int yychar, yy_parse_impl_t *yyimpl]m4_ifset([b4_parse_param], [, b4_formals(b4_parse_param)])[);
1627*cda5da8dSAndroid Build Coastguard Worker 
1628*cda5da8dSAndroid Build Coastguard Worker ]m4_map([_b4_define_sub_yyparse], m4_defn([b4_start_symbols]))[
1629*cda5da8dSAndroid Build Coastguard Worker 
1630*cda5da8dSAndroid Build Coastguard Worker int
1631*cda5da8dSAndroid Build Coastguard Worker yyparse (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[)
1632*cda5da8dSAndroid Build Coastguard Worker {
1633*cda5da8dSAndroid Build Coastguard Worker   return yy_parse_impl (]b4_symbol(_b4_first_switching_token, id)[, YY_NULLPTR]m4_ifset([b4_parse_param],
1634*cda5da8dSAndroid Build Coastguard Worker                                                     [[, ]b4_args(b4_parse_param)])[);
1635*cda5da8dSAndroid Build Coastguard Worker }
1636*cda5da8dSAndroid Build Coastguard Worker 
1637*cda5da8dSAndroid Build Coastguard Worker static int
1638*cda5da8dSAndroid Build Coastguard Worker yy_parse_impl (int yychar, yy_parse_impl_t *yyimpl]m4_ifset([b4_parse_param], [, b4_formals(b4_parse_param)])[)]],
1639*cda5da8dSAndroid Build Coastguard Worker [[int
1640*cda5da8dSAndroid Build Coastguard Worker yyparse (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[)]])])[
1641*cda5da8dSAndroid Build Coastguard Worker {]b4_pure_if([b4_declare_scanner_communication_variables
1642*cda5da8dSAndroid Build Coastguard Worker ])b4_push_if([b4_pure_if([], [[
1643*cda5da8dSAndroid Build Coastguard Worker   int yypushed_char = yychar;
1644*cda5da8dSAndroid Build Coastguard Worker   YYSTYPE yypushed_val = yylval;]b4_locations_if([[
1645*cda5da8dSAndroid Build Coastguard Worker   YYLTYPE yypushed_loc = yylloc;]])
1646*cda5da8dSAndroid Build Coastguard Worker ])],
1647*cda5da8dSAndroid Build Coastguard Worker   [b4_declare_parser_state_variables([init])
1648*cda5da8dSAndroid Build Coastguard Worker ])b4_lac_if([[
1649*cda5da8dSAndroid Build Coastguard Worker   /* Whether LAC context is established.  A Boolean.  */
1650*cda5da8dSAndroid Build Coastguard Worker   int yy_lac_established = 0;]])[
1651*cda5da8dSAndroid Build Coastguard Worker   int yyn;
1652*cda5da8dSAndroid Build Coastguard Worker   /* The return value of yyparse.  */
1653*cda5da8dSAndroid Build Coastguard Worker   int yyresult;
1654*cda5da8dSAndroid Build Coastguard Worker   /* Lookahead symbol kind.  */
1655*cda5da8dSAndroid Build Coastguard Worker   yysymbol_kind_t yytoken = ]b4_symbol(empty, kind)[;
1656*cda5da8dSAndroid Build Coastguard Worker   /* The variables used to return semantic value and location from the
1657*cda5da8dSAndroid Build Coastguard Worker      action routines.  */
1658*cda5da8dSAndroid Build Coastguard Worker   YYSTYPE yyval;]b4_locations_if([[
1659*cda5da8dSAndroid Build Coastguard Worker   YYLTYPE yyloc;
1660*cda5da8dSAndroid Build Coastguard Worker 
1661*cda5da8dSAndroid Build Coastguard Worker   /* The locations where the error started and ended.  */
1662*cda5da8dSAndroid Build Coastguard Worker   YYLTYPE yyerror_range[3];]])[
1663*cda5da8dSAndroid Build Coastguard Worker 
1664*cda5da8dSAndroid Build Coastguard Worker ]b4_parse_error_bmatch([detailed\|verbose],
1665*cda5da8dSAndroid Build Coastguard Worker [[  /* Buffer for error messages, and its allocated size.  */
1666*cda5da8dSAndroid Build Coastguard Worker   char yymsgbuf[128];
1667*cda5da8dSAndroid Build Coastguard Worker   char *yymsg = yymsgbuf;
1668*cda5da8dSAndroid Build Coastguard Worker   YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;]])[
1669*cda5da8dSAndroid Build Coastguard Worker 
1670*cda5da8dSAndroid Build Coastguard Worker #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N)]b4_locations_if([, yylsp -= (N)])[)
1671*cda5da8dSAndroid Build Coastguard Worker 
1672*cda5da8dSAndroid Build Coastguard Worker   /* The number of symbols on the RHS of the reduced rule.
1673*cda5da8dSAndroid Build Coastguard Worker      Keep to zero when no symbol should be popped.  */
1674*cda5da8dSAndroid Build Coastguard Worker   int yylen = 0;]b4_push_if([[
1675*cda5da8dSAndroid Build Coastguard Worker 
1676*cda5da8dSAndroid Build Coastguard Worker   switch (yyps->yynew)
1677*cda5da8dSAndroid Build Coastguard Worker     {
1678*cda5da8dSAndroid Build Coastguard Worker     case 0:
1679*cda5da8dSAndroid Build Coastguard Worker       yyn = yypact[yystate];
1680*cda5da8dSAndroid Build Coastguard Worker       goto yyread_pushed_token;
1681*cda5da8dSAndroid Build Coastguard Worker 
1682*cda5da8dSAndroid Build Coastguard Worker     case 2:
1683*cda5da8dSAndroid Build Coastguard Worker       yypstate_clear (yyps);
1684*cda5da8dSAndroid Build Coastguard Worker       break;
1685*cda5da8dSAndroid Build Coastguard Worker 
1686*cda5da8dSAndroid Build Coastguard Worker     default:
1687*cda5da8dSAndroid Build Coastguard Worker       break;
1688*cda5da8dSAndroid Build Coastguard Worker     }]])[
1689*cda5da8dSAndroid Build Coastguard Worker 
1690*cda5da8dSAndroid Build Coastguard Worker   YYDPRINTF ((stderr, "Starting parse\n"));
1691*cda5da8dSAndroid Build Coastguard Worker 
1692*cda5da8dSAndroid Build Coastguard Worker ]m4_ifdef([b4_start_symbols], [],
1693*cda5da8dSAndroid Build Coastguard Worker [[  yychar = ]b4_symbol(empty, id)[; /* Cause a token to be read.  */
1694*cda5da8dSAndroid Build Coastguard Worker ]])[
1695*cda5da8dSAndroid Build Coastguard Worker ]m4_ifdef([b4_initial_action], [
1696*cda5da8dSAndroid Build Coastguard Worker b4_dollar_pushdef([m4_define([b4_dollar_dollar_used])yylval], [], [],
1697*cda5da8dSAndroid Build Coastguard Worker                   [b4_push_if([b4_pure_if([*])yypushed_loc], [yylloc])])dnl
1698*cda5da8dSAndroid Build Coastguard Worker b4_user_initial_action
1699*cda5da8dSAndroid Build Coastguard Worker b4_dollar_popdef[]dnl
1700*cda5da8dSAndroid Build Coastguard Worker m4_ifdef([b4_dollar_dollar_used],[[  yyvsp[0] = yylval;
1701*cda5da8dSAndroid Build Coastguard Worker ]])])dnl
1702*cda5da8dSAndroid Build Coastguard Worker b4_locations_if([[  yylsp[0] = ]b4_push_if([b4_pure_if([*])yypushed_loc], [yylloc])[;
1703*cda5da8dSAndroid Build Coastguard Worker ]])dnl
1704*cda5da8dSAndroid Build Coastguard Worker [  goto yysetstate;
1705*cda5da8dSAndroid Build Coastguard Worker 
1706*cda5da8dSAndroid Build Coastguard Worker 
1707*cda5da8dSAndroid Build Coastguard Worker /*------------------------------------------------------------.
1708*cda5da8dSAndroid Build Coastguard Worker | yynewstate -- push a new state, which is found in yystate.  |
1709*cda5da8dSAndroid Build Coastguard Worker `------------------------------------------------------------*/
1710*cda5da8dSAndroid Build Coastguard Worker yynewstate:
1711*cda5da8dSAndroid Build Coastguard Worker   /* In all cases, when you get here, the value and location stacks
1712*cda5da8dSAndroid Build Coastguard Worker      have just been pushed.  So pushing a state here evens the stacks.  */
1713*cda5da8dSAndroid Build Coastguard Worker   yyssp++;
1714*cda5da8dSAndroid Build Coastguard Worker 
1715*cda5da8dSAndroid Build Coastguard Worker 
1716*cda5da8dSAndroid Build Coastguard Worker /*--------------------------------------------------------------------.
1717*cda5da8dSAndroid Build Coastguard Worker | yysetstate -- set current state (the top of the stack) to yystate.  |
1718*cda5da8dSAndroid Build Coastguard Worker `--------------------------------------------------------------------*/
1719*cda5da8dSAndroid Build Coastguard Worker yysetstate:
1720*cda5da8dSAndroid Build Coastguard Worker   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1721*cda5da8dSAndroid Build Coastguard Worker   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1722*cda5da8dSAndroid Build Coastguard Worker   YY_IGNORE_USELESS_CAST_BEGIN
1723*cda5da8dSAndroid Build Coastguard Worker   *yyssp = YY_CAST (yy_state_t, yystate);
1724*cda5da8dSAndroid Build Coastguard Worker   YY_IGNORE_USELESS_CAST_END
1725*cda5da8dSAndroid Build Coastguard Worker   YY_STACK_PRINT (yyss, yyssp);
1726*cda5da8dSAndroid Build Coastguard Worker 
1727*cda5da8dSAndroid Build Coastguard Worker   if (yyss + yystacksize - 1 <= yyssp)
1728*cda5da8dSAndroid Build Coastguard Worker #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1729*cda5da8dSAndroid Build Coastguard Worker     YYNOMEM;
1730*cda5da8dSAndroid Build Coastguard Worker #else
1731*cda5da8dSAndroid Build Coastguard Worker     {
1732*cda5da8dSAndroid Build Coastguard Worker       /* Get the current used size of the three stacks, in elements.  */
1733*cda5da8dSAndroid Build Coastguard Worker       YYPTRDIFF_T yysize = yyssp - yyss + 1;
1734*cda5da8dSAndroid Build Coastguard Worker 
1735*cda5da8dSAndroid Build Coastguard Worker # if defined yyoverflow
1736*cda5da8dSAndroid Build Coastguard Worker       {
1737*cda5da8dSAndroid Build Coastguard Worker         /* Give user a chance to reallocate the stack.  Use copies of
1738*cda5da8dSAndroid Build Coastguard Worker            these so that the &'s don't force the real ones into
1739*cda5da8dSAndroid Build Coastguard Worker            memory.  */
1740*cda5da8dSAndroid Build Coastguard Worker         yy_state_t *yyss1 = yyss;
1741*cda5da8dSAndroid Build Coastguard Worker         YYSTYPE *yyvs1 = yyvs;]b4_locations_if([
1742*cda5da8dSAndroid Build Coastguard Worker         YYLTYPE *yyls1 = yyls;])[
1743*cda5da8dSAndroid Build Coastguard Worker 
1744*cda5da8dSAndroid Build Coastguard Worker         /* Each stack pointer address is followed by the size of the
1745*cda5da8dSAndroid Build Coastguard Worker            data in use in that stack, in bytes.  This used to be a
1746*cda5da8dSAndroid Build Coastguard Worker            conditional around just the two extra args, but that might
1747*cda5da8dSAndroid Build Coastguard Worker            be undefined if yyoverflow is a macro.  */
1748*cda5da8dSAndroid Build Coastguard Worker         yyoverflow (YY_("memory exhausted"),
1749*cda5da8dSAndroid Build Coastguard Worker                     &yyss1, yysize * YYSIZEOF (*yyssp),
1750*cda5da8dSAndroid Build Coastguard Worker                     &yyvs1, yysize * YYSIZEOF (*yyvsp),]b4_locations_if([
1751*cda5da8dSAndroid Build Coastguard Worker                     &yyls1, yysize * YYSIZEOF (*yylsp),])[
1752*cda5da8dSAndroid Build Coastguard Worker                     &yystacksize);
1753*cda5da8dSAndroid Build Coastguard Worker         yyss = yyss1;
1754*cda5da8dSAndroid Build Coastguard Worker         yyvs = yyvs1;]b4_locations_if([
1755*cda5da8dSAndroid Build Coastguard Worker         yyls = yyls1;])[
1756*cda5da8dSAndroid Build Coastguard Worker       }
1757*cda5da8dSAndroid Build Coastguard Worker # else /* defined YYSTACK_RELOCATE */
1758*cda5da8dSAndroid Build Coastguard Worker       /* Extend the stack our own way.  */
1759*cda5da8dSAndroid Build Coastguard Worker       if (YYMAXDEPTH <= yystacksize)
1760*cda5da8dSAndroid Build Coastguard Worker         YYNOMEM;
1761*cda5da8dSAndroid Build Coastguard Worker       yystacksize *= 2;
1762*cda5da8dSAndroid Build Coastguard Worker       if (YYMAXDEPTH < yystacksize)
1763*cda5da8dSAndroid Build Coastguard Worker         yystacksize = YYMAXDEPTH;
1764*cda5da8dSAndroid Build Coastguard Worker 
1765*cda5da8dSAndroid Build Coastguard Worker       {
1766*cda5da8dSAndroid Build Coastguard Worker         yy_state_t *yyss1 = yyss;
1767*cda5da8dSAndroid Build Coastguard Worker         union yyalloc *yyptr =
1768*cda5da8dSAndroid Build Coastguard Worker           YY_CAST (union yyalloc *,
1769*cda5da8dSAndroid Build Coastguard Worker                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1770*cda5da8dSAndroid Build Coastguard Worker         if (! yyptr)
1771*cda5da8dSAndroid Build Coastguard Worker           YYNOMEM;
1772*cda5da8dSAndroid Build Coastguard Worker         YYSTACK_RELOCATE (yyss_alloc, yyss);
1773*cda5da8dSAndroid Build Coastguard Worker         YYSTACK_RELOCATE (yyvs_alloc, yyvs);]b4_locations_if([
1774*cda5da8dSAndroid Build Coastguard Worker         YYSTACK_RELOCATE (yyls_alloc, yyls);])[
1775*cda5da8dSAndroid Build Coastguard Worker #  undef YYSTACK_RELOCATE
1776*cda5da8dSAndroid Build Coastguard Worker         if (yyss1 != yyssa)
1777*cda5da8dSAndroid Build Coastguard Worker           YYSTACK_FREE (yyss1);
1778*cda5da8dSAndroid Build Coastguard Worker       }
1779*cda5da8dSAndroid Build Coastguard Worker # endif
1780*cda5da8dSAndroid Build Coastguard Worker 
1781*cda5da8dSAndroid Build Coastguard Worker       yyssp = yyss + yysize - 1;
1782*cda5da8dSAndroid Build Coastguard Worker       yyvsp = yyvs + yysize - 1;]b4_locations_if([
1783*cda5da8dSAndroid Build Coastguard Worker       yylsp = yyls + yysize - 1;])[
1784*cda5da8dSAndroid Build Coastguard Worker 
1785*cda5da8dSAndroid Build Coastguard Worker       YY_IGNORE_USELESS_CAST_BEGIN
1786*cda5da8dSAndroid Build Coastguard Worker       YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1787*cda5da8dSAndroid Build Coastguard Worker                   YY_CAST (long, yystacksize)));
1788*cda5da8dSAndroid Build Coastguard Worker       YY_IGNORE_USELESS_CAST_END
1789*cda5da8dSAndroid Build Coastguard Worker 
1790*cda5da8dSAndroid Build Coastguard Worker       if (yyss + yystacksize - 1 <= yyssp)
1791*cda5da8dSAndroid Build Coastguard Worker         YYABORT;
1792*cda5da8dSAndroid Build Coastguard Worker     }
1793*cda5da8dSAndroid Build Coastguard Worker #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1794*cda5da8dSAndroid Build Coastguard Worker 
1795*cda5da8dSAndroid Build Coastguard Worker ]m4_ifdef([b4_start_symbols], [], [[
1796*cda5da8dSAndroid Build Coastguard Worker   if (yystate == YYFINAL)
1797*cda5da8dSAndroid Build Coastguard Worker     YYACCEPT;]])[
1798*cda5da8dSAndroid Build Coastguard Worker 
1799*cda5da8dSAndroid Build Coastguard Worker   goto yybackup;
1800*cda5da8dSAndroid Build Coastguard Worker 
1801*cda5da8dSAndroid Build Coastguard Worker 
1802*cda5da8dSAndroid Build Coastguard Worker /*-----------.
1803*cda5da8dSAndroid Build Coastguard Worker | yybackup.  |
1804*cda5da8dSAndroid Build Coastguard Worker `-----------*/
1805*cda5da8dSAndroid Build Coastguard Worker yybackup:
1806*cda5da8dSAndroid Build Coastguard Worker   /* Do appropriate processing given the current state.  Read a
1807*cda5da8dSAndroid Build Coastguard Worker      lookahead token if we need one and don't already have one.  */
1808*cda5da8dSAndroid Build Coastguard Worker 
1809*cda5da8dSAndroid Build Coastguard Worker   /* First try to decide what to do without reference to lookahead token.  */
1810*cda5da8dSAndroid Build Coastguard Worker   yyn = yypact[yystate];
1811*cda5da8dSAndroid Build Coastguard Worker   if (yypact_value_is_default (yyn))
1812*cda5da8dSAndroid Build Coastguard Worker     goto yydefault;
1813*cda5da8dSAndroid Build Coastguard Worker 
1814*cda5da8dSAndroid Build Coastguard Worker   /* Not known => get a lookahead token if don't already have one.  */
1815*cda5da8dSAndroid Build Coastguard Worker 
1816*cda5da8dSAndroid Build Coastguard Worker   /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
1817*cda5da8dSAndroid Build Coastguard Worker   if (yychar == ]b4_symbol(empty, id)[)
1818*cda5da8dSAndroid Build Coastguard Worker     {]b4_push_if([[
1819*cda5da8dSAndroid Build Coastguard Worker       if (!yyps->yynew)
1820*cda5da8dSAndroid Build Coastguard Worker         {]b4_use_push_for_pull_if([], [[
1821*cda5da8dSAndroid Build Coastguard Worker           YYDPRINTF ((stderr, "Return for a new token:\n"));]])[
1822*cda5da8dSAndroid Build Coastguard Worker           yyresult = YYPUSH_MORE;
1823*cda5da8dSAndroid Build Coastguard Worker           goto yypushreturn;
1824*cda5da8dSAndroid Build Coastguard Worker         }
1825*cda5da8dSAndroid Build Coastguard Worker       yyps->yynew = 0;]b4_pure_if([], [[
1826*cda5da8dSAndroid Build Coastguard Worker       /* Restoring the pushed token is only necessary for the first
1827*cda5da8dSAndroid Build Coastguard Worker          yypush_parse invocation since subsequent invocations don't overwrite
1828*cda5da8dSAndroid Build Coastguard Worker          it before jumping to yyread_pushed_token.  */
1829*cda5da8dSAndroid Build Coastguard Worker       yychar = yypushed_char;
1830*cda5da8dSAndroid Build Coastguard Worker       yylval = yypushed_val;]b4_locations_if([[
1831*cda5da8dSAndroid Build Coastguard Worker       yylloc = yypushed_loc;]])])[
1832*cda5da8dSAndroid Build Coastguard Worker yyread_pushed_token:]])[
1833*cda5da8dSAndroid Build Coastguard Worker       YYDPRINTF ((stderr, "Reading a token\n"));]b4_push_if([b4_pure_if([[
1834*cda5da8dSAndroid Build Coastguard Worker       yychar = yypushed_char;
1835*cda5da8dSAndroid Build Coastguard Worker       if (yypushed_val)
1836*cda5da8dSAndroid Build Coastguard Worker         yylval = *yypushed_val;]b4_locations_if([[
1837*cda5da8dSAndroid Build Coastguard Worker       if (yypushed_loc)
1838*cda5da8dSAndroid Build Coastguard Worker         yylloc = *yypushed_loc;]])])], [[
1839*cda5da8dSAndroid Build Coastguard Worker       yychar = ]b4_yylex[;]])[
1840*cda5da8dSAndroid Build Coastguard Worker     }
1841*cda5da8dSAndroid Build Coastguard Worker 
1842*cda5da8dSAndroid Build Coastguard Worker   if (yychar <= ]b4_symbol(eof, [id])[)
1843*cda5da8dSAndroid Build Coastguard Worker     {
1844*cda5da8dSAndroid Build Coastguard Worker       yychar = ]b4_symbol(eof, [id])[;
1845*cda5da8dSAndroid Build Coastguard Worker       yytoken = ]b4_symbol(eof, [kind])[;
1846*cda5da8dSAndroid Build Coastguard Worker       YYDPRINTF ((stderr, "Now at end of input.\n"));
1847*cda5da8dSAndroid Build Coastguard Worker     }
1848*cda5da8dSAndroid Build Coastguard Worker   else if (yychar == ]b4_symbol(error, [id])[)
1849*cda5da8dSAndroid Build Coastguard Worker     {
1850*cda5da8dSAndroid Build Coastguard Worker       /* The scanner already issued an error message, process directly
1851*cda5da8dSAndroid Build Coastguard Worker          to error recovery.  But do not keep the error token as
1852*cda5da8dSAndroid Build Coastguard Worker          lookahead, it is too special and may lead us to an endless
1853*cda5da8dSAndroid Build Coastguard Worker          loop in error recovery. */
1854*cda5da8dSAndroid Build Coastguard Worker       yychar = ]b4_symbol(undef, [id])[;
1855*cda5da8dSAndroid Build Coastguard Worker       yytoken = ]b4_symbol(error, [kind])[;]b4_locations_if([[
1856*cda5da8dSAndroid Build Coastguard Worker       yyerror_range[1] = yylloc;]])[
1857*cda5da8dSAndroid Build Coastguard Worker       goto yyerrlab1;
1858*cda5da8dSAndroid Build Coastguard Worker     }
1859*cda5da8dSAndroid Build Coastguard Worker   else
1860*cda5da8dSAndroid Build Coastguard Worker     {
1861*cda5da8dSAndroid Build Coastguard Worker       yytoken = YYTRANSLATE (yychar);
1862*cda5da8dSAndroid Build Coastguard Worker       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1863*cda5da8dSAndroid Build Coastguard Worker     }
1864*cda5da8dSAndroid Build Coastguard Worker 
1865*cda5da8dSAndroid Build Coastguard Worker   /* If the proper action on seeing token YYTOKEN is to reduce or to
1866*cda5da8dSAndroid Build Coastguard Worker      detect an error, take that action.  */
1867*cda5da8dSAndroid Build Coastguard Worker   yyn += yytoken;
1868*cda5da8dSAndroid Build Coastguard Worker   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)]b4_lac_if([[
1869*cda5da8dSAndroid Build Coastguard Worker     {
1870*cda5da8dSAndroid Build Coastguard Worker       YY_LAC_ESTABLISH;
1871*cda5da8dSAndroid Build Coastguard Worker       goto yydefault;
1872*cda5da8dSAndroid Build Coastguard Worker     }]], [[
1873*cda5da8dSAndroid Build Coastguard Worker     goto yydefault;]])[
1874*cda5da8dSAndroid Build Coastguard Worker   yyn = yytable[yyn];
1875*cda5da8dSAndroid Build Coastguard Worker   if (yyn <= 0)
1876*cda5da8dSAndroid Build Coastguard Worker     {
1877*cda5da8dSAndroid Build Coastguard Worker       if (yytable_value_is_error (yyn))
1878*cda5da8dSAndroid Build Coastguard Worker         goto yyerrlab;
1879*cda5da8dSAndroid Build Coastguard Worker       yyn = -yyn;]b4_lac_if([[
1880*cda5da8dSAndroid Build Coastguard Worker       YY_LAC_ESTABLISH;]])[
1881*cda5da8dSAndroid Build Coastguard Worker       goto yyreduce;
1882*cda5da8dSAndroid Build Coastguard Worker     }
1883*cda5da8dSAndroid Build Coastguard Worker 
1884*cda5da8dSAndroid Build Coastguard Worker   /* Count tokens shifted since error; after three, turn off error
1885*cda5da8dSAndroid Build Coastguard Worker      status.  */
1886*cda5da8dSAndroid Build Coastguard Worker   if (yyerrstatus)
1887*cda5da8dSAndroid Build Coastguard Worker     yyerrstatus--;
1888*cda5da8dSAndroid Build Coastguard Worker 
1889*cda5da8dSAndroid Build Coastguard Worker   /* Shift the lookahead token.  */
1890*cda5da8dSAndroid Build Coastguard Worker   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1891*cda5da8dSAndroid Build Coastguard Worker   yystate = yyn;
1892*cda5da8dSAndroid Build Coastguard Worker   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1893*cda5da8dSAndroid Build Coastguard Worker   *++yyvsp = yylval;
1894*cda5da8dSAndroid Build Coastguard Worker   YY_IGNORE_MAYBE_UNINITIALIZED_END]b4_locations_if([
1895*cda5da8dSAndroid Build Coastguard Worker   *++yylsp = yylloc;])[
1896*cda5da8dSAndroid Build Coastguard Worker 
1897*cda5da8dSAndroid Build Coastguard Worker   /* Discard the shifted token.  */
1898*cda5da8dSAndroid Build Coastguard Worker   yychar = ]b4_symbol(empty, id)[;]b4_lac_if([[
1899*cda5da8dSAndroid Build Coastguard Worker   YY_LAC_DISCARD ("shift");]])[
1900*cda5da8dSAndroid Build Coastguard Worker   goto yynewstate;
1901*cda5da8dSAndroid Build Coastguard Worker 
1902*cda5da8dSAndroid Build Coastguard Worker 
1903*cda5da8dSAndroid Build Coastguard Worker /*-----------------------------------------------------------.
1904*cda5da8dSAndroid Build Coastguard Worker | yydefault -- do the default action for the current state.  |
1905*cda5da8dSAndroid Build Coastguard Worker `-----------------------------------------------------------*/
1906*cda5da8dSAndroid Build Coastguard Worker yydefault:
1907*cda5da8dSAndroid Build Coastguard Worker   yyn = yydefact[yystate];
1908*cda5da8dSAndroid Build Coastguard Worker   if (yyn == 0)
1909*cda5da8dSAndroid Build Coastguard Worker     goto yyerrlab;
1910*cda5da8dSAndroid Build Coastguard Worker   goto yyreduce;
1911*cda5da8dSAndroid Build Coastguard Worker 
1912*cda5da8dSAndroid Build Coastguard Worker 
1913*cda5da8dSAndroid Build Coastguard Worker /*-----------------------------.
1914*cda5da8dSAndroid Build Coastguard Worker | yyreduce -- do a reduction.  |
1915*cda5da8dSAndroid Build Coastguard Worker `-----------------------------*/
1916*cda5da8dSAndroid Build Coastguard Worker yyreduce:
1917*cda5da8dSAndroid Build Coastguard Worker   /* yyn is the number of a rule to reduce with.  */
1918*cda5da8dSAndroid Build Coastguard Worker   yylen = yyr2[yyn];
1919*cda5da8dSAndroid Build Coastguard Worker 
1920*cda5da8dSAndroid Build Coastguard Worker   /* If YYLEN is nonzero, implement the default value of the action:
1921*cda5da8dSAndroid Build Coastguard Worker      '$$ = $1'.
1922*cda5da8dSAndroid Build Coastguard Worker 
1923*cda5da8dSAndroid Build Coastguard Worker      Otherwise, the following line sets YYVAL to garbage.
1924*cda5da8dSAndroid Build Coastguard Worker      This behavior is undocumented and Bison
1925*cda5da8dSAndroid Build Coastguard Worker      users should not rely upon it.  Assigning to YYVAL
1926*cda5da8dSAndroid Build Coastguard Worker      unconditionally makes the parser a bit smaller, and it avoids a
1927*cda5da8dSAndroid Build Coastguard Worker      GCC warning that YYVAL may be used uninitialized.  */
1928*cda5da8dSAndroid Build Coastguard Worker   yyval = yyvsp[1-yylen];
1929*cda5da8dSAndroid Build Coastguard Worker 
1930*cda5da8dSAndroid Build Coastguard Worker ]b4_locations_if(
1931*cda5da8dSAndroid Build Coastguard Worker [[  /* Default location. */
1932*cda5da8dSAndroid Build Coastguard Worker   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1933*cda5da8dSAndroid Build Coastguard Worker   yyerror_range[1] = yyloc;]])[
1934*cda5da8dSAndroid Build Coastguard Worker   YY_REDUCE_PRINT (yyn);]b4_lac_if([[
1935*cda5da8dSAndroid Build Coastguard Worker   {
1936*cda5da8dSAndroid Build Coastguard Worker     int yychar_backup = yychar;
1937*cda5da8dSAndroid Build Coastguard Worker     switch (yyn)
1938*cda5da8dSAndroid Build Coastguard Worker       {
1939*cda5da8dSAndroid Build Coastguard Worker ]b4_user_actions[
1940*cda5da8dSAndroid Build Coastguard Worker         default: break;
1941*cda5da8dSAndroid Build Coastguard Worker       }
1942*cda5da8dSAndroid Build Coastguard Worker     if (yychar_backup != yychar)
1943*cda5da8dSAndroid Build Coastguard Worker       YY_LAC_DISCARD ("yychar change");
1944*cda5da8dSAndroid Build Coastguard Worker   }]], [[
1945*cda5da8dSAndroid Build Coastguard Worker   switch (yyn)
1946*cda5da8dSAndroid Build Coastguard Worker     {
1947*cda5da8dSAndroid Build Coastguard Worker ]b4_user_actions[
1948*cda5da8dSAndroid Build Coastguard Worker       default: break;
1949*cda5da8dSAndroid Build Coastguard Worker     }]])[
1950*cda5da8dSAndroid Build Coastguard Worker   /* User semantic actions sometimes alter yychar, and that requires
1951*cda5da8dSAndroid Build Coastguard Worker      that yytoken be updated with the new translation.  We take the
1952*cda5da8dSAndroid Build Coastguard Worker      approach of translating immediately before every use of yytoken.
1953*cda5da8dSAndroid Build Coastguard Worker      One alternative is translating here after every semantic action,
1954*cda5da8dSAndroid Build Coastguard Worker      but that translation would be missed if the semantic action invokes
1955*cda5da8dSAndroid Build Coastguard Worker      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1956*cda5da8dSAndroid Build Coastguard Worker      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1957*cda5da8dSAndroid Build Coastguard Worker      incorrect destructor might then be invoked immediately.  In the
1958*cda5da8dSAndroid Build Coastguard Worker      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1959*cda5da8dSAndroid Build Coastguard Worker      to an incorrect destructor call or verbose syntax error message
1960*cda5da8dSAndroid Build Coastguard Worker      before the lookahead is translated.  */
1961*cda5da8dSAndroid Build Coastguard Worker   YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1962*cda5da8dSAndroid Build Coastguard Worker 
1963*cda5da8dSAndroid Build Coastguard Worker   YYPOPSTACK (yylen);
1964*cda5da8dSAndroid Build Coastguard Worker   yylen = 0;
1965*cda5da8dSAndroid Build Coastguard Worker 
1966*cda5da8dSAndroid Build Coastguard Worker   *++yyvsp = yyval;]b4_locations_if([
1967*cda5da8dSAndroid Build Coastguard Worker   *++yylsp = yyloc;])[
1968*cda5da8dSAndroid Build Coastguard Worker 
1969*cda5da8dSAndroid Build Coastguard Worker   /* Now 'shift' the result of the reduction.  Determine what state
1970*cda5da8dSAndroid Build Coastguard Worker      that goes to, based on the state we popped back to and the rule
1971*cda5da8dSAndroid Build Coastguard Worker      number reduced by.  */
1972*cda5da8dSAndroid Build Coastguard Worker   {
1973*cda5da8dSAndroid Build Coastguard Worker     const int yylhs = yyr1[yyn] - YYNTOKENS;
1974*cda5da8dSAndroid Build Coastguard Worker     const int yyi = yypgoto[yylhs] + *yyssp;
1975*cda5da8dSAndroid Build Coastguard Worker     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1976*cda5da8dSAndroid Build Coastguard Worker                ? yytable[yyi]
1977*cda5da8dSAndroid Build Coastguard Worker                : yydefgoto[yylhs]);
1978*cda5da8dSAndroid Build Coastguard Worker   }
1979*cda5da8dSAndroid Build Coastguard Worker 
1980*cda5da8dSAndroid Build Coastguard Worker   goto yynewstate;
1981*cda5da8dSAndroid Build Coastguard Worker 
1982*cda5da8dSAndroid Build Coastguard Worker 
1983*cda5da8dSAndroid Build Coastguard Worker /*--------------------------------------.
1984*cda5da8dSAndroid Build Coastguard Worker | yyerrlab -- here on detecting error.  |
1985*cda5da8dSAndroid Build Coastguard Worker `--------------------------------------*/
1986*cda5da8dSAndroid Build Coastguard Worker yyerrlab:
1987*cda5da8dSAndroid Build Coastguard Worker   /* Make sure we have latest lookahead translation.  See comments at
1988*cda5da8dSAndroid Build Coastguard Worker      user semantic actions for why this is necessary.  */
1989*cda5da8dSAndroid Build Coastguard Worker   yytoken = yychar == ]b4_symbol(empty, id)[ ? ]b4_symbol(empty, kind)[ : YYTRANSLATE (yychar);
1990*cda5da8dSAndroid Build Coastguard Worker   /* If not already recovering from an error, report this error.  */
1991*cda5da8dSAndroid Build Coastguard Worker   if (!yyerrstatus)
1992*cda5da8dSAndroid Build Coastguard Worker     {
1993*cda5da8dSAndroid Build Coastguard Worker       ++yynerrs;
1994*cda5da8dSAndroid Build Coastguard Worker ]b4_parse_error_case(
1995*cda5da8dSAndroid Build Coastguard Worker          [custom],
1996*cda5da8dSAndroid Build Coastguard Worker [[      {
1997*cda5da8dSAndroid Build Coastguard Worker         yypcontext_t yyctx
1998*cda5da8dSAndroid Build Coastguard Worker           = {]b4_push_if([[yyps]], [[yyssp]b4_lac_if([[, yyesa, &yyes, &yyes_capacity]])])[, yytoken]b4_locations_if([[, &yylloc]])[};]b4_lac_if([[
1999*cda5da8dSAndroid Build Coastguard Worker         if (yychar != ]b4_symbol(empty, id)[)
2000*cda5da8dSAndroid Build Coastguard Worker           YY_LAC_ESTABLISH;]])[
2001*cda5da8dSAndroid Build Coastguard Worker         if (yyreport_syntax_error (&yyctx]m4_ifset([b4_parse_param],
2002*cda5da8dSAndroid Build Coastguard Worker                                    [[, ]b4_args(b4_parse_param)])[) == 2)
2003*cda5da8dSAndroid Build Coastguard Worker           YYNOMEM;
2004*cda5da8dSAndroid Build Coastguard Worker       }]],
2005*cda5da8dSAndroid Build Coastguard Worker          [simple],
2006*cda5da8dSAndroid Build Coastguard Worker [[      yyerror (]b4_yyerror_args[YY_("syntax error"));]],
2007*cda5da8dSAndroid Build Coastguard Worker [[      {
2008*cda5da8dSAndroid Build Coastguard Worker         yypcontext_t yyctx
2009*cda5da8dSAndroid Build Coastguard Worker           = {]b4_push_if([[yyps]], [[yyssp]b4_lac_if([[, yyesa, &yyes, &yyes_capacity]])])[, yytoken]b4_locations_if([[, &yylloc]])[};
2010*cda5da8dSAndroid Build Coastguard Worker         char const *yymsgp = YY_("syntax error");
2011*cda5da8dSAndroid Build Coastguard Worker         int yysyntax_error_status;]b4_lac_if([[
2012*cda5da8dSAndroid Build Coastguard Worker         if (yychar != ]b4_symbol(empty, id)[)
2013*cda5da8dSAndroid Build Coastguard Worker           YY_LAC_ESTABLISH;]])[
2014*cda5da8dSAndroid Build Coastguard Worker         yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
2015*cda5da8dSAndroid Build Coastguard Worker         if (yysyntax_error_status == 0)
2016*cda5da8dSAndroid Build Coastguard Worker           yymsgp = yymsg;
2017*cda5da8dSAndroid Build Coastguard Worker         else if (yysyntax_error_status == -1)
2018*cda5da8dSAndroid Build Coastguard Worker           {
2019*cda5da8dSAndroid Build Coastguard Worker             if (yymsg != yymsgbuf)
2020*cda5da8dSAndroid Build Coastguard Worker               YYSTACK_FREE (yymsg);
2021*cda5da8dSAndroid Build Coastguard Worker             yymsg = YY_CAST (char *,
2022*cda5da8dSAndroid Build Coastguard Worker                              YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
2023*cda5da8dSAndroid Build Coastguard Worker             if (yymsg)
2024*cda5da8dSAndroid Build Coastguard Worker               {
2025*cda5da8dSAndroid Build Coastguard Worker                 yysyntax_error_status
2026*cda5da8dSAndroid Build Coastguard Worker                   = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
2027*cda5da8dSAndroid Build Coastguard Worker                 yymsgp = yymsg;
2028*cda5da8dSAndroid Build Coastguard Worker               }
2029*cda5da8dSAndroid Build Coastguard Worker             else
2030*cda5da8dSAndroid Build Coastguard Worker               {
2031*cda5da8dSAndroid Build Coastguard Worker                 yymsg = yymsgbuf;
2032*cda5da8dSAndroid Build Coastguard Worker                 yymsg_alloc = sizeof yymsgbuf;
2033*cda5da8dSAndroid Build Coastguard Worker                 yysyntax_error_status = YYENOMEM;
2034*cda5da8dSAndroid Build Coastguard Worker               }
2035*cda5da8dSAndroid Build Coastguard Worker           }
2036*cda5da8dSAndroid Build Coastguard Worker         yyerror (]b4_yyerror_args[yymsgp);
2037*cda5da8dSAndroid Build Coastguard Worker         if (yysyntax_error_status == YYENOMEM)
2038*cda5da8dSAndroid Build Coastguard Worker           YYNOMEM;
2039*cda5da8dSAndroid Build Coastguard Worker       }]])[
2040*cda5da8dSAndroid Build Coastguard Worker     }
2041*cda5da8dSAndroid Build Coastguard Worker ]b4_locations_if([[
2042*cda5da8dSAndroid Build Coastguard Worker   yyerror_range[1] = yylloc;]])[
2043*cda5da8dSAndroid Build Coastguard Worker   if (yyerrstatus == 3)
2044*cda5da8dSAndroid Build Coastguard Worker     {
2045*cda5da8dSAndroid Build Coastguard Worker       /* If just tried and failed to reuse lookahead token after an
2046*cda5da8dSAndroid Build Coastguard Worker          error, discard it.  */
2047*cda5da8dSAndroid Build Coastguard Worker 
2048*cda5da8dSAndroid Build Coastguard Worker       if (yychar <= ]b4_symbol(eof, [id])[)
2049*cda5da8dSAndroid Build Coastguard Worker         {
2050*cda5da8dSAndroid Build Coastguard Worker           /* Return failure if at end of input.  */
2051*cda5da8dSAndroid Build Coastguard Worker           if (yychar == ]b4_symbol(eof, [id])[)
2052*cda5da8dSAndroid Build Coastguard Worker             YYABORT;
2053*cda5da8dSAndroid Build Coastguard Worker         }
2054*cda5da8dSAndroid Build Coastguard Worker       else
2055*cda5da8dSAndroid Build Coastguard Worker         {
2056*cda5da8dSAndroid Build Coastguard Worker           yydestruct ("Error: discarding",
2057*cda5da8dSAndroid Build Coastguard Worker                       yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
2058*cda5da8dSAndroid Build Coastguard Worker           yychar = ]b4_symbol(empty, id)[;
2059*cda5da8dSAndroid Build Coastguard Worker         }
2060*cda5da8dSAndroid Build Coastguard Worker     }
2061*cda5da8dSAndroid Build Coastguard Worker 
2062*cda5da8dSAndroid Build Coastguard Worker   /* Else will try to reuse lookahead token after shifting the error
2063*cda5da8dSAndroid Build Coastguard Worker      token.  */
2064*cda5da8dSAndroid Build Coastguard Worker   goto yyerrlab1;
2065*cda5da8dSAndroid Build Coastguard Worker 
2066*cda5da8dSAndroid Build Coastguard Worker 
2067*cda5da8dSAndroid Build Coastguard Worker /*---------------------------------------------------.
2068*cda5da8dSAndroid Build Coastguard Worker | yyerrorlab -- error raised explicitly by YYERROR.  |
2069*cda5da8dSAndroid Build Coastguard Worker `---------------------------------------------------*/
2070*cda5da8dSAndroid Build Coastguard Worker yyerrorlab:
2071*cda5da8dSAndroid Build Coastguard Worker   /* Pacify compilers when the user code never invokes YYERROR and the
2072*cda5da8dSAndroid Build Coastguard Worker      label yyerrorlab therefore never appears in user code.  */
2073*cda5da8dSAndroid Build Coastguard Worker   if (0)
2074*cda5da8dSAndroid Build Coastguard Worker     YYERROR;
2075*cda5da8dSAndroid Build Coastguard Worker   ++yynerrs;
2076*cda5da8dSAndroid Build Coastguard Worker 
2077*cda5da8dSAndroid Build Coastguard Worker   /* Do not reclaim the symbols of the rule whose action triggered
2078*cda5da8dSAndroid Build Coastguard Worker      this YYERROR.  */
2079*cda5da8dSAndroid Build Coastguard Worker   YYPOPSTACK (yylen);
2080*cda5da8dSAndroid Build Coastguard Worker   yylen = 0;
2081*cda5da8dSAndroid Build Coastguard Worker   YY_STACK_PRINT (yyss, yyssp);
2082*cda5da8dSAndroid Build Coastguard Worker   yystate = *yyssp;
2083*cda5da8dSAndroid Build Coastguard Worker   goto yyerrlab1;
2084*cda5da8dSAndroid Build Coastguard Worker 
2085*cda5da8dSAndroid Build Coastguard Worker 
2086*cda5da8dSAndroid Build Coastguard Worker /*-------------------------------------------------------------.
2087*cda5da8dSAndroid Build Coastguard Worker | yyerrlab1 -- common code for both syntax error and YYERROR.  |
2088*cda5da8dSAndroid Build Coastguard Worker `-------------------------------------------------------------*/
2089*cda5da8dSAndroid Build Coastguard Worker yyerrlab1:
2090*cda5da8dSAndroid Build Coastguard Worker   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2091*cda5da8dSAndroid Build Coastguard Worker 
2092*cda5da8dSAndroid Build Coastguard Worker   /* Pop stack until we find a state that shifts the error token.  */
2093*cda5da8dSAndroid Build Coastguard Worker   for (;;)
2094*cda5da8dSAndroid Build Coastguard Worker     {
2095*cda5da8dSAndroid Build Coastguard Worker       yyn = yypact[yystate];
2096*cda5da8dSAndroid Build Coastguard Worker       if (!yypact_value_is_default (yyn))
2097*cda5da8dSAndroid Build Coastguard Worker         {
2098*cda5da8dSAndroid Build Coastguard Worker           yyn += ]b4_symbol(error, kind)[;
2099*cda5da8dSAndroid Build Coastguard Worker           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == ]b4_symbol(error, kind)[)
2100*cda5da8dSAndroid Build Coastguard Worker             {
2101*cda5da8dSAndroid Build Coastguard Worker               yyn = yytable[yyn];
2102*cda5da8dSAndroid Build Coastguard Worker               if (0 < yyn)
2103*cda5da8dSAndroid Build Coastguard Worker                 break;
2104*cda5da8dSAndroid Build Coastguard Worker             }
2105*cda5da8dSAndroid Build Coastguard Worker         }
2106*cda5da8dSAndroid Build Coastguard Worker 
2107*cda5da8dSAndroid Build Coastguard Worker       /* Pop the current state because it cannot handle the error token.  */
2108*cda5da8dSAndroid Build Coastguard Worker       if (yyssp == yyss)
2109*cda5da8dSAndroid Build Coastguard Worker         YYABORT;
2110*cda5da8dSAndroid Build Coastguard Worker 
2111*cda5da8dSAndroid Build Coastguard Worker ]b4_locations_if([[      yyerror_range[1] = *yylsp;]])[
2112*cda5da8dSAndroid Build Coastguard Worker       yydestruct ("Error: popping",
2113*cda5da8dSAndroid Build Coastguard Worker                   YY_ACCESSING_SYMBOL (yystate), yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
2114*cda5da8dSAndroid Build Coastguard Worker       YYPOPSTACK (1);
2115*cda5da8dSAndroid Build Coastguard Worker       yystate = *yyssp;
2116*cda5da8dSAndroid Build Coastguard Worker       YY_STACK_PRINT (yyss, yyssp);
2117*cda5da8dSAndroid Build Coastguard Worker     }]b4_lac_if([[
2118*cda5da8dSAndroid Build Coastguard Worker 
2119*cda5da8dSAndroid Build Coastguard Worker   /* If the stack popping above didn't lose the initial context for the
2120*cda5da8dSAndroid Build Coastguard Worker      current lookahead token, the shift below will for sure.  */
2121*cda5da8dSAndroid Build Coastguard Worker   YY_LAC_DISCARD ("error recovery");]])[
2122*cda5da8dSAndroid Build Coastguard Worker 
2123*cda5da8dSAndroid Build Coastguard Worker   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2124*cda5da8dSAndroid Build Coastguard Worker   *++yyvsp = yylval;
2125*cda5da8dSAndroid Build Coastguard Worker   YY_IGNORE_MAYBE_UNINITIALIZED_END
2126*cda5da8dSAndroid Build Coastguard Worker ]b4_locations_if([[
2127*cda5da8dSAndroid Build Coastguard Worker   yyerror_range[2] = yylloc;
2128*cda5da8dSAndroid Build Coastguard Worker   ++yylsp;
2129*cda5da8dSAndroid Build Coastguard Worker   YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);]])[
2130*cda5da8dSAndroid Build Coastguard Worker 
2131*cda5da8dSAndroid Build Coastguard Worker   /* Shift the error token.  */
2132*cda5da8dSAndroid Build Coastguard Worker   YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
2133*cda5da8dSAndroid Build Coastguard Worker 
2134*cda5da8dSAndroid Build Coastguard Worker   yystate = yyn;
2135*cda5da8dSAndroid Build Coastguard Worker   goto yynewstate;
2136*cda5da8dSAndroid Build Coastguard Worker 
2137*cda5da8dSAndroid Build Coastguard Worker 
2138*cda5da8dSAndroid Build Coastguard Worker /*-------------------------------------.
2139*cda5da8dSAndroid Build Coastguard Worker | yyacceptlab -- YYACCEPT comes here.  |
2140*cda5da8dSAndroid Build Coastguard Worker `-------------------------------------*/
2141*cda5da8dSAndroid Build Coastguard Worker yyacceptlab:
2142*cda5da8dSAndroid Build Coastguard Worker   yyresult = 0;
2143*cda5da8dSAndroid Build Coastguard Worker   goto yyreturnlab;
2144*cda5da8dSAndroid Build Coastguard Worker 
2145*cda5da8dSAndroid Build Coastguard Worker 
2146*cda5da8dSAndroid Build Coastguard Worker /*-----------------------------------.
2147*cda5da8dSAndroid Build Coastguard Worker | yyabortlab -- YYABORT comes here.  |
2148*cda5da8dSAndroid Build Coastguard Worker `-----------------------------------*/
2149*cda5da8dSAndroid Build Coastguard Worker yyabortlab:
2150*cda5da8dSAndroid Build Coastguard Worker   yyresult = 1;
2151*cda5da8dSAndroid Build Coastguard Worker   goto yyreturnlab;
2152*cda5da8dSAndroid Build Coastguard Worker 
2153*cda5da8dSAndroid Build Coastguard Worker 
2154*cda5da8dSAndroid Build Coastguard Worker /*-----------------------------------------------------------.
2155*cda5da8dSAndroid Build Coastguard Worker | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
2156*cda5da8dSAndroid Build Coastguard Worker `-----------------------------------------------------------*/
2157*cda5da8dSAndroid Build Coastguard Worker yyexhaustedlab:
2158*cda5da8dSAndroid Build Coastguard Worker   yyerror (]b4_yyerror_args[YY_("memory exhausted"));
2159*cda5da8dSAndroid Build Coastguard Worker   yyresult = 2;
2160*cda5da8dSAndroid Build Coastguard Worker   goto yyreturnlab;
2161*cda5da8dSAndroid Build Coastguard Worker 
2162*cda5da8dSAndroid Build Coastguard Worker 
2163*cda5da8dSAndroid Build Coastguard Worker /*----------------------------------------------------------.
2164*cda5da8dSAndroid Build Coastguard Worker | yyreturnlab -- parsing is finished, clean up and return.  |
2165*cda5da8dSAndroid Build Coastguard Worker `----------------------------------------------------------*/
2166*cda5da8dSAndroid Build Coastguard Worker yyreturnlab:
2167*cda5da8dSAndroid Build Coastguard Worker   if (yychar != ]b4_symbol(empty, id)[)
2168*cda5da8dSAndroid Build Coastguard Worker     {
2169*cda5da8dSAndroid Build Coastguard Worker       /* Make sure we have latest lookahead translation.  See comments at
2170*cda5da8dSAndroid Build Coastguard Worker          user semantic actions for why this is necessary.  */
2171*cda5da8dSAndroid Build Coastguard Worker       yytoken = YYTRANSLATE (yychar);
2172*cda5da8dSAndroid Build Coastguard Worker       yydestruct ("Cleanup: discarding lookahead",
2173*cda5da8dSAndroid Build Coastguard Worker                   yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
2174*cda5da8dSAndroid Build Coastguard Worker     }
2175*cda5da8dSAndroid Build Coastguard Worker   /* Do not reclaim the symbols of the rule whose action triggered
2176*cda5da8dSAndroid Build Coastguard Worker      this YYABORT or YYACCEPT.  */
2177*cda5da8dSAndroid Build Coastguard Worker   YYPOPSTACK (yylen);
2178*cda5da8dSAndroid Build Coastguard Worker   YY_STACK_PRINT (yyss, yyssp);
2179*cda5da8dSAndroid Build Coastguard Worker   while (yyssp != yyss)
2180*cda5da8dSAndroid Build Coastguard Worker     {
2181*cda5da8dSAndroid Build Coastguard Worker       yydestruct ("Cleanup: popping",
2182*cda5da8dSAndroid Build Coastguard Worker                   YY_ACCESSING_SYMBOL (+*yyssp), yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
2183*cda5da8dSAndroid Build Coastguard Worker       YYPOPSTACK (1);
2184*cda5da8dSAndroid Build Coastguard Worker     }]b4_push_if([[
2185*cda5da8dSAndroid Build Coastguard Worker   yyps->yynew = 2;
2186*cda5da8dSAndroid Build Coastguard Worker   goto yypushreturn;
2187*cda5da8dSAndroid Build Coastguard Worker 
2188*cda5da8dSAndroid Build Coastguard Worker 
2189*cda5da8dSAndroid Build Coastguard Worker /*-------------------------.
2190*cda5da8dSAndroid Build Coastguard Worker | yypushreturn -- return.  |
2191*cda5da8dSAndroid Build Coastguard Worker `-------------------------*/
2192*cda5da8dSAndroid Build Coastguard Worker yypushreturn:]], [[
2193*cda5da8dSAndroid Build Coastguard Worker #ifndef yyoverflow
2194*cda5da8dSAndroid Build Coastguard Worker   if (yyss != yyssa)
2195*cda5da8dSAndroid Build Coastguard Worker     YYSTACK_FREE (yyss);
2196*cda5da8dSAndroid Build Coastguard Worker #endif]b4_lac_if([[
2197*cda5da8dSAndroid Build Coastguard Worker   if (yyes != yyesa)
2198*cda5da8dSAndroid Build Coastguard Worker     YYSTACK_FREE (yyes);]])])[
2199*cda5da8dSAndroid Build Coastguard Worker ]b4_parse_error_bmatch([detailed\|verbose],
2200*cda5da8dSAndroid Build Coastguard Worker [[  if (yymsg != yymsgbuf)
2201*cda5da8dSAndroid Build Coastguard Worker     YYSTACK_FREE (yymsg);]])[]m4_ifdef([b4_start_symbols], [[
2202*cda5da8dSAndroid Build Coastguard Worker   if (yyimpl)
2203*cda5da8dSAndroid Build Coastguard Worker     yyimpl->yynerrs = yynerrs;]])[
2204*cda5da8dSAndroid Build Coastguard Worker   return yyresult;
2205*cda5da8dSAndroid Build Coastguard Worker }
2206*cda5da8dSAndroid Build Coastguard Worker ]b4_push_if([b4_parse_state_variable_macros([b4_macro_undef])])[
2207*cda5da8dSAndroid Build Coastguard Worker ]b4_percent_code_get([[epilogue]])[]dnl
2208*cda5da8dSAndroid Build Coastguard Worker b4_epilogue[]dnl
2209*cda5da8dSAndroid Build Coastguard Worker b4_output_end
2210