[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Language with multiple statements on one line
On Wed, 7 Jan 2004 paul-rene.jorgensen@telenor.com wrote:
> ### BEGIN
> <nl>
> A=4 : B=5<nl>
> <nl>
> <nl>
> A=A+B<nl>
> <nl>
> B=1 : C=1<nl>
> <nl>
> ### END
I think that there are probably many ways to do this; one way you could do
this is with:
file = nl* line* statement_list? // to take care of files without trailing CRs
line = statement_list nl+
statement_list = {single} statement
| {multi} statement colon+ statement_list
Tell me if that works.
pat