bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bison 3.0 vs. Flex


From: Akim Demaille
Subject: Re: Bison 3.0 vs. Flex
Date: Wed, 16 Oct 2013 15:53:45 +0200

Le 28 sept. 2013 à 19:35, Ludovic Courtès <address@hidden> a écrit :

> Hello,

Hi Ludo!

> While upgrading Bison from 2.7.1 to 3.0 in the GNU system [0], I noticed
> that this actually breaks 2 test cases in the test suite of Flex 2.5.37:
> 
> --8<---------------cut here---------------start------------->8---
> Executing test test-bison-yylloc
> Test test-bison-yylloc FAILED. See test-bison-yylloc/OUTPUT for details.
> Executing test test-bison-yylval
> Test test-bison-yylval FAILED. See test-bison-yylval/OUTPUT for details.
> --8<---------------cut here---------------end--------------->8---
> 
> OUTPUT:
> 
> --8<---------------cut here---------------start------------->8---
> make[5]: Entering directory 
> `/tmp/nix-build-flex-2.5.37.drv-0/flex-2.5.37/tests/test-bison-yylloc'
> ../../flex scanner.l
> /nix/store/9l0w1ahl8cf3vgjsbx4z8f8vnw9vqnh3-bison-3.0/bin/bison --defines 
> --output=parser.c --name-prefix="test" parser.y
> parser.y:55.1-12: warning: deprecated directive, use ‘%pure-parser’ 
> [-Wdeprecated]
> %pure_parser
> ^^^^^^^^^^^^

This is indeed a new warning in Bison 3.0.

> gcc -c -o scanner.o -I. -I../.. -I../.. -I.  -g -O2 scanner.c
> gcc -c -o parser.o -I. -I../.. -I../.. -I.  -g -O2 parser.c
> parser.y: In function ‘testparse’:
> parser.y:79:98: error: ‘scanner’ undeclared (first use in this function)
> parser.y:79:98: note: each undeclared identifier is reported only once for 
> each function it appears in
> parser.c:1424:9: warning: passing argument 1 of ‘testerror’ discards ‘const’ 
> qualifier from pointer target type [enabled by default]
> parser.y:38:5: note: expected ‘char *’ but argument is of type ‘const char *’
> make[5]: *** [parser.o] Error 1
> make[5]: Leaving directory 
> `/tmp/nix-build-flex-2.5.37.drv-0/flex-2.5.37/tests/test-bison-yylloc'
> --8<---------------cut here---------------end--------------->8---
> 
> Does that ring a bell?

It has probably something to do with the fact that we no longer
support YYPARSE_PARAM in favor of %parse-param, though I should
have a look at the code to know more about this.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]