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:
Akim Demaille
2012-02-09 10:04:32 +01:00
parent 9bfbf75bdf
commit a8c5aaa53e

View File

@@ -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;
}