mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: don't require locations uselessly.
* tests/c++.at (Syntax error discarding no lookahead): Contrary to 2.5, C++ parsers can work without locations.
This commit is contained in:
@@ -385,12 +385,11 @@ AT_DATA_GRAMMAR([[input.yy]],
|
||||
|
||||
%code {
|
||||
#include <string>
|
||||
int yylex (yy::parser::semantic_type *, yy::location *);
|
||||
int yylex (yy::parser::semantic_type *);
|
||||
#define USE(Args)
|
||||
}
|
||||
|
||||
%defines
|
||||
%locations
|
||||
%define parse.error verbose
|
||||
|
||||
%nonassoc 'a' ;
|
||||
@@ -420,14 +419,14 @@ start: 'b' consistent-error ;
|
||||
%%
|
||||
|
||||
int
|
||||
yylex (yy::parser::semantic_type *, yy::location *)
|
||||
yylex (yy::parser::semantic_type *)
|
||||
{
|
||||
static char const *input = "aa";
|
||||
return *input++;
|
||||
}
|
||||
|
||||
void
|
||||
yy::parser::error (const location_type &, const std::string &m)
|
||||
yy::parser::error (const std::string &m)
|
||||
{
|
||||
std::cerr << m << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user