Simplify y.tab.c when location tracking is disabled.

* data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
tracking is not enabled.  Instead, unconditionally define
YY_LOCATION_PRINT as a no-op for backward compatibility.
This commit is contained in:
Jonathan Nieder
2009-12-15 22:07:46 -06:00
committed by Joel E. Denny
parent ae93128c96
commit fcd32abd3a
2 changed files with 14 additions and 1 deletions

View File

@@ -662,7 +662,7 @@ while (YYID (0))
while (YYID (0))
#endif
]b4_locations_if([[
/* 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. */
@@ -677,7 +677,13 @@ while (YYID (0))
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif
]], [[
/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
]])[
/* YYLEX -- calling `yylex' with the right arguments. */