From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9555 invoked by alias); 29 Nov 2006 19:06:33 -0000 Received: (qmail 9546 invoked by uid 22791); 29 Nov 2006 19:06:33 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 29 Nov 2006 19:06:21 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1GpUl4-0002av-AD; Wed, 29 Nov 2006 14:06:14 -0500 Date: Wed, 29 Nov 2006 19:06:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: Rob Quill , gdb@sourceware.org Subject: Re: Checking variable scope Message-ID: <20061129190614.GB9754@nevyn.them.org> Mail-Followup-To: Jim Blandy , Rob Quill , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00238.txt.bz2 On Wed, Nov 29, 2006 at 10:44:33AM -0800, Jim Blandy wrote: > I'm suggesting that you extend the grammar even further, by allowing > one to say things like this (assume there is no binding for 'a' in > scope, but there is a binding for 'b' in scope): > > (gdb) print $in_scope(a) > $1 = 0 > (gdb) print $in_scope(b) > $1 = 1 > (gdb) Is extending the grammar really necessary? That will already parse; it's the same as you'd use for a convenience variable named in_scope holding a function pointer. -- Daniel Jacobowitz CodeSourcery