Related articles |
---|
Grammar question. morten@kikobu.com (Morten) (2002-04-23) |
Re: Grammar question. timgspam@comcast.net (Tim G) (2002-05-08) |
From: | Morten <morten@kikobu.com> |
Newsgroups: | comp.compilers |
Date: | 23 Apr 2002 23:46:43 -0400 |
Organization: | TDC Internet |
Keywords: | parse, question |
Posted-Date: | 23 Apr 2002 23:46:43 EDT |
Hi.
I have the following pseudo EBNF grammar:
for ::= 'for' <string> (in | (where? (update | return)))
in ::= 'in' <string> where? return
where ::= <evaluates to bool>
update ::= 'update' <string> 'to' <string>
return ::= 'return' <string>
I wish the in clause to be mutually exclusive with the update
clause. They can both have an optional where clause. Can this be
expressed in a nicer way than what I've done above?
Thanks,
Morten
Return to the
comp.compilers page.
Search the
comp.compilers archives again.