X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/e672a4ba5e93d116324b75bf5aa0f91ee1d8f988..66c209cf435b5bfc5cf982d8df9cc3ef05b4546b:/data/yacc.c diff --git a/data/yacc.c b/data/yacc.c index 66acbdae..88277a91 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -1,11 +1,11 @@ -*- 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], - [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 @@ -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 yylval ]b4_prefix[lval -#define yychar ]b4_prefix[char #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[ @@ -604,7 +605,7 @@ static const ]b4_int_type_for([b4_translate])[ yytranslate[] = #if ]b4_api_PREFIX[DEBUG ]b4_integral_parser_table_define([rline], [b4_rline], - [YYRLINE[YYN] -- Source line where rule number YYN was defined.])[ + [[YYRLINE[YYN] -- Source line where rule number YYN was defined.]])[ #endif #if ]b4_api_PREFIX[DEBUG || YYERROR_VERBOSE || ]b4_token_table_flag[ @@ -675,7 +676,6 @@ while (0) ]b4_yylloc_default_define[ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) ]])[ -]b4_yy_location_print_define[ /* Enable debugging if requested. */ #if ]b4_api_PREFIX[DEBUG @@ -691,6 +691,8 @@ do { \ YYFPRINTF Args; \ } while (0) +]b4_yy_location_print_define[ + # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \