lua-users home
lua-l archive

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


On Sep 2, 2014, at 10:03 AM, Steven Degutis <sbdegutis@gmail.com> wrote:

> To be honest, I'm a little confused about exactly how Lua's grammar
> works. A big part of this is because I recently heard (on this mailing
> list?) that Section 9 of the Manual ("The Complete Syntax of Lua") is
> not strictly accurate but more of a general idea.
> 
> On Mon, Sep 1, 2014 at 3:17 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>> 2014-09-01 19:14 GMT+02:00 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>>>> A label does not need any other punctuation. In particular,
>>>> ::continue::end is legal without an intervening spaces.
>>> 
>>> Why are you surprised?
>> 
>> I've been automicallly either putting a label on its own line or at worst
>> coding a space ever since the goto statement was introduced.
>> Yesterday I mistyped, so there was no space. When I noticed the
>> omission later, it made me wonder why there was no error.
>> 
> 


I think it’s more correct to say that, technically, it is *incomplete* since some of the non-terminals are not resolved in the grammar. I’ve studied it quite a bit and have not found any errors (though a few surprises lol).

—Tim