lua-users home
lua-l archive

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


-----Ursprüngliche Nachricht-----
Von: "Pierre-Yves Gérardy" <pygy79@gmail.com>
Gesendet: 16.06.2011 11:36:51
An: "Lua mailing list" <lua-l@lists.lua.org>
Betreff: Re: [ANN] Lua 5.2.0 (beta-rc1) GOTO

>On Thu, Jun 16, 2011 at 10:10, Michael Rose <michael.h.rose@web.de> 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.

>
>Regards,
>-- Pierre-Yves
>

Regards,

Michael Rose
___________________________________________________________
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar