]> git.saurik.com Git - bison.git/commitdiff
tests: don't require locations uselessly.
authorAkim Demaille <demaille@gostai.com>
Thu, 9 Feb 2012 09:04:32 +0000 (10:04 +0100)
committerAkim Demaille <demaille@gostai.com>
Fri, 10 Feb 2012 08:17:45 +0000 (09:17 +0100)
* tests/c++.at (Syntax error discarding no lookahead): Contrary to
2.5, C++ parsers can work without locations.

tests/c++.at

index b4218d3d33007520d392a282f12a0451168a003e..d81a1fb38faf28247025ad026bd583db049272af 100644 (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;
 }