mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
parse.error: document and diagnose the incompatibility with %token-table
* doc/bison.texi (Tokens from Literals): Move to code using %token-table to... (Decl Summary: %token-table): here. * data/skeletons/bison.m4: Implement mutual exclusion. * tests/input.at: Check it. * doc/local.mk: Be robust to the removal of doc/.
This commit is contained in:
@@ -2888,3 +2888,31 @@ input.y:9.1-21: definition of api.token.raw
|
||||
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
|
||||
## ------------------------------ ##
|
||||
## %token-table and parse.error. ##
|
||||
## ------------------------------ ##
|
||||
|
||||
AT_SETUP([[%token-table and parse.error]])
|
||||
|
||||
# AT_TEST(DIRECTIVES, ERROR-LOCATION)
|
||||
# -----------------------------------
|
||||
m4_pushdef([AT_TEST],
|
||||
[AT_DATA([[input.y]],
|
||||
[[$1
|
||||
%%
|
||||
exp: %empty;
|
||||
]])
|
||||
AT_BISON_CHECK([[input.y]], [[1]], [[]],
|
||||
[$2: error: '%token-table' and '%define parse.error (custom|detailed)' cannot be used together
|
||||
])
|
||||
])
|
||||
|
||||
AT_TEST([%define parse.error custom %token-table], [[input.y:1.1-26]])
|
||||
AT_TEST([%define parse.error detailed %token-table],[[input.y:1.1-28]])
|
||||
|
||||
m4_popdef([AT_TEST])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user