function luaY.check_match(N,Q,x,n,Z)if not N:testnext(Q,x)then if Z==Q.linenumber then N:error_expected(Q,x)else luaX:syntaxerror(Q,string.format(N.LUA_QS..(" \101\120\112\101\099\116\101\100 \040\116\111 \099\108\111\115\101 "..(N.LUA_QS.." \097\116 \108\105\110\101 \037\100\041")),luaX:token2str(Q,x),luaX:token2str(Q,n),Z))end end end

function luaY:check_match(ls, what, who, where)
  if not self:testnext(ls, what) then
    if where == ls.linenumber then
      self:error_expected(ls, what)
    else
      luaX:syntaxerror(ls, string.format(
        self.LUA_QS.." expected (to close "..self.LUA_QS.." at line %d)",
        luaX:token2str(ls, what), luaX:token2str(ls, who), where))
    end
  end
end
