mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 13:23:04 +00:00
diagnostics: improve -fcaret for list of accepted values
Instead of
input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
%define api.push_pull "neither"
^^^^^^^^^^^^^
input.y:1.9-21: accepted value: 'pull'
%define api.push_pull "neither"
^^^^^^^^^^^^^
input.y:1.9-21: accepted value: 'push'
%define api.push_pull "neither"
^^^^^^^^^^^^^
input.y:1.9-21: accepted value: 'both'
%define api.push_pull "neither"
^^^^^^^^^^^^^
report
input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
%define api.push_pull "neither"
^^^^^^^^^^^^^
input.y:1.9-21: accepted value: 'pull'
input.y:1.9-21: accepted value: 'push'
input.y:1.9-21: accepted value: 'both'
* src/complain.h (no_caret): New.
* src/complain.c (error_message): Use it.
* src/muscle-tab.c (muscle_percent_define_check_values): Use it.
* src/scan-skel.l (flag): Ditto.
* tests/input.at: Adjust and check.
This commit is contained in:
@@ -1343,6 +1343,18 @@ input.y:1.9-21: accepted value: 'push'
|
||||
input.y:1.9-21: accepted value: 'both'
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[-fcaret input.y]], [1], [],
|
||||
[[input.y:1.9-21: warning: deprecated %define variable name: 'api.push_pull', use 'api.push-pull' [-Wdeprecated]
|
||||
%define api.push_pull "neither"
|
||||
^^^^^^^^^^^^^
|
||||
input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
|
||||
%define api.push_pull "neither"
|
||||
^^^^^^^^^^^^^
|
||||
input.y:1.9-21: accepted value: 'pull'
|
||||
input.y:1.9-21: accepted value: 'push'
|
||||
input.y:1.9-21: accepted value: 'both'
|
||||
]])
|
||||
|
||||
AT_DATA([[input.y]],
|
||||
[[%define lr.keep_unreachable_states maybe
|
||||
%%
|
||||
|
||||
Reference in New Issue
Block a user