chunk
stat list
stat list
stat list
stat list
stat list
stat
keyword function
function
funcname
dotted name
Name
gen
optional colon name element
funcbody
(
optional parlist
namelist
Name
n
)
block
chunk
laststat
keyword return
return
optional explist
explist
exp
exp
var
prefixexp
var
Name
coroutine
.
Name
wrap
args
(
optional explist
explist
exp
function
keyword function
function
funcbody
(
optional parlist
)
block
chunk
stat list
stat
keyword for
for
Name
i
=
exp
Number
2
,
exp
var
Name
n
keyword do
do
block
chunk
stat list
stat
functioncall
prefixexp
var
prefixexp
var
Name
coroutine
.
Name
yield
args
(
optional explist
explist
exp
var
Name
i
)
keyword end
end
keyword end
end
)
keyword end
end
stat
keyword function
function
funcname
dotted name
Name
filter
optional colon name element
funcbody
(
optional parlist
namelist
Name
p
Name
g
)
block
chunk
laststat
keyword return
return
optional explist
explist
exp
exp
var
prefixexp
var
Name
coroutine
.
Name
wrap
args
(
optional explist
explist
exp
function
keyword function
function
funcbody
(
optional parlist
)
block
chunk
stat list
stat
keyword while
while
exp
Number
1
keyword do
do
block
chunk
stat list
stat list
stat list
stat
keyword local
local
namelist
Name
n
optional namelist initialization
=
explist
exp
exp
var
Name
g
args
(
optional explist
)
stat
keyword if
if
exp
exp
var
Name
n
==
exp
keyword nil
nil
keyword then
then
block
chunk
laststat
keyword return
return
optional explist
elseif sequence
optional else block
keyword end
end
stat
keyword if
if
exp
exp
exp
var
prefixexp
var
Name
math
.
Name
mod
args
(
optional explist
explist
exp
var
Name
n
exp
var
Name
p
)
~=
exp
Number
0
keyword then
then
block
chunk
stat list
stat
functioncall
prefixexp
var
prefixexp
var
Name
coroutine
.
Name
yield
args
(
optional explist
explist
exp
var
Name
n
)
elseif sequence
optional else block
keyword end
end
keyword end
end
keyword end
end
)
keyword end
end
stat
varlist
var
Name
N
=
explist
exp
exp
var
Name
N
keyword or
or
exp
Number
1000
stat
varlist
var
Name
x
=
explist
exp
exp
var
Name
gen
args
(
optional explist
explist
exp
var
Name
N
)
stat
keyword while
while
exp
Number
1
keyword do
do
block
chunk
stat list
stat list
stat list
stat list
stat
keyword local
local
namelist
Name
n
optional namelist initialization
=
explist
exp
exp
var
Name
x
args
(
optional explist
)
stat
keyword if
if
exp
exp
var
Name
n
==
exp
keyword nil
nil
keyword then
then
block
chunk
laststat
keyword break
break
elseif sequence
optional else block
keyword end
end
stat
functioncall
prefixexp
var
Name
print
args
(
optional explist
explist
exp
var
Name
n
)
stat
varlist
var
Name
x
=
explist
exp
exp
var
Name
filter
args
(
optional explist
explist
exp
var
Name
n
exp
var
Name
x
)
keyword end
end
