1 # Java skeleton
for Bison
-*- autoconf
-*-
3 #
Copyright (C
) 2007, 2008 Free Software Foundation
, Inc
.
5 # This program is free software
: you can redistribute it and
/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation
, either version
3 of the License
, or
8 #
(at your option
) any later version
.
10 # This program is distributed in the hope that it will be useful
,
11 # but WITHOUT ANY WARRANTY
; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
. See the
13 # GNU General Public License
for more details
.
15 # You should have received a copy of the GNU General Public License
16 # along with
this program
. If not
, see
<http
://www.gnu.org/licenses/>.
18 m4_include(b4_pkgdatadir
/[java
.m4
])
20 b4_defines_if([b4_fatal([%s
: %%defines does not make sense in Java
], [b4_skeleton
])])
21 m4_ifval(m4_defn([b4_symbol_destructors
]),
22 [b4_fatal([%s
: %%destructor does not make sense in Java
], [b4_skeleton
])],
26 @output(b4_parser_file_name@
)@
27 b4_copyright([Skeleton implementation
for Bison
LALR(1) parsers in Java
],
30 b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
31 ])[/* First part of user declarations. */
34 b4_percent_code_get([[imports
]])
36 * A Bison parser, automatically generated from <tt>]m4_bpatsubst(b4_file_name, [^"\(.*\)"$], [\1])[</tt>.
38 * @@author LALR (1) parser skeleton written by Paolo Bonzini.
40 ]b4_percent_define_get3([annotations
], [], [ ])dnl
41 b4_public_if([public ])dnl
42 b4_abstract_if([abstract ])dnl
43 b4_final_if([final ])dnl
44 b4_strictfp_if([strictfp ])dnl
45 [class ]b4_parser_class_name
[]dnl
46 b4_percent_define_get3([extends], [ extends ])dnl
47 b4_percent_define_get3([implements], [ implements ])[
50 ]b4_error_verbose_if([[
51 /** True if verbose error messages are enabled. */
52 private boolean yyErrorVerbose
= true;
55 * Return whether verbose error messages are enabled.
57 public final boolean getErrorVerbose() { return yyErrorVerbose
; }
60 * Set the verbosity of error messages.
61 * @@param verbose True to request verbose error messages.
63 public final void setErrorVerbose(boolean verbose
)
64 { yyErrorVerbose
= verbose
; }
69 * A class defining a pair of positions. Positions, defined by the
70 * <code>]b4_position_type[</code> class, denote a point in the input.
71 * Locations represent a part of the input through the beginning
72 * and ending positions. */
73 public class ]b4_location_type
[ {
74 /** The first, inclusive, position in the range. */
75 public ]b4_position_type
[ begin
;
77 /** The first position beyond the range. */
78 public ]b4_position_type
[ end
;
81 * Create a <code>]b4_location_type[</code> denoting an empty range located at
83 * @@param loc The position at which the range is anchored. */
84 public ]b4_location_type
[ (]b4_position_type
[ loc
) {
85 this.begin
= this.end
= loc
;
89 * Create a <code>]b4_location_type[</code> from the endpoints of the range.
90 * @@param begin The first position included in the range.
91 * @@param end The first position beyond the range. */
92 public ]b4_location_type
[ (]b4_position_type
[ begin
, ]b4_position_type
[ end
) {
98 * Print a representation of the location. For this to be correct,
99 * <code>]b4_position_type[</code> should override the <code>equals</code>
101 public String
toString () {
102 if (begin
.equals (end
))
103 return begin
.toString ();
105 return begin
.toString () + "-" + end
.toString ();
112 private ]b4_location_type
[ yylloc (YYStack rhs
, int n
)
115 return new ]b4_location_type
[ (rhs
.locationAt (1).begin
, rhs
.locationAt (n
).end
);
117 return new ]b4_location_type
[ (rhs
.locationAt (0).end
);
121 * Communication interface between the scanner and the Bison-generated
122 * parser <tt>]b4_parser_class_name[</tt>.
124 public interface Lexer
{
125 /** Token returned by the scanner to signal the end of its input. */
126 public static final int EOF
= 0;
128 ]b4_token_enums(b4_tokens
)[
130 ]b4_locations_if([[/**
131 * Method to retrieve the beginning position of the last scanned token.
132 * @@return the position at which the last scanned token starts. */
133 ]b4_position_type
[ getStartPos ();
136 * Method to retrieve the ending position of the last scanned token.
137 * @@return the first position beyond the last scanned token. */
138 ]b4_position_type
[ getEndPos ();]])[
141 * Method to retrieve the semantic value of the last scanned token.
142 * @@return the semantic value of the last scanned token. */
143 ]b4_yystype
[ getLVal ();
146 * Entry point for the scanner. Returns the token identifier corresponding
147 * to the next token and prepares to return the semantic value
148 * ]b4_locations_if([and beginning/ending positions ])[of the token.
149 * @@return the token identifier corresponding to the next token. */
150 int yylex () ]b4_maybe_throws([b4_lex_throws
])[;
153 * Entry point for error reporting. Emits an error
154 * ]b4_locations_if([referring to the given location ])[in a user-defined way.
156 * ]b4_locations_if([[@@param loc The location of the element to which the
157 * error message is related]])[
158 * @@param msg The string for the error message. */
159 void yyerror (]b4_locations_if([b4_location_type
[ loc
, ]])[String msg
);]
162 b4_lexer_if([[private class YYLexer
implements Lexer
{
163 ]b4_percent_code_get([[lexer
]])[
166 ]])[/** The object doing lexical analysis for us. */
167 private Lexer yylexer
;
173 * Instantiates the Bison-generated parser.
175 public ]b4_parser_class_name (b4_parse_param_decl([b4_lex_param_decl
])[) ]b4_maybe_throws([b4_init_throws
])[
177 ]b4_percent_code_get([[init
]])[
178 this.yylexer
= new YYLexer(]b4_lex_param_call
[);
179 ]b4_parse_param_cons
[
184 * Instantiates the Bison-generated parser.
185 * @@param yylexer The scanner that will supply tokens to the parser.
187 b4_lexer_if([[protected]], [[public]]) b4_parser_class_name
[ (]b4_parse_param_decl([[Lexer yylexer
]])[) ]b4_maybe_throws([b4_init_throws
])[
189 ]b4_percent_code_get([[init
]])[
190 this.yylexer
= yylexer
;
191 ]b4_parse_param_cons
[
194 private java
.io
.PrintStream yyDebugStream
= System
.err
;
197 * Return the <tt>PrintStream</tt> on which the debugging output is
200 public final java
.io
.PrintStream
getDebugStream () { return yyDebugStream
; }
203 * Set the <tt>PrintStream</tt> on which the debug output is printed.
204 * @@param s The stream that is used for debugging output.
206 public final void setDebugStream(java
.io
.PrintStream s
) { yyDebugStream
= s
; }
208 private int yydebug
= 0;
211 * Answer the verbosity of the debugging output; 0 means that all kinds of
212 * output from the parser are suppressed.
214 public final int getDebugLevel() { return yydebug
; }
217 * Set the verbosity of the debugging output; 0 means that all kinds of
218 * output from the parser are suppressed.
219 * @@param level The verbosity level for debugging output.
221 public final void setDebugLevel(int level
) { yydebug
= level
; }
224 * Print an error message via the lexer.
225 *]b4_locations_if([[ Use a <code>null</code> location.]])[
226 * @@param msg The error message.
228 public final void yyerror (String msg
)
230 yylexer
.yyerror (]b4_locations_if([[(]b4_location_type
[)null, ]])[msg
);
234 * Print an error message via the lexer.
235 * @@param loc The location associated with the message.
236 * @@param msg The error message.
238 public final void yyerror (]b4_location_type
[ loc
, String msg
)
240 yylexer
.yyerror (loc
, msg
);
244 * Print an error message via the lexer.
245 * @@param pos The position associated with the message.
246 * @@param msg The error message.
248 public final void yyerror (]b4_position_type
[ pos
, String msg
)
250 yylexer
.yyerror (new ]b4_location_type
[ (pos
), msg
);
253 [protected final void yycdebug (String s
) {
255 yyDebugStream
.println (s
);
258 private final class YYStack
{
259 private int[] stateStack
= new int[16];
260 ]b4_locations_if([[private ]b4_location_type
[[] locStack
= new ]b4_location_type
[[16];]])[
261 private ]b4_yystype
[[] valueStack
= new ]b4_yystype
[[16];
263 public int size
= 16;
264 public int height
= -1;
266 public final void push (int state
, ]b4_yystype
[ value
]dnl
267 b4_locations_if([, ]b4_location_type
[ loc
])[) {
271 int[] newStateStack
= new int[size
* 2];
272 System
.arraycopy (stateStack
, 0, newStateStack
, 0, height
);
273 stateStack
= newStateStack
;
275 ]b4_location_type
[[] newLocStack
= new ]b4_location_type
[[size
* 2];
276 System
.arraycopy (locStack
, 0, newLocStack
, 0, height
);
277 locStack
= newLocStack
;]])
279 b4_yystype
[[] newValueStack
= new ]b4_yystype
[[size
* 2];
280 System
.arraycopy (valueStack
, 0, newValueStack
, 0, height
);
281 valueStack
= newValueStack
;
286 stateStack
[height
] = state
;
287 ]b4_locations_if([[locStack
[height
] = loc
;]])[
288 valueStack
[height
] = value
;
291 public final void pop () {
295 public final void pop (int num
) {
296 // Avoid memory leaks... garbage collection is a white lie!
298 java
.util
.Arrays
.fill (valueStack
, height
- num
+ 1, height
, null);
299 ]b4_locations_if([[java
.util
.Arrays
.fill (locStack
, height
- num
+ 1, height
, null);]])[
304 public final int stateAt (int i
) {
305 return stateStack
[height
- i
];
308 ]b4_locations_if([[public final ]b4_location_type
[ locationAt (int i
) {
309 return locStack
[height
- i
];
312 ]])[public final ]b4_yystype
[ valueAt (int i
) {
313 return valueStack
[height
- i
];
316 // Print the state stack on the debug stream.
317 public void print (java
.io
.PrintStream out
)
319 out
.print ("Stack now");
321 for (int i
= 0; i
< height
; i
++)
324 out
.print (stateStack
[i
]);
331 * Returned by a Bison action in order to stop the parsing process and
332 * return success (<tt>true</tt>). */
333 public static final int YYACCEPT
= 0;
336 * Returned by a Bison action in order to stop the parsing process and
337 * return failure (<tt>false</tt>). */
338 public static final int YYABORT
= 1;
341 * Returned by a Bison action in order to start error recovery without
342 * printing an error message. */
343 public static final int YYERROR
= 2;
346 * Returned by a Bison action in order to print an error message and start
348 public static final int YYFAIL
= 3;
350 private static final int YYNEWSTATE
= 4;
351 private static final int YYDEFAULT
= 5;
352 private static final int YYREDUCE
= 6;
353 private static final int YYERRLAB1
= 7;
354 private static final int YYRETURN
= 8;
356 private int yyerrstatus_
= 0;
359 * Return whether error recovery is being done. In this state, the parser
360 * reads token until it reaches a known state, and then restarts normal
362 public final boolean recovering ()
364 return yyerrstatus_
== 0;
367 private int yyaction (int yyn
, YYStack yystack
, int yylen
) ]b4_maybe_throws([b4_throws
])[
370 ]b4_locations_if([b4_location_type
[ yyloc
= yylloc (yystack
, yylen
);]])[
372 /* If YYLEN is nonzero, implement the default value of the action:
373 `$$ = $1'. Otherwise, use the top of the stack.
375 Otherwise, the following line sets YYVAL to garbage.
376 This behavior is undocumented and Bison
377 users should not rely upon it. */
379 yyval
= yystack
.valueAt (yylen
- 1);
381 yyval
= yystack
.valueAt (0);
383 yy_reduce_print (yyn
, yystack
);
391 yy_symbol_print ("-> $$ =", yyr1_
[yyn
], yyval
]b4_locations_if([, yyloc
])[);
396 /* Shift the result of the reduction. */
398 int yystate
= yypgoto_
[yyn
- yyntokens_
] + yystack
.stateAt (0);
399 if (0 <= yystate
&& yystate
<= yylast_
400 && yycheck_
[yystate
] == yystack
.stateAt (0))
401 yystate
= yytable_
[yystate
];
403 yystate
= yydefgoto_
[yyn
- yyntokens_
];
405 yystack
.push (yystate
, yyval
]b4_locations_if([, yyloc
])[);
409 ]b4_error_verbose_if([[
410 /* Return YYSTR after stripping away unnecessary quotes and
411 backslashes, so that it's suitable for yyerror. The heuristic is
412 that double-quoting is unnecessary unless the string contains an
413 apostrophe, a comma, or backslash (other than backslash-backslash).
414 YYSTR is taken from yytname. */
415 private final String
yytnamerr_ (String yystr
)
417 if (yystr
.charAt (0) == '"')
419 StringBuffer yyr
= new StringBuffer ();
420 strip_quotes
: for (int i
= 1; i
< yystr
.length (); i
++)
421 switch (yystr
.charAt (i
))
428 if (yystr
.charAt(++i
) != '\\')
432 yyr
.append (yystr
.charAt (i
));
436 return yyr
.toString ();
439 else if (yystr
.equals ("$end"))
440 return "end of input";
446 /*--------------------------------.
447 | Print this symbol on YYOUTPUT. |
448 `--------------------------------*/
450 private void yy_symbol_print (String s
, int yytype
,
451 ]b4_yystype
[ yyvaluep
]dnl
452 b4_locations_if([, Object yylocationp
])[)
455 yycdebug (s
+ (yytype
< yyntokens_ ?
" token " : " nterm ")
456 + yytname_
[yytype
] + " ("]b4_locations_if([
457 + yylocationp
+ ": "])[
458 + (yyvaluep
== null ?
"(null)" : yyvaluep
.toString ()) + ")");
462 * Parse input from the scanner that was specified at object construction
463 * time. Return whether the end of the input was reached successfully.
465 * @@return <tt>true</tt> if the parsing succeeds. Note that this does not
466 * imply that there were no syntax errors.
468 public boolean parse () ]b4_maybe_throws([b4_list2([b4_lex_throws
], [b4_throws
])])[
470 /// Lookahead and lookahead in internal form.
471 int yychar
= yyempty_
;
479 YYStack yystack
= new YYStack ();
481 /* Error handling. */
483 ]b4_locations_if([/// The location where the error started.
484 ]b4_location_type
[ yyerrloc
= null;
486 /// ]b4_location_type[ of the lookahead.
487 ]b4_location_type
[ yylloc
= new ]b4_location_type
[ (null, null);
490 ]b4_location_type
[ yyloc
;])
492 /// Semantic value of the lookahead.
493 b4_yystype
[ yylval
= null;
497 yycdebug ("Starting parse\n");
500 ]m4_ifdef([b4_initial_action
], [
501 m4_pushdef([b4_at_dollar
], [yylloc
])dnl
502 m4_pushdef([b4_dollar_dollar
], [yylval
])dnl
503 /* User initialization code. */
504 b4_user_initial_action
505 m4_popdef([b4_dollar_dollar
])dnl
506 m4_popdef([b4_at_dollar
])])dnl
508 [ /* Initialize the stack. */
509 yystack
.push (yystate
, yylval
]b4_locations_if([, yylloc
])[);
511 int label
= YYNEWSTATE
;
515 /* New state. Unlike in the C/C++ skeletons, the state is already
516 pushed when we come here. */
518 yycdebug ("Entering state " + yystate
+ "\n");
520 yystack
.print (yyDebugStream
);
523 if (yystate
== yyfinal_
)
526 /* Take a decision. First try without lookahead. */
527 yyn
= yypact_
[yystate
];
528 if (yyn
== yypact_ninf_
)
534 /* Read a lookahead token. */
535 if (yychar
== yyempty_
)
537 yycdebug ("Reading a token: ");
538 yychar
= yylexer
.yylex ();]
540 yylloc
= new ]b4_location_type
[(yylexer
.getStartPos (),
541 yylexer
.getEndPos ());]])
542 yylval
= yylexer
.getLVal ();[
545 /* Convert token to internal form. */
546 if (yychar
<= Lexer
.EOF
)
548 yychar
= yytoken
= Lexer
.EOF
;
549 yycdebug ("Now at end of input.\n");
553 yytoken
= yytranslate_ (yychar
);
554 yy_symbol_print ("Next token is", yytoken
,
555 yylval
]b4_locations_if([, yylloc
])[);
558 /* If the proper action on seeing token YYTOKEN is to reduce or to
559 detect an error, take that action. */
561 if (yyn
< 0 || yylast_
< yyn
|| yycheck_
[yyn
] != yytoken
)
564 /* <= 0 means reduce or error. */
565 else if ((yyn
= yytable_
[yyn
]) <= 0)
567 if (yyn
== 0 || yyn
== yytable_ninf_
)
578 /* Shift the lookahead token. */
579 yy_symbol_print ("Shifting", yytoken
,
580 yylval
]b4_locations_if([, yylloc
])[);
582 /* Discard the token being shifted. */
585 /* Count tokens shifted since error; after three, turn off error
587 if (yyerrstatus_
> 0)
591 yystack
.push (yystate
, yylval
]b4_locations_if([, yylloc
])[);
596 /*-----------------------------------------------------------.
597 | yydefault -- do the default action for the current state. |
598 `-----------------------------------------------------------*/
600 yyn
= yydefact_
[yystate
];
607 /*-----------------------------.
608 | yyreduce -- Do a reduction. |
609 `-----------------------------*/
612 label
= yyaction (yyn
, yystack
, yylen
);
613 yystate
= yystack
.stateAt (0);
616 /*------------------------------------.
617 | yyerrlab -- here on detecting error |
618 `------------------------------------*/
620 /* If not already recovering from an error, report this error. */
621 if (yyerrstatus_
== 0)
624 yyerror (]b4_locations_if([yylloc
, ])[yysyntax_error (yystate
, yytoken
));
627 ]b4_locations_if([yyerrloc
= yylloc
;])[
628 if (yyerrstatus_
== 3)
630 /* If just tried and failed to reuse lookahead token after an
631 error, discard it. */
633 if (yychar
<= Lexer
.EOF
)
635 /* Return failure if at end of input. */
636 if (yychar
== Lexer
.EOF
)
643 /* Else will try to reuse lookahead token after shifting the error
648 /*---------------------------------------------------.
649 | errorlab -- error raised explicitly by YYERROR. |
650 `---------------------------------------------------*/
653 ]b4_locations_if([yyerrloc
= yystack
.locationAt (yylen
- 1);])[
654 /* Do not reclaim the symbols of the rule which action triggered
658 yystate
= yystack
.stateAt (0);
662 /*-------------------------------------------------------------.
663 | yyerrlab1 -- common code for both syntax error and YYERROR. |
664 `-------------------------------------------------------------*/
666 yyerrstatus_
= 3; /* Each real token shifted decrements this. */
670 yyn
= yypact_
[yystate
];
671 if (yyn
!= yypact_ninf_
)
674 if (0 <= yyn
&& yyn
<= yylast_
&& yycheck_
[yyn
] == yyterror_
)
682 /* Pop the current state because it cannot handle the error token. */
683 if (yystack
.height
== 1)
686 ]b4_locations_if([yyerrloc
= yystack
.locationAt (0);])[
688 yystate
= yystack
.stateAt (0);
690 yystack
.print (yyDebugStream
);
694 /* Muck with the stack to setup for yylloc. */
695 yystack
.push (0, null, yylloc
);
696 yystack
.push (0, null, yyerrloc
);
697 yyloc
= yylloc (yystack
, 2);
700 /* Shift the error token. */
701 yy_symbol_print ("Shifting", yystos_
[yyn
],
702 yylval
]b4_locations_if([, yyloc
])[);
705 yystack
.push (yyn
, yylval
]b4_locations_if([, yyloc
])[);
719 // Generate an error message.
720 private String
yysyntax_error (int yystate
, int tok
)
721 {]b4_error_verbose_if([[
724 int yyn
= yypact_
[yystate
];
725 if (yypact_ninf_
< yyn
&& yyn
<= yylast_
)
729 /* Start YYX at -YYN if negative to avoid negative indexes in
731 int yyxbegin
= yyn
< 0 ?
-yyn
: 0;
733 /* Stay within bounds of both yycheck and yytname. */
734 int yychecklim
= yylast_
- yyn
+ 1;
735 int yyxend
= yychecklim
< yyntokens_ ? yychecklim
: yyntokens_
;
737 for (int x
= yyxbegin
; x
< yyxend
; ++x
)
738 if (yycheck_
[x
+ yyn
] == x
&& x
!= yyterror_
)
741 // FIXME: This method of building the message is not compatible
742 // with internationalization.
743 res
= new StringBuffer ("syntax error, unexpected ");
744 res
.append (yytnamerr_ (yytname_
[tok
]));
748 for (int x
= yyxbegin
; x
< yyxend
; ++x
)
749 if (yycheck_
[x
+ yyn
] == x
&& x
!= yyterror_
)
751 res
.append (count
++ == 0 ?
", expecting " : " or ");
752 res
.append (yytnamerr_ (yytname_
[x
]));
755 return res
.toString ();
759 return "syntax error";
762 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
764 private static final ]b4_int_type_for([b4_pact
])[ yypact_ninf_
= ]b4_pact_ninf
[;
765 ]b4_integral_parser_table([yypact_
], [b4_pact
])[
767 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
768 doesn't specify something else to do. Zero means the default is an
770 ]b4_integral_parser_table([yydefact_
], [b4_defact
])[
772 /* YYPGOTO[NTERM-NUM]. */
773 ]b4_integral_parser_table([yypgoto_
], [b4_pgoto
])[
775 /* YYDEFGOTO[NTERM-NUM]. */
776 ]b4_integral_parser_table([yydefgoto_
], [b4_defgoto
])[
778 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
779 positive, shift that token. If negative, reduce the rule which
780 number is the opposite. If zero, do what YYDEFACT says. */
781 private static final ]b4_int_type_for([b4_table
])[ yytable_ninf_
= ]b4_table_ninf
[;
782 ]b4_integral_parser_table([yytable_
], [b4_table
])[
785 ]b4_integral_parser_table([yycheck_
], [b4_check
])[
787 /* STOS_[STATE-NUM] -- The (internal number of the) accessing
788 symbol of state STATE-NUM. */
789 ]b4_integral_parser_table([yystos_
], [b4_stos
])[
791 /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding
793 ]b4_integral_parser_table([yytoken_number_
], [b4_toknum
])[
795 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
796 ]b4_integral_parser_table([yyr1_
], [b4_r1
])[
798 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
799 ]b4_integral_parser_table([yyr2_
], [b4_r2
])[
801 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
802 First, the terminals, then, starting at \a yyntokens_, nonterminals. */
803 ]b4_typed_parser_table([String
], [yytname_
], [b4_tname
])[
805 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
806 ]b4_integral_parser_table([yyrhs_
], [b4_rhs
])[
808 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
810 ]b4_integral_parser_table([yyprhs_
], [b4_prhs
])[
812 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
813 ]b4_integral_parser_table([yyrline_
], [b4_rline
])[
815 // Report on the debug stream that the rule yyrule is going to be reduced.
816 private void yy_reduce_print (int yyrule
, YYStack yystack
)
821 int yylno
= yyrline_
[yyrule
];
822 int yynrhs
= yyr2_
[yyrule
];
823 /* Print the symbols being reduced, and their result. */
824 yycdebug ("Reducing stack by rule " + (yyrule
- 1)
825 + " (line " + yylno
+ "), ");
827 /* The symbols being reduced. */
828 for (int yyi
= 0; yyi
< yynrhs
; yyi
++)
829 yy_symbol_print (" $" + (yyi
+ 1) + " =",
830 yyrhs_
[yyprhs_
[yyrule
] + yyi
],
831 ]b4_rhs_value(yynrhs
, yyi
+ 1)b4_locations_if([,
832 b4_rhs_location(yynrhs
, yyi
+ 1)])[);
835 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
836 ]b4_integral_parser_table([yytranslate_table_
], [b4_translate
])[
838 private static final ]b4_int_type_for([b4_translate
])[ yytranslate_ (int t
)
840 if (t
>= 0 && t
<= yyuser_token_number_max_
)
841 return yytranslate_table_
[t
];
843 return yyundef_token_
;
846 private static final int yylast_
= ]b4_last
[;
847 private static final int yynnts_
= ]b4_nterms_number
[;
848 private static final int yyempty_
= -2;
849 private static final int yyfinal_
= ]b4_final_state_number
[;
850 private static final int yyterror_
= 1;
851 private static final int yyerrcode_
= 256;
852 private static final int yyntokens_
= ]b4_tokens_number
[;
854 private static final int yyuser_token_number_max_
= ]b4_user_token_number_max
[;
855 private static final int yyundef_token_
= ]b4_undef_token_number
[;
857 ]/* User implementation code. */
858 b4_percent_code_get
[]dnl