Add support for Bison 3.0.

We still want to remain compatible with Bison 2.7 so instead of fixing
all the new errors reported by 3.0 we silence some warning.  We should
fix these for good once Bison 3.0 is more widespread.

* m4/bison.m4: New file. Test if bison support -Wno-empty-rule and
-Wno-deprecated.  Define BISON and BISON_EXTRA_FLAGS.
* configure.ac: Do not test for yacc, use the above test instead.
* src/dstarparse/Makefile.am, src/eltlparse/Makefile.am,
src/kripkeparse/Makefile.am, src/ltlparse/Makefile.am,
src/neverparse/Makefile.am, src/tgbaparse/Makefile.am: Use BISON
and BISON_EXTRA_FLAGS.
* src/ltlparse/ltlparse.yy: Fix or and remove useless %right/%nonassoc
settings.
* src/eltlparse/eltlparse.yy: Likewise, and remove "%pure-parser".
This commit is contained in:
Alexandre Duret-Lutz 2013-09-30 19:36:19 +02:00
parent 5663872083
commit 3c943d836a
10 changed files with 27 additions and 12 deletions

View file

@ -43,7 +43,7 @@ $(FROM_LTLPARSE_YY_MAIN): $(srcdir)/$(LTLPARSE_YY)
## $(srcdir)/$(LTLPARSE_YY), it will also use the value of $(srcdir)/
## in the generated include statements.
cd $(srcdir) && \
bison -Wall -Werror --report=all \
$(BISON) -Wall -Werror --report=all $(BISON_EXTRA_FLAGS) \
$(LTLPARSE_YY) -o $(FROM_LTLPARSE_YY_MAIN)
$(FROM_LTLPARSE_YY_OTHERS): $(LTLPARSE_YY)
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(FROM_LTLPARSE_YY_MAIN)

View file

@ -197,7 +197,7 @@ using namespace spot::ltl;
/* Priorities. */
/* Low priority SERE-LTL binding operator. */
%right OP_UCONCAT OP_ECONCAT OP_UCONCAT_NONO OP_ECONCAT_NONO
%nonassoc OP_UCONCAT OP_ECONCAT OP_UCONCAT_NONO OP_ECONCAT_NONO
%left OP_CONCAT
%left OP_FUSION
@ -222,11 +222,11 @@ using namespace spot::ltl;
/* High priority regex operator. */
%nonassoc OP_BSTAR OP_STAR_OPEN OP_PLUS OP_EQUAL_OPEN OP_GOTO_OPEN
/* Not has the most important priority after Wring's `=0' and `=1'. */
/* Not has the most important priority (after Wring's `=0' and `=1',
but as those can only attach to atomic proposition, they do not
need any precedence). */
%nonassoc OP_NOT
%nonassoc OP_POST_NEG OP_POST_POS
%type <ltl> subformula booleanatom sere lbtformula boolformula
%type <ltl> bracedsere parenthesedsubformula
%type <minmax> starargs equalargs sqbracketargs gotoargs