#define yynerrs b4_prefix[]nerrs
b4_locations_if([#define yylloc b4_prefix[]lloc])])[
-]b4_token_enums_defines(b4_tokens)[
-
/* Copy the first part of user declarations. */
]b4_pre_prologue[
# define YYTOKEN_TABLE ]b4_token_table[
#endif
+]m4_ifdef([b4_start_header],
+[[/* Copy the %start-header blocks. */
+]b4_start_header])[]dnl
+
+b4_token_enums_defines(b4_tokens)[
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
]m4_ifdef([b4_stype],
-[typedef union[]m4_bregexp(b4_stype, [^{], [ YYSTYPE])
+[[typedef union ]b4_union_name
b4_stype
/* Line __line__ of yacc.c. */
b4_syncline([@oline@], [@ofile@])
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
-#endif
-])[
+#endif])
-/* Copy the second part of user declarations. */
+m4_ifdef([b4_end_header],
+[[/* Copy the %end-header blocks. */
+]b4_end_header])[]dnl
+
+[/* Copy the second part of user declarations. */
]b4_post_prologue
-/* Line __line__ of yacc.c. */
-b4_syncline([@oline@], [@ofile@])[
+[/* Line __line__ of yacc.c. */
+]b4_syncline([@oline@], [@ofile@])[
#ifdef short
# undef short
# Declare the variables that are global, or local to YYPARSE if
# pure-parser.
m4_define([b4_declare_parser_variables],
-[/* The look-ahead symbol. */
+[/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;b4_locations_if([
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;])
])
m4_divert_pop([KILL])dnl# ====================== End of M4 code.
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
+ /* Lookahead token as an internal (translated) token number. */
int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token unless it is eof. */
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
]b4_locations_if([[
yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
+ the lookahead. YYLOC is available though. */
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
*++yylsp = yyloc;]])[
b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],dnl '
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])
+m4_ifdef([b4_start_header],
+[[/* Copy the %start-header blocks. */
+]b4_start_header])[]dnl
+
b4_token_enums_defines(b4_tokens)
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-m4_ifdef([b4_stype],
-[typedef union[]m4_bregexp(b4_stype, [^{], [ YYSTYPE])
+[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+]m4_ifdef([b4_stype],
+[[typedef union ]b4_union_name
b4_stype
/* Line __line__ of yacc.c. */
b4_syncline([@oline@], [@ofile@])
YYSTYPE;],
-[typedef int YYSTYPE;])
+[typedef int YYSTYPE;])[
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
-b4_pure_if([],
+]b4_pure_if([],
[extern YYSTYPE b4_prefix[]lval;])
b4_locations_if(
# define YYLTYPE_IS_TRIVIAL 1
#endif
-b4_pure_if([],
+]b4_pure_if([],
[extern YYLTYPE b4_prefix[]lloc;])
-])dnl b4_locations_if
+)dnl b4_locations_if
+
+m4_ifdef([b4_end_header],
+[[/* Copy the %end-header blocks. */
+]b4_end_header])[]dnl
])dnl b4_defines_if