mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 15:23:02 +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:
@@ -139,7 +139,6 @@ static int current_prec = 0;
|
||||
PERCENT_INITIAL_ACTION "%initial-action"
|
||||
PERCENT_LANGUAGE "%language"
|
||||
PERCENT_LEX_PARAM "%lex-param"
|
||||
PERCENT_LOCATIONS "%locations"
|
||||
PERCENT_NAME_PREFIX "%name-prefix"
|
||||
PERCENT_NO_DEFAULT_PREC "%no-default-prec"
|
||||
PERCENT_NO_LINES "%no-lines"
|
||||
@@ -258,7 +257,6 @@ prologue_declaration:
|
||||
}
|
||||
| "%language" STRING { language_argmatch ($2, grammar_prio, @1); }
|
||||
| "%lex-param" "{...}" { add_param ("lex_param", $2, @2); }
|
||||
| "%locations" { locations_flag = true; }
|
||||
| "%name-prefix" STRING { spec_name_prefix = $2; }
|
||||
| "%name-prefix" "=" STRING { spec_name_prefix = $3; } /* deprecated */
|
||||
| "%no-lines" { no_lines_flag = true; }
|
||||
|
||||
Reference in New Issue
Block a user