lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Here is a nit pick about the BNF given in the section titled "The
Complete Syntax of Lua".  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

John