c++: when api.location.file is defined, don't generate stack.hh

Make it easier to have fewer files.

* data/stack.hh: Don't generate stack.hh when api.location.file is
specified.
* tests/calc++.at, tests/output.at: Adjust tests.
This commit is contained in:
Akim Demaille
2018-10-06 13:27:49 +02:00
parent 3e6a075f7f
commit 57d69b04b2
3 changed files with 12 additions and 6 deletions

View File

@@ -195,13 +195,17 @@ AT_CHECK_OUTPUT([foo.yy],
[],
[foo.tab.cc foo.tab.hh location.hh])
# api.location.file=none => api.position.file=none
# api.location.file=none => api.position.file=none and api.stack.file=none.
AT_CHECK_OUTPUT([foo.yy],
[%skeleton "lalr1.cc" %defines %define api.stack.file none %locations %define api.location.file none],
[%skeleton "lalr1.cc" %defines %locations %define api.location.file none],
[],
[foo.tab.cc foo.tab.hh])
# api.location.file="*" => api.position.file=none
# api.location.file="*" => api.position.file=none and api.stack.file=none.
AT_CHECK_OUTPUT([foo.yy],
[%skeleton "lalr1.cc" %defines %locations %define api.location.file "foo.loc.hh"],
[],
[foo.loc.hh foo.tab.cc foo.tab.hh])
AT_CHECK_OUTPUT([foo.yy],
[%skeleton "lalr1.cc" %defines %define api.stack.file none %locations %define api.location.file "foo.loc.hh"],
[],