Grammar question.

Morten <>
23 Apr 2002 23:46:43 -0400

          From comp.compilers

Related articles
Grammar question. (Morten) (2002-04-23)
Re: Grammar question. (Tim G) (2002-05-08)
| List of all articles for this month |

From: Morten <>
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


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?



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.