From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1937 invoked by alias); 29 Jan 2003 00:49:39 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 1924 invoked from network); 29 Jan 2003 00:49:38 -0000 Received: from unknown (HELO mail-out2.apple.com) (17.254.0.51) by 172.16.49.205 with SMTP; 29 Jan 2003 00:49:38 -0000 Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out2.apple.com (8.11.3/8.11.3) with ESMTP id h0T0ncI17538; Tue, 28 Jan 2003 16:49:38 -0800 (PST) Received: from scv1.apple.com (scv1.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.5) with ESMTP id ; Tue, 28 Jan 2003 16:49:36 -0800 Received: from apple.com (polskifiat.apple.com [17.201.24.57]) by scv1.apple.com (8.11.3/8.11.3) with ESMTP id h0T0nbs01701; Tue, 28 Jan 2003 16:49:37 -0800 (PST) Date: Wed, 29 Jan 2003 06:02:00 -0000 Subject: Re: GCC-3.2.2 bootstrap FAILURE: 1 reduce/reduce conflict in objc-parse.y Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) Cc: Gabriel Dos_Reis , gcc-bugs@gcc.gnu.org, gcc@gcc.gnu.org To: "Joseph S. Myers" From: Ziemowit Laski In-Reply-To: Message-Id: <92BE466F-3323-11D7-AF65-000393673036@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg01523.txt.bz2 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