bug-bison
[Top][All Lists]
Advanced

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

Re: webkit will not build with bison 2.4


From: George Sherwood
Subject: Re: webkit will not build with bison 2.4
Date: Wed, 19 Nov 2008 14:45:58 -0600

On Wed, 19 Nov 2008 11:46:20 -0500 (EST)
"Joel E. Denny" <address@hidden> wrote:

> On Wed, 19 Nov 2008, George Sherwood wrote:
> 
> > > > 346 closing_brace:
> > > > 347     '}'
> > > > 348   | %prec maybe_sgml TOKEN_EOF
> > > > 349   ;
> > > 
> > > The argument of %prec must be a token.  maybe_sgml is a
> > > nonterminal. Bison 2.3 ignored this error.  Bison 2.3b and later
> > > complain about it.
> > > 
> > > I can't tell for sure what the webkit developers intended here,
> > > but removing maybe_sgml from line 348 should make Bison stop
> > > complaining.
> > > 
> > 
> > Thanks.  Unfortunately it isn't going to be that easy.  Removing
> > maybe_sgml from 348 results in an error also.
> > 
> > /usr/bin/bison -d -p cssyy WebCore/css/CSSGrammar.y
> > -o ./DerivedSources/CSSGrammar.cpp 
> > WebCore/css/CSSGrammar.y: conflicts:105 shift/reduce, 6
> > reduce/reduce WebCore/css/CSSGrammar.y: expected 48 shift/reduce
> > conflicts WebCore/css/CSSGrammar.y: expected 0 reduce/reduce
> > conflicts make: *** [DerivedSources/CSSGrammar.cpp] Error 1
> 
> Given how this change increases the conflicts, it's possible that
> Bison 2.3's interpretation is actually what the webkit developers
> intended. It's hard to tell though because precedence cannot be
> declared for nonterminals.  Bison 2.3 is using a default precedence
> by mistake here.
> 
> If you want to adjust the grammar so that both Bison 2.4 and Bison
> 2.3 interpret it in the same manner as Bison 2.3 interpreted the
> original grammar, it looks like you can do this as follows.  Add
> 
>   %nonassoc LOWEST_PREC
> 
> before any other %nonassoc, %left, or %right in the grammar file.
> Now change `maybe_sgml' in line 348 to LOWEST_PREC.  You'll have to
> test this on the webkit grammar as I have not downloaded it to try it.
> 
> 
> 
Thanks for the hint and I tried follow the above, but it didn't work.
It did get past the initial call but something must not have been
correct, because it failed on the compile of the derived file.

SSGrammar.Tpo -c -o DerivedSources/libWebCore_la-CSSGrammar.lo `test -f 
'DerivedSources/CSSGrammar.cpp' || echo
'./'`DerivedSources/CSSGrammar.cpp WebCore/css/CSSGrammar.y: In
function ‘int cssyyparse(void*)’: WebCore/css/CSSGrammar.y:1353: error:
expected `;' before ‘}’ token WebCore/css/CSSGrammar.y:1354: error:
expected `;' before ‘}’ token WebCore/css/CSSGrammar.y:1356: error:
expected `;' before ‘}’ token make[1]: ***
[DerivedSources/libWebCore_la-CSSGrammar.lo] Error 1 make[1]: Leaving
directory `/usr/src/WebKit-r38592' make: *** [all] Error 2

Hopefully the webkit devs will get this figured out.


George
-- 
George Sherwood
Source Mage GNU/Linux Lead Developer
http://www.sourcemage.org

Attachment: signature.asc
Description: PGP signature


reply via email to

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