mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
multistart: check duplicates
* src/symlist.h, src/symlist.c (symbol_list_find_symbol) (symbol_list_last): New. (symbol_list_append): Use symbol_list_last. * src/reader.c (grammar_start_symbols_add): Check and discard duplicates. * tests/input.at (Duplicate %start symbol): New. * tests/reduce.at (Bad start symbols): Add the multistart keyword.
This commit is contained in:
@@ -452,7 +452,7 @@ AT_CLEANUP
|
||||
AT_SETUP([Bad start symbols])
|
||||
|
||||
m4_pushdef([AT_TEST],
|
||||
[
|
||||
[AT_BISON_OPTION_PUSHDEFS([$1])
|
||||
AT_DATA([[input.y]],
|
||||
[%%
|
||||
$1
|
||||
@@ -461,6 +461,7 @@ $1
|
||||
AT_BISON_CHECK([[input.y]], 1, [],
|
||||
[$2
|
||||
])
|
||||
AT_BISON_OPTION_POPDEFS([$1])
|
||||
])
|
||||
|
||||
AT_TEST(
|
||||
|
||||
Reference in New Issue
Block a user