# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
## ---------------- ##
## Default values. ##
m4_if(b4_defines_flag, 0, [],
[@output @output_header_name@
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
- [2002, 2003, 2004])[
+ [2002, 2003, 2004, 2005])[
/* FIXME: This is wrong, we want computed header guards.
I don't know why the macros are missing now. :( */
#ifndef PARSER_HEADER_H
])dnl
@output @output_parser_name@
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
- [2002, 2003, 2004])
+ [2002, 2003, 2004, 2005])
m4_if(b4_prefix[], [yy], [],
[
// Take the name prefix into account.
int
yy::]b4_parser_class_name[::parse ()
{
+ int yyresult_;
+
YYCDEBUG << "Starting parse" << std::endl;
yynerrs_ = 0;
switch (yyn_)
{
]b4_actions[
+ default: break;
}
]/* Line __line__ of lalr1.cc. */
/* Accept. */
yyacceptlab:
- return 0;
+ yyresult_ = 0;
+ goto yyreturn;
/* Abort. */
yyabortlab:
- /* Free the lookahead. */
- yydestruct_ ("Error: discarding lookahead", yyilooka_, &yylval, &yylloc);
- yylooka_ = yyempty_;
- return 1;
+ yyresult_ = 1;
+ goto yyreturn;
+
+yyreturn:
+ if (yylooka_ != yyeof_ && yylooka_ != yyempty_)
+ yydestruct_ ("Error: discarding lookahead", yyilooka_, &yylval, &yylloc);
+ return yyresult_;
}
void
]b4_epilogue
dnl
@output stack.hh
-b4_copyright([stack handling for Bison C++ parsers], [2002, 2003, 2004])[
+b4_copyright([stack handling for Bison C++ parsers], [2002, 2003, 2004, 2005])[
#ifndef BISON_STACK_HH
# define BISON_STACK_HH
#endif // not BISON_STACK_HH]
dnl
@output position.hh
-b4_copyright([Position class for Bison C++ parsers], [2002, 2003, 2004])[
+b4_copyright([Position class for Bison C++ parsers], [2002, 2003, 2004, 2005])[
/**
** \file position.hh
}
#endif // not BISON_POSITION_HH]
@output location.hh
-b4_copyright([Location class for Bison C++ parsers], [2002, 2003, 2004])[
+b4_copyright([Location class for Bison C++ parsers], [2002, 2003, 2004, 2005])[
/**
** \file location.hh