GCC-3.2.2 bootstrap FAILURE: 1 reduce/reduce conflict in objc-parse.y

Ziemowit Laski zlaski@apple.com
Wed Jan 29 00:02:00 GMT 2003


On Tuesday, Jan 28, 2003, at 15:08 US/Pacific, Joseph S. Myers wrote:

> On Tue, 28 Jan 2003, Ziemowit Laski wrote:
>
>> A reduce/reduce conflict is certainly an annoyance, but it is not a 
>> bug
>> -- bison has a deterministic, POSIX-annointed method for dealing with 
>> it, which the grammar writer knows and expects.
>
> It is, at very least, very bad grammar style, as discussed in the Bison
> manual.  The grammar should be changed (even though this may make it 
> more
> complicated) to avoid the conflict.

Yes, but style is inherently aesthetic -- and hence subjective -- in 
nature.
If you can find an equivalent grammar that is both intuitive to the 
reader
and conflict-free, then by all means do so.  But if your conflict-free 
grammar
has more to do with Chomsky Normal Form than the language it describes, 
then
I respectfully part company. :-)  The grammar must, first and foremost, 
be
readable and maintainable.  Why else would one use a parser generator in
the first place?

--Zem
--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477



More information about the Gcc-bugs mailing list