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:
parent
1f6087953b
commit
efbdc08d9f
8 changed files with 66 additions and 33 deletions
17
ChangeLog
17
ChangeLog
|
|
@ -1,3 +1,20 @@
|
||||||
|
2009-03-25 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2009-03-25 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
2009-03-25 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
* src/tgbaalgos/scc.hh: Add missing misc/hash.hh inclusion.
|
* src/tgbaalgos/scc.hh: Add missing misc/hash.hh inclusion.
|
||||||
|
|
|
||||||
2
HACKING
2
HACKING
|
|
@ -12,7 +12,7 @@ generally if you plan to regenerate some of the generated files.
|
||||||
GNU Autoconf >= 2.61
|
GNU Autoconf >= 2.61
|
||||||
GNU Automake >= 1.10
|
GNU Automake >= 1.10
|
||||||
GNU Flex (the version seems to matters, we used 2.5.31)
|
GNU Flex (the version seems to matters, we used 2.5.31)
|
||||||
GNU Bison >= 2.3
|
GNU Bison >= 2.4
|
||||||
SWIG >= 1.3.31
|
SWIG >= 1.3.31
|
||||||
Doxygen >= 1.4.0
|
Doxygen >= 1.4.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
## Copyright (C) 2004, 2006, 2008 Laboratoire d'Informatique de Paris 6
|
## Copyright (C) 2004, 2006, 2008, 2009 Laboratoire d'Informatique de Paris 6
|
||||||
## (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
## (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
||||||
## Pierre et Marie Curie.
|
## Pierre et Marie Curie.
|
||||||
##
|
##
|
||||||
|
|
@ -50,7 +50,7 @@ $(FROM_EVTGBAPARSE_YY_MAIN): $(srcdir)/$(EVTGBAPARSE_YY)
|
||||||
## $(srcdir)/$(EVTGBAPARSE_YY), it will also use the value of $(srcdir)/
|
## $(srcdir)/$(EVTGBAPARSE_YY), it will also use the value of $(srcdir)/
|
||||||
## in the generated include statements.
|
## in the generated include statements.
|
||||||
cd $(srcdir) && \
|
cd $(srcdir) && \
|
||||||
bison --defines --locations --skeleton=lalr1.cc --report=all \
|
bison -Wall -Werror --report=all \
|
||||||
$(EVTGBAPARSE_YY) -o $(FROM_EVTGBAPARSE_YY_MAIN)
|
$(EVTGBAPARSE_YY) -o $(FROM_EVTGBAPARSE_YY_MAIN)
|
||||||
$(FROM_EVTGBAPARSE_YY_OTHERS): $(EVTGBAPARSE_YY)
|
$(FROM_EVTGBAPARSE_YY_OTHERS): $(EVTGBAPARSE_YY)
|
||||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(FROM_EVTGBAPARSE_YY_MAIN)
|
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(FROM_EVTGBAPARSE_YY_MAIN)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2004, 2005, 2006 Laboratoire d'Informatique de Paris 6 (LIP6),
|
/* Copyright (C) 2004, 2005, 2006, 2009 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||||
** département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
** département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||||
** et Marie Curie.
|
** et Marie Curie.
|
||||||
**
|
**
|
||||||
|
|
@ -19,17 +19,22 @@
|
||||||
** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
** 02111-1307, USA.
|
** 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
%{
|
%language "C++"
|
||||||
|
%locations
|
||||||
|
%defines
|
||||||
|
%name-prefix "evtgbayy"
|
||||||
|
%debug
|
||||||
|
%error-verbose
|
||||||
|
|
||||||
|
%code requires
|
||||||
|
{
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "public.hh"
|
#include "public.hh"
|
||||||
#include "evtgba/symbol.hh"
|
#include "evtgba/symbol.hh"
|
||||||
%}
|
}
|
||||||
|
|
||||||
%name-prefix="evtgbayy"
|
|
||||||
%parse-param {spot::evtgba_parse_error_list &error_list}
|
%parse-param {spot::evtgba_parse_error_list &error_list}
|
||||||
%parse-param {spot::evtgba_explicit* &result}
|
%parse-param {spot::evtgba_explicit* &result}
|
||||||
%debug
|
|
||||||
%error-verbose
|
|
||||||
%union
|
%union
|
||||||
{
|
{
|
||||||
int token;
|
int token;
|
||||||
|
|
@ -37,7 +42,8 @@
|
||||||
spot::rsymbol_set* symset;
|
spot::rsymbol_set* symset;
|
||||||
}
|
}
|
||||||
|
|
||||||
%{
|
%code
|
||||||
|
{
|
||||||
/* evtgbaparse.hh and parsedecl.hh include each other recursively.
|
/* evtgbaparse.hh and parsedecl.hh include each other recursively.
|
||||||
We mut ensure that YYSTYPE is declared (by the above %union)
|
We mut ensure that YYSTYPE is declared (by the above %union)
|
||||||
before parsedecl.hh uses it. */
|
before parsedecl.hh uses it. */
|
||||||
|
|
@ -47,7 +53,7 @@
|
||||||
(%name-prefix doesn't work for the lalr1.cc skeleton
|
(%name-prefix doesn't work for the lalr1.cc skeleton
|
||||||
at the time of writing.) */
|
at the time of writing.) */
|
||||||
#define yylex evtgbayylex
|
#define yylex evtgbayylex
|
||||||
%}
|
}
|
||||||
|
|
||||||
%token <str> STRING UNTERMINATED_STRING
|
%token <str> STRING UNTERMINATED_STRING
|
||||||
%token <str> IDENT
|
%token <str> IDENT
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
## Copyright (C) 2003, 2004, 2008 Laboratoire d'Informatique de Paris
|
## Copyright (C) 2003, 2004, 2008, 2009 Laboratoire d'Informatique de Paris
|
||||||
## 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
## 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||||
## Université Pierre et Marie Curie.
|
## Université Pierre et Marie Curie.
|
||||||
##
|
##
|
||||||
|
|
@ -44,7 +44,7 @@ $(FROM_LTLPARSE_YY_MAIN): $(srcdir)/$(LTLPARSE_YY)
|
||||||
## $(srcdir)/$(LTLPARSE_YY), it will also use the value of $(srcdir)/
|
## $(srcdir)/$(LTLPARSE_YY), it will also use the value of $(srcdir)/
|
||||||
## in the generated include statements.
|
## in the generated include statements.
|
||||||
cd $(srcdir) && \
|
cd $(srcdir) && \
|
||||||
bison --defines --locations --skeleton=lalr1.cc --report=all \
|
bison -Wall -Werror --report=all \
|
||||||
$(LTLPARSE_YY) -o $(FROM_LTLPARSE_YY_MAIN)
|
$(LTLPARSE_YY) -o $(FROM_LTLPARSE_YY_MAIN)
|
||||||
$(FROM_LTLPARSE_YY_OTHERS): $(LTLPARSE_YY)
|
$(FROM_LTLPARSE_YY_OTHERS): $(LTLPARSE_YY)
|
||||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(FROM_LTLPARSE_YY_MAIN)
|
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(FROM_LTLPARSE_YY_MAIN)
|
||||||
|
|
|
||||||
|
|
@ -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),
|
** Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||||
** Université Pierre et Marie Curie.
|
** Université Pierre et Marie Curie.
|
||||||
**
|
**
|
||||||
|
|
@ -19,20 +19,24 @@
|
||||||
** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
** 02111-1307, USA.
|
** 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
%{
|
%language "C++"
|
||||||
|
%locations
|
||||||
|
%defines
|
||||||
|
%name-prefix "ltlyy"
|
||||||
|
%debug
|
||||||
|
%error-verbose
|
||||||
|
|
||||||
|
%code requires
|
||||||
|
{
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "public.hh"
|
#include "public.hh"
|
||||||
#include "ltlast/allnodes.hh"
|
#include "ltlast/allnodes.hh"
|
||||||
#include "ltlvisit/destroy.hh"
|
#include "ltlvisit/destroy.hh"
|
||||||
|
}
|
||||||
|
|
||||||
%}
|
|
||||||
|
|
||||||
%name-prefix="ltlyy"
|
|
||||||
%parse-param {spot::ltl::parse_error_list &error_list}
|
%parse-param {spot::ltl::parse_error_list &error_list}
|
||||||
%parse-param {spot::ltl::environment &parse_environment}
|
%parse-param {spot::ltl::environment &parse_environment}
|
||||||
%parse-param {spot::ltl::formula* &result}
|
%parse-param {spot::ltl::formula* &result}
|
||||||
%debug
|
|
||||||
%error-verbose
|
|
||||||
%union
|
%union
|
||||||
{
|
{
|
||||||
int token;
|
int token;
|
||||||
|
|
@ -40,7 +44,7 @@
|
||||||
spot::ltl::formula* ltl;
|
spot::ltl::formula* ltl;
|
||||||
}
|
}
|
||||||
|
|
||||||
%{
|
%code {
|
||||||
/* ltlparse.hh and parsedecl.hh include each other recursively.
|
/* ltlparse.hh and parsedecl.hh include each other recursively.
|
||||||
We mut ensure that YYSTYPE is declared (by the above %union)
|
We mut ensure that YYSTYPE is declared (by the above %union)
|
||||||
before parsedecl.hh uses it. */
|
before parsedecl.hh uses it. */
|
||||||
|
|
@ -69,7 +73,7 @@ using namespace spot::ltl;
|
||||||
} \
|
} \
|
||||||
while (0);
|
while (0);
|
||||||
|
|
||||||
%}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* All tokens. */
|
/* All tokens. */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
## Copyright (C) 2003, 2004, 2006, 2008 Laboratoire d'Informatique de
|
## Copyright (C) 2003, 2004, 2006, 2008, 2009 Laboratoire d'Informatique de
|
||||||
## Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
## Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||||
## Université Pierre et Marie Curie.
|
## Université Pierre et Marie Curie.
|
||||||
##
|
##
|
||||||
|
|
@ -50,7 +50,7 @@ $(FROM_TGBAPARSE_YY_MAIN): $(srcdir)/$(TGBAPARSE_YY)
|
||||||
## $(srcdir)/$(TGBAPARSE_YY), it will also use the value of $(srcdir)/
|
## $(srcdir)/$(TGBAPARSE_YY), it will also use the value of $(srcdir)/
|
||||||
## in the generated include statements.
|
## in the generated include statements.
|
||||||
cd $(srcdir) && \
|
cd $(srcdir) && \
|
||||||
bison --defines --locations --skeleton=lalr1.cc --report=all \
|
bison -Wall -Werror --report=all \
|
||||||
$(TGBAPARSE_YY) -o $(FROM_TGBAPARSE_YY_MAIN)
|
$(TGBAPARSE_YY) -o $(FROM_TGBAPARSE_YY_MAIN)
|
||||||
$(FROM_TGBAPARSE_YY_OTHERS): $(TGBAPARSE_YY)
|
$(FROM_TGBAPARSE_YY_OTHERS): $(TGBAPARSE_YY)
|
||||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(FROM_TGBAPARSE_YY_MAIN)
|
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(FROM_TGBAPARSE_YY_MAIN)
|
||||||
|
|
|
||||||
|
|
@ -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),
|
** Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||||
** Université Pierre et Marie Curie.
|
** Université Pierre et Marie Curie.
|
||||||
**
|
**
|
||||||
|
|
@ -19,7 +19,15 @@
|
||||||
** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
** 02111-1307, USA.
|
** 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
%{
|
%language "C++"
|
||||||
|
%locations
|
||||||
|
%defines
|
||||||
|
%name-prefix "tgbayy"
|
||||||
|
%debug
|
||||||
|
%error-verbose
|
||||||
|
|
||||||
|
%code requires
|
||||||
|
{
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "public.hh"
|
#include "public.hh"
|
||||||
|
|
||||||
|
|
@ -28,16 +36,13 @@
|
||||||
over, and to register all their atomic_propositions in the
|
over, and to register all their atomic_propositions in the
|
||||||
bdd_dict. Keep the bdd result around so we can reuse it. */
|
bdd_dict. Keep the bdd result around so we can reuse it. */
|
||||||
typedef std::map<std::string, bdd> formula_cache;
|
typedef std::map<std::string, bdd> formula_cache;
|
||||||
%}
|
}
|
||||||
|
|
||||||
%name-prefix="tgbayy"
|
|
||||||
%parse-param {spot::tgba_parse_error_list& error_list}
|
%parse-param {spot::tgba_parse_error_list& error_list}
|
||||||
%parse-param {spot::ltl::environment& parse_environment}
|
%parse-param {spot::ltl::environment& parse_environment}
|
||||||
%parse-param {spot::ltl::environment& parse_envacc}
|
%parse-param {spot::ltl::environment& parse_envacc}
|
||||||
%parse-param {spot::tgba_explicit*& result}
|
%parse-param {spot::tgba_explicit*& result}
|
||||||
%parse-param {formula_cache& fcache}
|
%parse-param {formula_cache& fcache}
|
||||||
%debug
|
|
||||||
%error-verbose
|
|
||||||
%union
|
%union
|
||||||
{
|
{
|
||||||
int token;
|
int token;
|
||||||
|
|
@ -46,7 +51,8 @@ typedef std::map<std::string, bdd> formula_cache;
|
||||||
std::list<spot::ltl::formula*>* list;
|
std::list<spot::ltl::formula*>* list;
|
||||||
}
|
}
|
||||||
|
|
||||||
%{
|
%code
|
||||||
|
{
|
||||||
#include "ltlast/constant.hh"
|
#include "ltlast/constant.hh"
|
||||||
#include "ltlvisit/destroy.hh"
|
#include "ltlvisit/destroy.hh"
|
||||||
/* Unfortunately Bison 2.3 uses the same guards in all parsers :( */
|
/* Unfortunately Bison 2.3 uses the same guards in all parsers :( */
|
||||||
|
|
@ -67,7 +73,7 @@ using namespace spot::ltl;
|
||||||
#define yylex tgbayylex
|
#define yylex tgbayylex
|
||||||
|
|
||||||
typedef std::pair<bool, spot::ltl::formula*> pair;
|
typedef std::pair<bool, spot::ltl::formula*> pair;
|
||||||
%}
|
}
|
||||||
|
|
||||||
%token <str> STRING UNTERMINATED_STRING
|
%token <str> STRING UNTERMINATED_STRING
|
||||||
%token <str> IDENT
|
%token <str> IDENT
|
||||||
|
|
@ -161,7 +167,7 @@ strident: string | IDENT
|
||||||
|
|
||||||
condition:
|
condition:
|
||||||
{
|
{
|
||||||
$$ = 0
|
$$ = 0;
|
||||||
}
|
}
|
||||||
| string
|
| string
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue