function luaY.forstat(e,s,Z)local W=s.fs local X={}e:enterblock(W,X,true)luaX:next(s)local P=e:str_checkname(s)local c=s.t.token if c=="\061"then e:fornum(s,P,Z)elseif c=="\044"or c=="\084\075\095\073\078"then e:forlist(s,P)else luaX:syntaxerror(s,e:LUA_QL("\061")..(" \111\114 "..(e:LUA_QL("\105\110").." \101\120\112\101\099\116\101\100")))end e:check_match(s,"\084\075\095\069\078\068","\084\075\095\070\079\082",Z)e:leaveblock(W)end
------------------------------------------------------------------------
-- initial parsing for a for loop, calls fornum() or forlist()
-- * used in statements()
------------------------------------------------------------------------
function luaY:forstat(ls, line)
	-- forstat -> FOR (fornum | forlist) END
	local fs = ls.fs
	local bl = {} -- BlockCnt
	self:enterblock(fs, bl, true) -- scope for loop and control variables
	luaX:next(ls) -- skip `for'
	local varname = self:str_checkname(ls) -- first variable name
	local c = ls.t.token
	if c == "=" then
		self:fornum(ls, varname, line)
	elseif c == "," or c == "TK_IN" then
		self:forlist(ls, varname)
	else
		luaX:syntaxerror(ls, self:LUA_QL("=") .. " or " .. self:LUA_QL("in") .. " expected")
	end
	self:check_match(ls, "TK_END", "TK_FOR", line)
	self:leaveblock(fs) -- loop scope (`break' jumps to this point)
end
