lalr1.cc: check LAC support

* tests/conflicts.at, tests/input.at, tests/regression.at: here.
This commit is contained in:
Akim Demaille
2019-07-12 08:00:47 +02:00
parent 72d4ae5306
commit f49598a1e1
3 changed files with 28 additions and 1 deletions

View File

@@ -2247,6 +2247,7 @@ AT_CLEANUP
## ------------------------- ##
AT_SETUP([[LAC: Errors for %define]])
AT_KEYWORDS([lac])
AT_DATA([[input.y]],
[[%%
@@ -2263,6 +2264,16 @@ AT_BISON_CHECK([[-Dparse.lac.memory-trace=full input.y]],
[[<command line>:3: error: %define variable 'parse.lac.memory-trace' is not used
]])
# parse.lac.* options are useless in C++ even if LAC isn't actually activated.
AT_BISON_CHECK([[-Dparse.lac.es-capacity-initial=1 -L C++ -Dparse.lac input.y]],
[[1]], [],
[[<command line>:3: error: %define variable 'parse.lac.es-capacity-initial' is not used
]])
AT_BISON_CHECK([[-Dparse.lac.memory-trace=full -L C++ -Dparse.lac input.y]],
[[1]], [],
[[<command line>:3: error: %define variable 'parse.lac.memory-trace' is not used
]])
AT_CLEANUP