mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 06:13:02 +00:00
%name-prefix is broken.
* src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". Adjust all dependencies. * tests/headers.at (export YYLTYPE): Strengthen this test: use %name-prefix. Renaming yylval but not yylloc is not consistent. Now we do. * src/bison.simple: Prefix yylloc if used. * doc/bison.texinfo (Decl Summary): Document that.
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED %%locations-flag
|
||||
|
||||
/* If name_prefix is specify substitute the variables and functions
|
||||
/* If NAME_PREFIX is specified substitute the variables and functions
|
||||
names. */
|
||||
#define yyparse %%prefix##parse
|
||||
#define yylex %%prefix##lex
|
||||
@@ -49,6 +49,10 @@
|
||||
#define yychar %%prefix##char
|
||||
#define yydebug %%prefix##debug
|
||||
#define yynerrs %%prefix##nerrs
|
||||
#if YYLSP_NEEDED
|
||||
# define yylloc %%prefix##lloc
|
||||
#endif
|
||||
|
||||
|
||||
/* Copy the user declarations. */
|
||||
%%prologue
|
||||
|
||||
Reference in New Issue
Block a user