c: rename YY_LOCATION_PRINT as YYLOCATION_PRINT and make it public

It is very helpful to be able to look at the locations in the debug
traces, let's provide the users with (i) a means to do that for their
location types, and (ii) a public macro to print locations when debug
traces are enabled.

* data/skeletons/c.m4 (b4_yy_location_print_define): Rename as...
(b4_yylocation_print_define): this.
Define YYLOCATION_PRINT instead of YY_LOCATION_PRINT.
Ensure backward compatibility for those who might have defined/used
YY_LOCATION_PRINT in spite the warnings.
Adjust dependencies.
* data/skeletons/glr2.cc: We don't use YYLOCATION_PRINT here.
This commit is contained in:
Akim Demaille
2021-02-03 08:21:35 +01:00
parent 96b881094b
commit c80b404dfa
4 changed files with 29 additions and 16 deletions

View File

@@ -768,7 +768,7 @@ do { \
YYFPRINTF Args; \
} while (0)
]b4_yy_location_print_define[
]b4_yylocation_print_define[
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
do { \