bison-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: named references


From: Joel E. Denny
Subject: Re: [PATCH] Re: named references
Date: Fri, 20 Mar 2009 17:01:29 -0400 (EDT)

On Fri, 20 Mar 2009, Akim Demaille wrote:

> Le 20 mars 09 ? 16:17, Joel E. Denny a ?crit :
> 
> > > /* an ambiguity because of dot issue; there is an additional
> > >    explaination */
> > > if_stmt: IF expr THEN stmt ELSE stmt.list FI
> > >           { $if_stmt = new IfStmt($expr, $stmt, $stmt.list); };
> > > interpreter.ypp:74.50-59: reference is ambiguous: `$stmt.list'
> > > interpreter.ypp:73.23-26: (may refer to: `stmt')
> > > interpreter.ypp:73.33-41: (may also refer to: `stmt.list')
> > > interpreter.ypp:74.50-59: (you may consider using `$[stmt]' or
> > > `$[stmt.list]')
> > 
> > In general, it might be nicer if the "may refer to" messages always
> > include the full bracketed expressions.  Then there's slightly less to
> > read in the above messages:
> > 
> >  interpreter.ypp:74.50-59: reference is ambiguous: `$stmt.list'
> >  interpreter.ypp:73.23-26: (may refer to: `$[stmt].list')
> >  interpreter.ypp:73.33-41: (may also refer to: `$[stmt.list]')
> > 
> > This is a very minor improvement.  Don't worry about it if it's too much
> > trouble.
> 
> I like this improvement.  Note though that this is not "ambiguous", this is
> rather "misleading".

Yep.  I missed that.  Maybe:

  interpreter.ypp:74.50-59: reference is misleading: `$stmt.list'
  interpreter.ypp:73.23-26: (refers to: `$[stmt].list' at $4)
  interpreter.ypp:73.33-41: (possibly meant: `$[stmt.list]' at $6)

On Fri, 20 Mar 2009, Joel E. Denny wrote:

> On Wed, 18 Mar 2009, Alex Rozenman wrote:
> 
> > /* a real ambiguity reported regardless of dots, note that dots cannot
> >     be a reason for these ambiguities */
> > if_stmt: IF expr THEN stmt.list ELSE stmt.list FI
> >            { $if_stmt = new IfStmt($expr, $stmt.list, $stmt.list); };
> > interpreter.ypp:74.43-52: reference is ambiguous: `$stmt.list'
> > interpreter.ypp:73.23-31: (may refer to: `stmt.list')
> > interpreter.ypp:73.38-46: (may also refer to: `stmt.list')
> 
> I think this would be better if it read:
> 
>   interpreter.ypp:73.23-31: (may refer to: `stmt.list' at $4)
>   interpreter.ypp:73.38-46: (may also refer to: `stmt.list' at $6)

Actually, this should be more like:

  interpreter.ypp:74.43-52: reference is undefined: `$stmt.list'
  interpreter.ypp:73.38-46: (possibly meant: `$[stmt.list]' at $4)
  interpreter.ypp:73.38-46: (possibly meant: `$[stmt.list]' at $6)

Notice there is no "refers to".

reply via email to

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