[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) GOTO
- From: "Michael Rose" <michael.h.rose@...>
- Date: Thu, 16 Jun 2011 19:41:24 +0200 (CEST)
Von: "Pierre-Yves Gérardy" <email@example.com>
Gesendet: 16.06.2011 11:36:51
An: "Lua mailing list" <firstname.lastname@example.org>
Betreff: Re: [ANN] Lua 5.2.0 (beta-rc1) GOTO
>On Thu, Jun 16, 2011 at 10:10, Michael Rose <email@example.com> wrote:
>You could hard code the "|" and "]" tokens in the parser and get rid
>of the second and third @ which are bulky and redundant (they're not
>needed for a non-ambiguous grammar).
>var = @[ statements | expresion ]
True. This could be done. But this would tighten the currently non-used '|' to this construct,
which is mainly used to support compiler generated code. There are only a few
nonused characters and we should be careful not to waste them.
If this construct should go into standard Lua, I would prefer keywords instead, e.g.
stat <statements> expr <expr> end
For compiler generated code the '@[ ... @| ... @]' syntax doesn't hurt and has the
advantage, that only the '@' sign is needed to generate the extra tokens.
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar