lua-users home
lua-l archive

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


On 12/17/2010 1:51 PM, Roberto Ierusalimschy wrote:
The point is to get rid of prefixexp folding it into simpleexp.
The prefixexp rule just limits the syntax without any reason.

[...]

Of course, it's 100% backwards compatible.

It is not...

The following chunk has the same meaning in 5.1 and 5.2 alpha,
but gets a different meaning with this change:

   a = nil
   (print or io.write)(a)

So how about more constrained version I suggested before, i.e. leave prefixexp in but extend it so that it can contain also literal constant?

 - prefixexp ::= var | functioncall | ‘(’ exp ‘)’
+ prefixexp ::= var | functioncall | ‘(’ exp ‘)’ | String

Pavel