[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: expression parser change
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 20 Dec 2010 10:16:02 -0200
> 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
It has exactly the same problem:
a = "hellooo"
(print or io.write)(a)
Moreover, it is too ad-hoc. We justify parentheses as the only
exception because everything else fits inside them. But to allow
parentheses plus strings, because that is what happens to be useful
right now, is not a good argument.
-- Roberto