From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1540 invoked by alias); 17 Jan 2008 20:15:52 -0000 Received: (qmail 1531 invoked by uid 22791); 17 Jan 2008 20:15:51 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 17 Jan 2008 20:15:34 +0000 Received: (qmail 27450 invoked from network); 17 Jan 2008 20:15:32 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Jan 2008 20:15:32 -0000 To: "Rob Quill" Cc: msnyder@specifix.com, gdb-patches@sourceware.org Subject: Re: New scope checking patch References: From: Jim Blandy Date: Thu, 17 Jan 2008 20:15:00 -0000 In-Reply-To: (Rob Quill's message of "Thu, 17 Jan 2008 19:32:27 +0000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00455.txt.bz2 "Rob Quill" writes: > @@ -208,6 +208,8 @@ > %token TRUEKEYWORD > %token FALSEKEYWORD > > +/* $in_scope opperator */ > +%left IN_SCOPE > > %left ',' > %left ABOVE_COMMA Doesn't it work to treat $in_scope like sizeof, declared with %token? $in_scope isn't really left-associative in any meaningful sense. > + { > + write_exp_elt_longcst ((LONGEST) 1); > + } You should leave out the braces here, and in the 'else', since there's only one statement. Also, please be sure that the indentation follows the GNU coding conventions. Substatements should be indented by two spaces. (c-exp.y is not a great place to look for examples, since it's a mess, but look at, say, frame.c.) >From looking at your patch as it arrived through my mailer, it seemed that the code block for the new $in_scope grammar rule was not indented in the same way as the other blocks. These should all be consistent.