yacc.c: tests: check detailed error messages

* tests/local.at (AT_ERROR_DETAILED_IF): New.
(AT_ERROR_SIMPLE_IF): Adjust.
* tests/calc.at: Check parse.error=detailed.
This commit is contained in:
Akim Demaille
2020-01-18 07:25:58 +01:00
parent f443673450
commit 91247f50d7
2 changed files with 14 additions and 9 deletions

View File

@@ -206,10 +206,12 @@ m4_pushdef([AT_DEBUG_IF],
[m4_bmatch([$3], [%debug\|%define parse.trace], [$1], [$2])])
m4_pushdef([AT_ERROR_CUSTOM_IF],
[m4_bmatch([$3], [%define parse\.error custom], [$1], [$2])])
m4_pushdef([AT_ERROR_DETAILED_IF],
[m4_bmatch([$3], [%define parse\.error detailed], [$1], [$2])])
m4_pushdef([AT_ERROR_VERBOSE_IF],
[m4_bmatch([$3], [%define parse\.error verbose], [$1], [$2])])
m4_pushdef([AT_ERROR_SIMPLE_IF],
[AT_ERROR_CUSTOM_IF([$2], [AT_ERROR_VERBOSE_IF([$2], [$1])], [$1])])
[AT_ERROR_CUSTOM_IF([$2], [AT_ERROR_DETAILED_IF([$2], [AT_ERROR_VERBOSE_IF([$2], [$1])], [$1])], [$1])])
m4_pushdef([AT_CXX_IF],
[m4_bmatch([$3], [%language "[Cc]\+\+"\|%skeleton "[a-z0-9]+\.cc"], [$1], [$2])])
m4_pushdef([AT_D_IF],
@@ -417,6 +419,7 @@ m4_popdef([AT_GLR_CC_IF])
m4_popdef([AT_LALR1_CC_IF])
m4_popdef([AT_ERROR_SIMPLE_IF])
m4_popdef([AT_ERROR_VERBOSE_IF])
m4_popdef([AT_ERROR_DETAILED_IF])
m4_popdef([AT_ERROR_CUSTOM_IF])
m4_popdef([AT_DEBUG_IF])
m4_popdef([AT_DEFINES_IF])