diagnostics: improve accuracy for deprecated %define variables

* src/parse-gram.y: Use the location of the whole definition to record
the location of a %define variable, instead of just the name of the
variable.
Adjust tests.
This commit is contained in:
Akim Demaille
2019-01-12 19:44:36 +01:00
parent ffe2e4aaec
commit 79e79be298
6 changed files with 95 additions and 93 deletions

View File

@@ -154,7 +154,7 @@ start: ;
AT_BISON_OPTION_POPDEFS
AT_BISON_CHECK([[input.y]], [[1]], [],
[[input.y:2.9-21: error: %define variable 'api.push-pull' is not used
[[input.y:2.1-26: error: %define variable 'api.push-pull' is not used
]])
AT_CLEANUP