X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/a68b1f237e63c96ee905916424013f79d01908ba..96029914a688997caef26edb87aa4c2131299fed:/data/glr.c diff --git a/data/glr.c b/data/glr.c index 89a76e3e..9bd95228 100644 --- a/data/glr.c +++ b/data/glr.c @@ -226,8 +226,8 @@ b4_percent_code_get([[top]])[ right-hand sides. Unlike the standard yacc.c template, here we set the default value of $$ to a zeroed-out value. Since the default value is undefined, this behavior is technically correct. */ -static YYSTYPE yyval_default;]b4_locations_if([ -b4_yyloc_default_define])[ +static YYSTYPE yyval_default;]b4_locations_if([[ +static YYLTYPE yyloc_default][]b4_yyloc_default;])[ /* Copy the second part of user declarations. */ ]b4_user_post_prologue @@ -475,28 +475,10 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] = #define YYTERROR 1 ]b4_locations_if([[ -#ifndef YYLLOC_DEFAULT ]b4_yylloc_default_define[ # define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc) - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -#endif -]],[ -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) ((void) 0) -#endif -])[ - -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +]])[ +]b4_yy_location_print_define[ /* YYLEX -- calling `yylex' with the right arguments. */ #define YYLEX ]b4_c_function_call([yylex], [int], b4_lex_param)[