errors: support indented context info in m4 macros

* TODO: Address the issue, so remove it.
* data/bison.m4: Use b4_error with [[note]] rather than a complain_at
for context information.
* src/complain.c (complain_args): Take an additional argument, an
indentation pointer, to allow the dispatching of context information.
* src/complain.h (complain_args): Adjust prototype.
* src/scan-skel.l (at_directive_perform): Recognize the new @note mark.
* tests/input.at: Adjust.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
Theophile Ranquet
2012-10-04 10:35:42 +00:00
committed by Akim Demaille
parent 0505df0cba
commit c6c8de1609
6 changed files with 28 additions and 22 deletions

View File

@@ -1159,9 +1159,9 @@ start: ;
]])
AT_BISON_CHECK([[input.y]], [1], [],
[[input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
input.y:1.9-21: error: accepted value: 'pull'
input.y:1.9-21: error: accepted value: 'push'
input.y:1.9-21: error: accepted value: 'both'
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_CLEANUP
@@ -1183,9 +1183,9 @@ start: ;
AT_BISON_CHECK([[input.y]], [1], [],
[[input.y:1.9-21: warning: deprecated %define variable name: 'api.push_pull', use 'api.push-pull' [-Wdeprecated]
input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
input.y:1.9-21: error: accepted value: 'pull'
input.y:1.9-21: error: accepted value: 'push'
input.y:1.9-21: error: accepted value: 'both'
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]],