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

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


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

> On Tue, 28 Jan 2003, Ziemowit Laski wrote:
>
>> 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?
>
> Maintainability is the reason to avoid parser conflicts.  Every change 
> to
> a parser that changes the number of conflicts requires all the 
> conflicts
> to be examined carefully to ensure that the parser will parse 
> correctly in
> each case and that no conflicts have been added without good reason.

If one's _adding_ a new conflict, then I agree that one must be careful.
Ensuring that the "parser will parse correctly in each case" has a 
slight
"halting problem" flavor to it (esp. since we don't know if it parsed
things correctly to begin with); still, one should at least add a 
comment
in the grammar explaining what the conflict is and how it _should_ be
be resolved (lest the user move around the rules!).

In the case at hand, though, the reduce/reduce conflict has been there
for generations... :-)

--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