mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33:03 +00:00
Prototype support of %lex-param and %parse-param.
* src/parse-gram.y: Add the definition of the %lex-param and %parse-param tokens, plus their rules. Drop the `_' version of %glr-parser. Add the "," token. * src/scan-gram.l (INITIAL): Scan them. * src/muscle_tab.c: Comment changes. (muscle_insert, muscle_find): Rename `pair' as `probe'. * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused. (muscle_entry_s): The `value' member is no longer const. Adjust all dependencies. * src/muscle_tab.c (muscle_init): Adjust: use MUSCLE_INSERT_STRING. Initialize the obstack earlier. * src/muscle_tab.h, src/muscle_tab.c (muscle_grow) (muscle_pair_list_grow): New. * data/c.m4 (b4_c_function_call, b4_c_args): New. * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param. * tests/calc.at: Use %locations, not --locations. (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
This commit is contained in:
@@ -354,7 +354,7 @@ AT_DATA([[expout]],
|
||||
[$4
|
||||
])
|
||||
# 3. If locations are not used, remove them.
|
||||
m4_bmatch([$1], [--location], [],
|
||||
m4_bmatch([$1], [%locations], [],
|
||||
[[sed 's/^[-0-9.]*: //' expout >at-expout
|
||||
mv at-expout expout]])
|
||||
# 4. If error-verbose is not used, strip the`, unexpected....' part.
|
||||
@@ -451,18 +451,18 @@ m4_define([AT_CHECK_CALC_LALR],
|
||||
AT_CHECK_CALC_LALR()
|
||||
|
||||
AT_CHECK_CALC_LALR([--defines])
|
||||
AT_CHECK_CALC_LALR([--locations])
|
||||
AT_CHECK_CALC_LALR([%locations])
|
||||
AT_CHECK_CALC_LALR([--name-prefix=calc])
|
||||
AT_CHECK_CALC_LALR([--verbose])
|
||||
AT_CHECK_CALC_LALR([--yacc])
|
||||
AT_CHECK_CALC_LALR([%error-verbose])
|
||||
|
||||
AT_CHECK_CALC_LALR([%error-verbose --locations])
|
||||
AT_CHECK_CALC_LALR([%error-verbose %locations])
|
||||
|
||||
AT_CHECK_CALC_LALR([%error-verbose --defines --locations --name-prefix=calc --verbose --yacc])
|
||||
AT_CHECK_CALC_LALR([%error-verbose --defines %locations --name-prefix=calc --verbose --yacc])
|
||||
|
||||
AT_CHECK_CALC_LALR([%debug])
|
||||
AT_CHECK_CALC_LALR([%error-verbose %debug --defines --locations --name-prefix=calc --verbose --yacc])
|
||||
AT_CHECK_CALC_LALR([%error-verbose %debug --defines %locations --name-prefix=calc --verbose --yacc])
|
||||
|
||||
|
||||
# ----------------------- #
|
||||
@@ -476,21 +476,21 @@ AT_BANNER([[Simple GLR Calculator.]])
|
||||
# Start a testing chunk which compiles `calc' grammar with
|
||||
# BISON-OPTIONS and %glr-parser, and performs several tests over the parser.
|
||||
m4_define([AT_CHECK_CALC_GLR],
|
||||
[AT_CHECK_CALC([%glr_parser] $@)])
|
||||
[AT_CHECK_CALC([%glr-parser] $@)])
|
||||
|
||||
|
||||
AT_CHECK_CALC_GLR()
|
||||
|
||||
AT_CHECK_CALC_GLR([--defines])
|
||||
AT_CHECK_CALC_GLR([--locations])
|
||||
AT_CHECK_CALC_GLR([%locations])
|
||||
AT_CHECK_CALC_GLR([--name-prefix=calc])
|
||||
AT_CHECK_CALC_GLR([--verbose])
|
||||
AT_CHECK_CALC_GLR([--yacc])
|
||||
AT_CHECK_CALC_GLR([%error-verbose])
|
||||
|
||||
AT_CHECK_CALC_GLR([%error-verbose --locations])
|
||||
AT_CHECK_CALC_GLR([%error-verbose %locations])
|
||||
|
||||
AT_CHECK_CALC_GLR([%error-verbose --defines --locations --name-prefix=calc --verbose --yacc])
|
||||
AT_CHECK_CALC_GLR([%error-verbose --defines %locations --name-prefix=calc --verbose --yacc])
|
||||
|
||||
AT_CHECK_CALC_GLR([%debug])
|
||||
AT_CHECK_CALC_GLR([%error-verbose %debug --defines --locations --name-prefix=calc --verbose --yacc])
|
||||
AT_CHECK_CALC_GLR([%error-verbose %debug --defines %locations --name-prefix=calc --verbose --yacc])
|
||||
|
||||
Reference in New Issue
Block a user