Have glr.cc pass (some of) the calc.at tests.

* data/glr.cc (b4_parse_param_orig): New.
(b4_parse_param): Improve its definition, and bound it more
clearly in the skeleton.
(b4_epilogue): Append, instead of prepending, in order to keep
#line consistency.
Simplify the generation of auxiliary functions: locations and
purity are mandated.
(b4_global_tokens_and_yystype): Honor it.
* data/location.cc (c++.m4): Don't include it.
* tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
and AT_SKEL_CC_IF.
* tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
AT_LALR1_CC_IF.
Be sure to initialize the first position's filename.
(AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
mandated anyway.
(AT_CHECK_CALC_GLR_CC): New.
Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
This commit is contained in:
Akim Demaille
2006-01-03 09:06:22 +00:00
parent 0a96ba819f
commit 8f7e3cf9d0
6 changed files with 160 additions and 53 deletions

View File

@@ -2,7 +2,7 @@ m4_divert(-1)
# C++ skeleton for Bison
# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@ m4_divert(-1)
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
m4_include(b4_pkgdatadir/[c++.m4])
# We do want M4 expansion after # for CPP macros.
m4_changecom()
m4_divert(0)dnl