Update parsers to work with Bison 2.4.1.

* HACKING: Mention that we require Bison >= 2.4 for developers.
* src/evtgbaparse/evtgbaparse.yy, src/tgbaparse/tgbaparse.yy,
src/ltlparse/ltlparse.yy: The sections "%{ ... %}" should now be
renamed "%code requires { ... }" or "%code { ... }" depending on
whether they should end up in the parser's header file or its cc
file.  Also use %language, %locations, %defines, instead of
command-line arguments.
* src/evtgbaparse/Makefile.am, src/tgbaparse/Makefile.am,
src/ltlparse/Makefile.am: Remove the --locations, --defines
and --languages in the call to bison.  Add -Wall -Werror to
catch more errors.
Thanks to Akim Demaille <akim@lrde.epita.fr> for the help.
This commit is contained in:
Alexandre Duret-Lutz 2009-03-25 17:11:33 +01:00
parent 1f6087953b
commit efbdc08d9f
8 changed files with 66 additions and 33 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
/* Copyright (C) 2003, 2004, 2005, 2006, 2009 Laboratoire d'Informatique de
** Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
** Université Pierre et Marie Curie.
**
@ -19,20 +19,24 @@
** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
** 02111-1307, USA.
*/
%{
%language "C++"
%locations
%defines
%name-prefix "ltlyy"
%debug
%error-verbose
%code requires
{
#include <string>
#include "public.hh"
#include "ltlast/allnodes.hh"
#include "ltlvisit/destroy.hh"
}
%}
%name-prefix="ltlyy"
%parse-param {spot::ltl::parse_error_list &error_list}
%parse-param {spot::ltl::environment &parse_environment}
%parse-param {spot::ltl::formula* &result}
%debug
%error-verbose
%union
{
int token;
@ -40,7 +44,7 @@
spot::ltl::formula* ltl;
}
%{
%code {
/* ltlparse.hh and parsedecl.hh include each other recursively.
We mut ensure that YYSTYPE is declared (by the above %union)
before parsedecl.hh uses it. */
@ -69,7 +73,7 @@ using namespace spot::ltl;
} \
while (0);
%}
}
/* All tokens. */