From: rns <sor...@gmail.com>
Date: Mon, 5 Nov 2012 10:31:58 -0800 (PST)
Local: Mon, Nov 5 2012 1:31 pm
Subject: Re: Question to the list: BNF interface notation
Sounds good. One question: how about adding a question mark sum ::= term (op_add)*?* term action => do_addition to specify that the symbols enclosed in parent are optional? This would sit On Monday, November 5, 2012 8:27:01 PM UTC+2, Jeffrey Kegler wrote:
> I intend in the BNF interface to introduce parentheses, which will > What I intend is that, for example, in the rule > sum ::= term (op_add) term action => do_addition > the semantics would see the two 'term' values, but would not see the > do_addition { > On the other hand if the rule were written as follows > sum ::= term op_add term action => do_addition > the traditional semantics would be written > do_addition { > Reasons for the discard-if-parenthesized convention: Parenthesis > Possible reasons to dislike it: In Perl 5 regexes, parentheses by default > Feedback from this list has changed my mind in the past, and I'd like to > -- jeffrey You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||