function luaY.subexpr(C,q,f,P)C:enterlevel(q)local m=C:getunopr(q.t.token)if m~="\079\080\082\095\078\079\085\078\079\080\082"then luaX:next(q)C:subexpr(q,f,C.UNARY_PRIORITY)luaK:prefix(q.fs,m,f)else C:simpleexp(q,f)end local z=C:getbinopr(q.t.token)while z~="\079\080\082\095\078\079\066\073\078\079\080\082"and C.priority[luaK.BinOpr[z]+1][1]>P do local P={}luaX:next(q)luaK:infix(q.fs,z,f)local m=C:subexpr(q,P,C.priority[luaK.BinOpr[z]+1][2])luaK:posfix(q.fs,z,f,P)z=m end C:leavelevel(q)return z end
------------------------------------------------------------------------
-- subexpr -> (simpleexp | unop subexpr) { binop subexpr }
-- where 'binop' is any binary operator with a priority higher than 'limit'
-- * for priority lookups with self.priority[], 1=left and 2=right
-- * recursively called
-- * used in expr()
------------------------------------------------------------------------
function luaY:subexpr(ls, v, limit)
	self:enterlevel(ls)
	local uop = self:getunopr(ls.t.token)
	if uop ~= "OPR_NOUNOPR" then
		luaX:next(ls)
		self:subexpr(ls, v, self.UNARY_PRIORITY)
		luaK:prefix(ls.fs, uop, v)
	else
		self:simpleexp(ls, v)
	end
	-- expand while operators have priorities higher than 'limit'
	local op = self:getbinopr(ls.t.token)
	while op ~= "OPR_NOBINOPR" and self.priority[luaK.BinOpr[op] + 1][1] > limit do
		local v2 = {} -- expdesc
		luaX:next(ls)
		luaK:infix(ls.fs, op, v)
		-- read sub-expression with higher priority
		local nextop = self:subexpr(ls, v2, self.priority[luaK.BinOpr[op] + 1][2])
		luaK:posfix(ls.fs, op, v, v2)
		op = nextop
	end
	self:leavelevel(ls)
	return op -- return first untreated operator
end
