[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Comments on the 4.1-alpha manual
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 10 Aug 2001 17:25:27 -0300
> Do you think the table constructor syntax
> specification is easier to understand if it is rewritten as follows?
>
>
> tableconstuctory --> '{' [ fieldlist ] '}'
> fieldlist --> lfieldlist [ ';' [ ffieldlist ] ]
> | ffieldlist [ ';' [ lfieldlist ] ]
> lfieldlist --> exp { ',' exp } [,]
> ffieldlist --> ffield { ',' ffield } [,]
> ffield --> '[' exp ']' '=' exp | name '=' exp
I guess the correct syntax would be more like
fieldlist --> [ lfieldlist ] [ ';' [ ffieldlist ] ]
| [ ffieldlist ] [ ';' [ lfieldlist ] ]
as things like {;}, {;12}, and {;a=1} are all valid...
-- Roberto