c skeletons: factor the declaration of yylloc and yylval.

There is one difference: now, even without --defines, we generate
extern declarations for these variables.  The factoring is worth it.
* data/c.m4 (b4_declare_yylstype): Declare them.
* data/glr.c, data/yacc.c: Adjust.
This commit is contained in:
Akim Demaille
2012-06-17 12:10:44 +02:00
parent 18ad57b384
commit 756257ee86
3 changed files with 5 additions and 6 deletions

View File

@@ -2635,8 +2635,6 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C],
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations[
]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;
]b4_locations_if([[extern YYLTYPE ]b4_prefix[lloc;]])])[
]b4_cpp_guard_close([b4_spec_defines_file])[
]])])
m4_divert_pop(0)