c++: check several parsers in the same program

* tests/local.at (AT_LOCATION_TYPE_IF): Turn into...
(AT_LOCATION_TYPE_SPAN_IF): this.
Adjust dependencies.
* tests/headers.at (Several parsers): Add another C++ parser,
which uses the first C++ parser's locations.
This commit is contained in:
Akim Demaille
2018-12-26 18:36:30 +01:00
parent 5fb0d276b3
commit 7938ab53ff
3 changed files with 16 additions and 11 deletions

View File

@@ -210,7 +210,7 @@ AT_CXX_IF(
[%define global_tokens_and_yystype])[
%code requires
{
]AT_LOCATION_TYPE_IF([[
]AT_LOCATION_TYPE_SPAN_IF([[
# include <iostream>
struct Point
{
@@ -272,7 +272,7 @@ static int power (int base, int exponent);
]AT_YYLEX_DECLARE_EXTERN[
}
]AT_CXX_IF([AT_LOCATION_TYPE_IF([[
]AT_CXX_IF([AT_LOCATION_TYPE_SPAN_IF([[
%initial-action
{
@$.first.l = @$.first.c = 1;
@@ -334,7 +334,7 @@ power (int base, int exponent)
}
]AT_CXX_IF(
[AT_LOCATION_TYPE_IF([[
[AT_LOCATION_TYPE_SPAN_IF([[
namespace
{
std::ostream&