On Tue, Sep 4, 2012 at 9:35 PM, Marco Patzer <home...@lavabit.com> wrote:

> On 2012-09-04 Herbert Voss <herbert.v...@fu-berlin.de> wrote:
>
> > voss@shania:~/ConTeXt> lua zzz.lua
> > lua: zzz.lua:1: unexpected symbol near ';'
>
> marco@homerow:/tmp$ lua t.lua
> true
>
> > voss@shania:~/ConTeXt> lua -v
> > Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
>
> marco@homerow:/tmp$ lua -v
> Lua 5.2.1  Copyright (C) 1994-2012 Lua.org, PUC-Rio
>
>
Because in Lua 5.2 there is the empty statements
http://www.lua.org/manual/5.2/manual.html#3
"""
3.3.1 – Blocks

A block is a list of statements, which are executed sequentially:

block ::= {stat}
Lua has empty statements that allow you to separate statements with
semicolons, start a block with a semicolon or write two semicolons in
sequence:

stat ::= ‘;’
"""
So
stat ::= if exp then block {elseif exp then block} [else block] end

means that
if exp then
;
else
;
end
is valid.

Luatex still uses lua 5.1.4


-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to