]> git.saurik.com Git - bison.git/blobdiff - data/glr.c
scanner: use explicit "ignore" statements
[bison.git] / data / glr.c
index 89a76e3e9ada3dc6c936b9d7880a76d2f6d54bcb..9bd95228da6e0615a627d416f338f7b6b54a1e4e 100644 (file)
@@ -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)[