mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
parser: deprecate %error-verbose
It is unfortunate that %error_verbose was properly diagnosed as obsoleted by "%define parse.error verbose", but %error-verbose was not. * src/parse-gram.y (%error-verbose): Remove support. * src/scan-gram.l: Do it here instead, with a warning. * tests/input.at (Deprecated directives): Check it.
This commit is contained in:
@@ -2188,11 +2188,12 @@ AT_DATA_GRAMMAR([[input.y]],
|
||||
%output = "foo"
|
||||
%pure_parser
|
||||
%token_table
|
||||
%error-verbose
|
||||
%glr-parser
|
||||
%% exp : '0'
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input.y]], [[0]], [[]],
|
||||
AT_BISON_CHECK([[input.y]], [[1]], [[]],
|
||||
[[input.y:10.1-13: warning: deprecated directive: '%default_prec', use '%default-prec' [-Wdeprecated]
|
||||
input.y:11.1-14: warning: deprecated directive: '%error_verbose', use '%define parse.error verbose' [-Wdeprecated]
|
||||
input.y:12.1-10: warning: deprecated directive: '%expect_rr', use '%expect-rr' [-Wdeprecated]
|
||||
@@ -2207,6 +2208,9 @@ input.y:23.1-9: warning: deprecated directive: '%no_lines', use '%no-lines' [-Wd
|
||||
input.y:24.1-9: warning: deprecated directive: '%output =', use '%output' [-Wdeprecated]
|
||||
input.y:25.1-12: warning: deprecated directive: '%pure_parser', use '%pure-parser' [-Wdeprecated]
|
||||
input.y:26.1-12: warning: deprecated directive: '%token_table', use '%token-table' [-Wdeprecated]
|
||||
input.y:27.1-14: warning: deprecated directive: '%error-verbose', use '%define parse.error verbose' [-Wdeprecated]
|
||||
input.y:27-6: error: %define variable 'parse.error' redefined
|
||||
input.y:11-6: previous definition
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user