mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +00:00
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:
@@ -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&
|
||||
|
||||
Reference in New Issue
Block a user