]> git.saurik.com Git - bison.git/blobdiff - data/yacc.c
parser: use %empty
[bison.git] / data / yacc.c
index 9b227aea3012ecf60eb3d1172abbd2e17e10a765..88277a9174d0a8755a6a172631c5c357dd319448 100644 (file)
@@ -1,11 +1,11 @@
                                                              -*- C -*-
 # Yacc compatible skeleton for Bison
 
                                                              -*- C -*-
 # Yacc compatible skeleton for Bison
 
-# Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation,
+# Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation,
 # Inc.
 
 m4_pushdef([b4_copyright_years],
 # Inc.
 
 m4_pushdef([b4_copyright_years],
-           [1984, 1989-1990, 2000-2012])
+           [1984, 1989-1990, 2000-2013])
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -346,11 +346,12 @@ m4_if(b4_api_prefix, [yy], [],
 #define yypstate        ]b4_prefix[pstate]])[
 #define yylex           ]b4_prefix[lex
 #define yyerror         ]b4_prefix[error
 #define yypstate        ]b4_prefix[pstate]])[
 #define yylex           ]b4_prefix[lex
 #define yyerror         ]b4_prefix[error
-#define yylval          ]b4_prefix[lval
-#define yychar          ]b4_prefix[char
 #define yydebug         ]b4_prefix[debug
 #define yydebug         ]b4_prefix[debug
-#define yynerrs         ]b4_prefix[nerrs]b4_locations_if([[
-#define yylloc          ]b4_prefix[lloc]])])[
+#define yynerrs         ]b4_prefix[nerrs
+]]b4_pure_if([], [[
+#define yylval          ]b4_prefix[lval
+#define yychar          ]b4_prefix[char]b4_locations_if([[
+#define yylloc          ]b4_prefix[lloc]])]))[
 
 /* Copy the first part of user declarations.  */
 ]b4_user_pre_prologue[
 
 /* Copy the first part of user declarations.  */
 ]b4_user_pre_prologue[
@@ -675,7 +676,6 @@ while (0)
 ]b4_yylloc_default_define[
 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
 ]])[
 ]b4_yylloc_default_define[
 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
 ]])[
-]b4_yy_location_print_define[
 
 /* Enable debugging if requested.  */
 #if ]b4_api_PREFIX[DEBUG
 
 /* Enable debugging if requested.  */
 #if ]b4_api_PREFIX[DEBUG
@@ -691,6 +691,8 @@ do {                                            \
     YYFPRINTF Args;                             \
 } while (0)
 
     YYFPRINTF Args;                             \
 } while (0)
 
+]b4_yy_location_print_define[
+
 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
 do {                                                                      \
   if (yydebug)                                                            \
 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
 do {                                                                      \
   if (yydebug)                                                            \