yacc.c: let custom error messages see the location

* data/skeletons/yacc.c (yyparse_context_t): Add yylloc when
applicable.
(yyparse_context_location): New.
* tests/local.at (AT_YYERROR_DEFINE(c)): Handle the location.
* tests/calc.at: Check it.
This commit is contained in:
Akim Demaille
2020-01-12 11:08:06 +01:00
parent 8637438cee
commit fd33cc9c8b
3 changed files with 18 additions and 6 deletions

View File

@@ -788,6 +788,7 @@ AT_CHECK_CALC_LALR([%no-lines %define api.pure %define parse.error verbose %debu
AT_CHECK_CALC_LALR([%define parse.error custom])
AT_CHECK_CALC_LALR([%define parse.error custom %locations])
# ----------------------- #
# Simple GLR Calculator. #