Checking variable scope
Daniel Jacobowitz
drow@false.org
Wed Nov 29 19:06:00 GMT 2006
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
More information about the Gdb
mailing list