]> git.saurik.com Git - bison.git/blobdiff - tests/calc.at
Fix changelog entry for configure.ac.
[bison.git] / tests / calc.at
index b7808aceae169a6e2b57270e0f2c2a0531628f52..5c0116b09e087857b54339b708bc0fb8d3daa7d7 100644 (file)
@@ -66,7 +66,7 @@ static int global_count = 0;
 
 %{
 static int power (int base, int exponent);
-]AT_LALR1_CC_IF([typedef yy::Location YYLTYPE;],
+]AT_LALR1_CC_IF([typedef yy::location YYLTYPE;],
 [/* yyerror receives the location if:
    - %location & %pure & %glr
    - %location & %pure & %yacc & %parse-param. */
@@ -126,25 +126,19 @@ exp:
 static FILE *yyin;
 
 ]AT_LALR1_CC_IF(
-[/* Currently, print_ is required in C++. */
+[/* A C++ error reporting function. */
 void
-yy::Parser::print_ ()
+yy::parser::error (const location& l, const std::string& m)
 {
-AT_LOCATION_IF([
-  std::cerr << location;])
-}
-
-/* A C++ error reporting function. */
-void
-yy::Parser::error_ ()
-{
-  std::cerr << AT_LOCATION_IF([location << ": " << ])message << std::endl;
+  (void) l;
+  std::cerr << AT_LOCATION_IF([l << ": " << ])m << std::endl;
 }
 
 int
 yyparse (AT_PARAM_IF([semantic_value *result, int *count]))
 {
-  yy::Parser parser (!!YYDEBUG[]AT_LOCATION_IF([, yy::Location ()])AT_PARAM_IF([, result, count]));
+  yy::parser parser[]AT_PARAM_IF([ (result, count)]);
+  parser.set_debug_level (!!YYDEBUG);
   return parser.parse ();
 }
 ],