bison-patches
[Top][All Lists]
Advanced

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

Re: FYI: default %printer/%destructor


From: Joel E. Denny
Subject: Re: FYI: default %printer/%destructor
Date: Sun, 19 Nov 2006 15:17:25 -0500 (EST)

On Sun, 19 Nov 2006, Hans Aberg wrote:

> If Bison moves that far, to multilingual output support, I expect the parsing
> in each {...} be output language specific anyway. So it is not any point in
> worrying about the fact that say "$" does not work in this or that output
> language.

I can buy that.  Also, it's probably best that Bison developers come up 
with the $ and @ alternatives for each output language rather than leaving 
it up to every user to do it his own way.

> > > Or maybe it should be possible to name these separately:
> > >   exp($sum, @sum): exp($term1, @term1) '+' exp($term2, @term2)
> > 
> > Please don't.
> 
> I think too, that such ideas will make the grammars rather unreadable to
> humans. :-)

Ok, here's a less verbose alternative:

  a(name1): b c() d(@name2)

For a, the value and location are $name1 and @name2.
For b, they are $b and @b.  
For c, the value is declared unused.

So far, these are old ideas I've discussed at length before.  What's new 
is that, for d, the value is also declared unused, but the location can be 
referenced with @name2.  This last usage may not be common, but I think it 
ought to be possible.

> I think the best way is to think of it as one defines objects named "sum",
> "term1", etc., from which value, location, plus perhaps some, can be
> extracted. Right now, this is done using "$" and "@".

Yes, I like that view.




reply via email to

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