#! /usr/bin/perl -w
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
#
# This file is part of Bison, the GNU Compiler Compiler.
#
or die;
print $out <<EOF;
%error-verbose
-%debug
%{
#include <stdio.h>
#include <stdlib.h>
int
main (void)
{
+#if YYDEBUG
yydebug = !!getenv ("YYDEBUG");
+#endif
return yyparse ();
}
EOF
int count = 0;
int status;
+#if YYDEBUG
+ yydebug = !!getenv ("YYDEBUG");
+#endif
+
input = fopen ("calc.input", "r");
if (!input)
{
if (stage == STAGE_MAX)
{
#if USE_LEX_SYMBOL
- return yy::parser::make_END_OF_FILE (yy::location());
+ return yy::parser::make_END_OF_FILE (location_type ());
#else
*yylloc = location_type ();
return token::END_OF_FILE;
else if (stage % 2)
{
#if USE_LEX_SYMBOL
- return yy::parser::make_NUMBER (stage, yy::location());
+ return yy::parser::make_NUMBER (stage, location_type ());
#else
# if defined ONE_STAGE_BUILD
yylval->build(stage);
else
{
#if USE_LEX_SYMBOL
- return yy::parser::make_TEXT ("A string.", yy::location());
+ return yy::parser::make_TEXT ("A string.", location_type ());
#else
# if defined ONE_STAGE_BUILD
yylval->build(std::string("A string."));
// Mandatory error function
void
-yy::parser::error(const yy::parser::location_type& yylloc,
- const std::string& message)
+yy::parser::error(const yy::parser::location_type& loc, const std::string& msg)
{
- std::cerr << yylloc << ": " << message << std::endl;
+ std::cerr << loc << ": " << msg << std::endl;
}
int main(int argc, char *argv[])
qw(
[ %d api.pure ]
&
- [ %d api.push_pull=both ]
+ [ %d api.push-pull=both ]
));
}