bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] symbolic names


From: Joel E. Denny
Subject: Re: [PATCH] symbolic names
Date: Thu, 2 Apr 2009 11:34:31 -0400 (EDT)

On Wed, 1 Apr 2009, Akim Demaille wrote:

> > (former "assymetric renaming")
> > if_stmt1: IF expr[cond] THEN stmt[then] ELSE stmt[else] FI
> >            { $if_stmt1 = new IfStmt($cond, $then, $stmt); };
> > interpreter.ypp:79.51-55: reference is misleading: `$stmt'
> > interpreter.ypp:78.30-33:   possibly meant: $stmt at $4, symbol hidden
> > interpreter.ypp:78.46-49:   possibly meant: $stmt at $6, symbol hidden
> 
> Hum...  I don't think it is misleading, it is plain "wrong".  The name "stmt"
> is not available at all.

I would have called this an "undefined reference" (or "reference not 
found" or whatever) because there are no "refers to" submessages.  Also, 
this is not what we formerly called an "asymmetric renaming", which would 
require one stmt not to be renamed.

> > (reference to a symbol with dots)
> > if_stmt: IF expr[cond] THEN stmt.list FI
> >            { $if_stmt = new IfStmt($cond, $stmt.list, 0); };
> > interpreter.ypp:76.43-52: reference not found: `$stmt.list'
> 
> I don't understand this one.  What is not found is $stmt.
> 
> > interpreter.ypp:75.29-37:   possibly meant: $[stmt.list] at $4

Alex's message makes sense to me here, but I can also see the confusion. 
Maybe we just need to bracket the expression in the main message too?

  interpreter.ypp:76.43-52: reference not found: $[stmt].list
  interpreter.ypp:75.29-37:   possibly meant: $[stmt.list] at $4

If we do that, then there's more motivation to drop the quotes.  That is, 
Bison is no longer quoting the user's expression verbatim.

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]