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: Tue, 21 Nov 2006 20:33:20 -0500 (EST)

On Tue, 21 Nov 2006, Joel E. Denny wrote:

> Ok, thanks.  Nevertheless, surely it's not as common as () used for 
> grouping.  And it's still not clear to me what's wrong with "(...)?" 
> instead of "[...]".

I now see that EBNF has a use for ?.

I have to wonder why we should bother trying to make the notation for 
named semantic values compatible with EBNF.  Is anyone ever actually going 
to contribute EBNF support to Bison?  When optionality and repetitions are 
possible, do named semantic values even make sense?  Should we really 
sacrifice the quality of our current notation to accommodate a feature 
that may never happen and that may not make sense anyway?  Instead, why 
not let the person who tries to implement EBNF figure out another notation 
for named semantic values?  He can put Bison in an %ebnf mode if 
necessary.

I'm guessing that you and Hans are telling me that users will have just as 
much of a preconceived notion for the meaning of [] as they will for the 
meaning of ().  At least () for named semantic values has some precedence 
in Lemon.

With all that in mind, I say we stick with parentheses:

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

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




reply via email to

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