mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
* src/output.c (header_output): Don't forget to export YYLTYPE and
yylloc. * tests/headers.at (export YYLTYPE): New, make sure it does. * tests/regression.at (%union and --defines, Invalid CPP headers): Move to... * tests/headers.at: here.
This commit is contained in:
20
src/output.c
20
src/output.c
@@ -1128,6 +1128,26 @@ yystype;\n\
|
||||
if (!pure_parser)
|
||||
fprintf (out, "\nextern YYSTYPE %slval;\n",
|
||||
spec_name_prefix);
|
||||
|
||||
if (locations_flag)
|
||||
{
|
||||
fputs ("\n\n", out);
|
||||
fprintf (out, "\
|
||||
#ifndef YYLTYPE\n\
|
||||
typedef struct yyltype\n\
|
||||
{\n\
|
||||
int first_line;\n\
|
||||
int first_column;\n\
|
||||
int last_line;\n\
|
||||
int last_column;\n\
|
||||
} yyltype;\n\
|
||||
# define YYLTYPE yyltype\n\
|
||||
#endif\n");
|
||||
if (!pure_parser)
|
||||
fprintf (out, "\nextern YYLTYPE %slloc;\n",
|
||||
spec_name_prefix);
|
||||
}
|
||||
|
||||
if (semantic_parser)
|
||||
{
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user