mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
parser: handle %locations as %define locations.
* src/getargs.h, src/getargs.c (locations_flag): Remove. * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure to set "locations" to true. * src/output.c (prepare): Don't output "locations". * src/scan-gram.l (%locations): Handle it as a %<flag>. * src/parse-gram.y: It's no longer a token. Don't handle it. * data/bison.m4 (b4_locations_if): Define it with b4_percent_define_if_define. * data/c.m4, data/glr.cc: Adjust.
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
# filename member).
|
||||
|
||||
# We require a pure interface using locations.
|
||||
m4_define([b4_locations_flag], [1])
|
||||
m4_define([b4_percent_define(locations)], [])
|
||||
m4_define([b4_pure_flag], [1])
|
||||
|
||||
# The header is mandatory.
|
||||
@@ -228,7 +228,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
#include <iostream>
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED ]b4_locations_flag[
|
||||
#define YYLSP_NEEDED ]b4_locations_if([1], [0])[
|
||||
|
||||
]b4_namespace_open[
|
||||
class position;
|
||||
|
||||
Reference in New Issue
Block a user