Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <limits.h>
#include <string.h>
#include "lua.h"
#include "lcode.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "llex.h"
#include "lmem.h"
#include "lobject.h"
#include "lopcodes.h"
#include "lparser.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
Go to the source code of this file.
Data Structures | |
struct | BlockCnt |
struct | ConsControl |
struct | LHS_assign |
Macros | |
#define | lparser_c |
#define | LUA_CORE |
#define | MAXVARS 200 |
#define | hasmultret(k) ((k) == VCALL || (k) == VVARARG) |
#define | eqstr(a, b) ((a) == (b)) |
#define | check_condition(ls, c, msg) { if (!(c)) luaX_syntaxerror(ls, msg); } |
#define | new_localvarliteral(ls, v) |
#define | enterlevel(ls) luaE_incCstack(ls->L) |
#define | leavelevel(ls) ((ls)->L->nCcalls--) |
#define | UNARY_PRIORITY 12 /* priority for unary operators */ |
Typedefs | |
typedef struct BlockCnt | BlockCnt |
typedef struct ConsControl | ConsControl |
Functions | |
static void | statement (LexState *ls) |
static void | expr (LexState *ls, expdesc *v) |
static l_noret | error_expected (LexState *ls, int token) |
static l_noret | errorlimit (FuncState *fs, int limit, const char *what) |
static void | checklimit (FuncState *fs, int v, int l, const char *what) |
static int | testnext (LexState *ls, int c) |
static void | check (LexState *ls, int c) |
static void | checknext (LexState *ls, int c) |
static void | check_match (LexState *ls, int what, int who, int where) |
static TString * | str_checkname (LexState *ls) |
static void | init_exp (expdesc *e, expkind k, int i) |
static void | codestring (expdesc *e, TString *s) |
static void | codename (LexState *ls, expdesc *e) |
static int | registerlocalvar (LexState *ls, FuncState *fs, TString *varname) |
static int | new_localvar (LexState *ls, TString *name) |
static Vardesc * | getlocalvardesc (FuncState *fs, int vidx) |
static int | reglevel (FuncState *fs, int nvar) |
int | luaY_nvarstack (FuncState *fs) |
static LocVar * | localdebuginfo (FuncState *fs, int vidx) |
static void | init_var (FuncState *fs, expdesc *e, int vidx) |
static void | check_readonly (LexState *ls, expdesc *e) |
static void | adjustlocalvars (LexState *ls, int nvars) |
static void | removevars (FuncState *fs, int tolevel) |
static int | searchupvalue (FuncState *fs, TString *name) |
static Upvaldesc * | allocupvalue (FuncState *fs) |
static int | newupvalue (FuncState *fs, TString *name, expdesc *v) |
static int | searchvar (FuncState *fs, TString *n, expdesc *var) |
static void | markupval (FuncState *fs, int level) |
static void | singlevaraux (FuncState *fs, TString *n, expdesc *var, int base) |
static void | singlevar (LexState *ls, expdesc *var) |
static void | adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) |
static l_noret | jumpscopeerror (LexState *ls, Labeldesc *gt) |
static void | solvegoto (LexState *ls, int g, Labeldesc *label) |
static Labeldesc * | findlabel (LexState *ls, TString *name) |
static int | newlabelentry (LexState *ls, Labellist *l, TString *name, int line, int pc) |
static int | newgotoentry (LexState *ls, TString *name, int line, int pc) |
static int | solvegotos (LexState *ls, Labeldesc *lb) |
static int | createlabel (LexState *ls, TString *name, int line, int last) |
static void | movegotosout (FuncState *fs, BlockCnt *bl) |
static void | enterblock (FuncState *fs, BlockCnt *bl, lu_byte isloop) |
static l_noret | undefgoto (LexState *ls, Labeldesc *gt) |
static void | leaveblock (FuncState *fs) |
static Proto * | addprototype (LexState *ls) |
static void | codeclosure (LexState *ls, expdesc *v) |
static void | open_func (LexState *ls, FuncState *fs, BlockCnt *bl) |
static void | close_func (LexState *ls) |
static int | block_follow (LexState *ls, int withuntil) |
static void | statlist (LexState *ls) |
static void | fieldsel (LexState *ls, expdesc *v) |
static void | yindex (LexState *ls, expdesc *v) |
static void | recfield (LexState *ls, ConsControl *cc) |
static void | closelistfield (FuncState *fs, ConsControl *cc) |
static void | lastlistfield (FuncState *fs, ConsControl *cc) |
static void | listfield (LexState *ls, ConsControl *cc) |
static void | field (LexState *ls, ConsControl *cc) |
static void | constructor (LexState *ls, expdesc *t) |
static void | setvararg (FuncState *fs, int nparams) |
static void | parlist (LexState *ls) |
static void | body (LexState *ls, expdesc *e, int ismethod, int line) |
static int | explist (LexState *ls, expdesc *v) |
static void | funcargs (LexState *ls, expdesc *f, int line) |
static void | primaryexp (LexState *ls, expdesc *v) |
static void | suffixedexp (LexState *ls, expdesc *v) |
static void | simpleexp (LexState *ls, expdesc *v) |
static UnOpr | getunopr (int op) |
static BinOpr | getbinopr (int op) |
static BinOpr | subexpr (LexState *ls, expdesc *v, int limit) |
static void | block (LexState *ls) |
static void | check_conflict (LexState *ls, struct LHS_assign *lh, expdesc *v) |
static void | restassign (LexState *ls, struct LHS_assign *lh, int nvars) |
static int | cond (LexState *ls) |
static void | gotostat (LexState *ls) |
static void | breakstat (LexState *ls) |
static void | checkrepeated (LexState *ls, TString *name) |
static void | labelstat (LexState *ls, TString *name, int line) |
static void | whilestat (LexState *ls, int line) |
static void | repeatstat (LexState *ls, int line) |
static void | exp1 (LexState *ls) |
static void | fixforjump (FuncState *fs, int pc, int dest, int back) |
static void | forbody (LexState *ls, int base, int line, int nvars, int isgen) |
static void | fornum (LexState *ls, TString *varname, int line) |
static void | forlist (LexState *ls, TString *indexname) |
static void | forstat (LexState *ls, int line) |
static void | test_then_block (LexState *ls, int *escapelist) |
static void | ifstat (LexState *ls, int line) |
static void | localfunc (LexState *ls) |
static int | getlocalattribute (LexState *ls) |
static void | checktoclose (LexState *ls, int level) |
static void | localstat (LexState *ls) |
static int | funcname (LexState *ls, expdesc *v) |
static void | funcstat (LexState *ls, int line) |
static void | exprstat (LexState *ls) |
static void | retstat (LexState *ls) |
static void | mainfunc (LexState *ls, FuncState *fs) |
LClosure * | luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, Dyndata *dyd, const char *name, int firstchar) |
Variables | ||
struct { | ||
lu_byte left | ||
lu_byte right | ||
} | priority [] | |
#define check_condition | ( | ls, | |
c, | |||
msg ) { if (!(c)) luaX_syntaxerror(ls, msg); } |
Definition at line 122 of file lua-5.4.3/src/lparser.c.
Referenced by exprstat(), restassign(), and simpleexp().
#define enterlevel | ( | ls | ) | luaE_incCstack(ls->L) |
Definition at line 492 of file lua-5.4.3/src/lparser.c.
Referenced by chunk(), restassign(), statement(), statement(), statement(), subexpr(), subexpr(), subexpr(), and subexpr().
Definition at line 43 of file lua-5.4.3/src/lparser.c.
Referenced by findlabel(), newupvalue(), searchupvalue(), searchvar(), solvegoto(), solvegotos(), and undefgoto().
Definition at line 38 of file lua-5.4.3/src/lparser.c.
Referenced by adjust_assign(), funcargs(), lastlistfield(), and retstat().
#define leavelevel | ( | ls | ) | ((ls)->L->nCcalls--) |
Definition at line 495 of file lua-5.4.3/src/lparser.c.
Referenced by restassign(), statement(), and subexpr().
#define lparser_c |
Definition at line 7 of file lua-5.4.3/src/lparser.c.
#define LUA_CORE |
Definition at line 8 of file lua-5.4.3/src/lparser.c.
#define MAXVARS 200 |
Definition at line 35 of file lua-5.4.3/src/lparser.c.
Referenced by new_localvar().
#define new_localvarliteral | ( | ls, | |
v ) |
Definition at line 208 of file lua-5.4.3/src/lparser.c.
#define UNARY_PRIORITY 12 /* priority for unary operators */ |
Definition at line 1241 of file lua-5.4.3/src/lparser.c.
Referenced by subexpr().
typedef struct BlockCnt BlockCnt |
typedef struct ConsControl ConsControl |
Definition at line 686 of file lua-5.4.3/src/lparser.c.
References FuncState::f, LexState::fs, LexState::L, luaC_objbarrier, luaF_newproto(), luaM_growvector, MAXARG_Bx, FuncState::np, NULL, Proto::p, and Proto::sizep.
Referenced by body().
Definition at line 470 of file lua-5.4.3/src/lparser.c.
References FuncState::freereg, LexState::fs, hasmultret, expdesc::k, luaK_exp2nextreg(), luaK_nil(), luaK_reserveregs(), luaK_setreturns(), and VVOID.
Referenced by forlist(), localstat(), and restassign().
|
static |
Definition at line 311 of file lua-5.4.3/src/lparser.c.
References LexState::fs, getlocalvardesc(), luaY_nvarstack(), FuncState::nactvar, Vardesc::name, Vardesc::pidx, registerlocalvar(), reglevel(), Vardesc::ridx, and Vardesc::vd.
Referenced by body(), forbody(), forlist(), fornum(), localfunc(), localstat(), and parlist().
Definition at line 352 of file lua-5.4.3/src/lparser.c.
References checklimit(), FuncState::f, LexState::L, FuncState::ls, luaM_growvector, MAXUPVAL, NULL, FuncState::nups, Proto::sizeupvalues, and Proto::upvalues.
Referenced by mainfunc(), and newupvalue().
|
static |
Definition at line 1293 of file lua-5.4.3/src/lparser.c.
References enterblock(), LexState::fs, leaveblock(), and statlist().
Referenced by forbody(), ifstat(), statement(), and whilestat().
|
static |
Definition at line 776 of file lua-5.4.3/src/lparser.c.
References LexState::t, TK_ELSE, TK_ELSEIF, TK_END, TK_EOS, TK_UNTIL, and Token::token.
Referenced by labelstat(), retstat(), statlist(), and test_then_block().
Definition at line 978 of file lua-5.4.3/src/lparser.c.
References addprototype(), adjustlocalvars(), check_match(), checknext(), close_func(), codeclosure(), FuncState::f, Proto::lastlinedefined, Proto::linedefined, LexState::linenumber, new_localvarliteral, open_func(), parlist(), statlist(), TK_END, and TK_FUNCTION.
Referenced by funcstat(), localfunc(), and simpleexp().
|
static |
Definition at line 1426 of file lua-5.4.3/src/lparser.c.
References LexState::fs, LexState::L, LexState::linenumber, luaK_jump(), luaS_newliteral, luaX_next(), and newgotoentry().
Referenced by statement().
|
static |
Definition at line 107 of file lua-5.4.3/src/lparser.c.
References error_expected(), LexState::t, and Token::token.
|
static |
Definition at line 1319 of file lua-5.4.3/src/lparser.c.
References FuncState::freereg, LexState::fs, expdesc::idx, expdesc::ind, expdesc::info, expdesc::k, luaK_codeABC, luaK_reserveregs(), OP_GETUPVAL, OP_MOVE, LHS_assign::prev, expdesc::ridx, expdesc::t, expdesc::u, LHS_assign::v, expdesc::var, VINDEXED, VINDEXSTR, VINDEXUP, vkisindexed, VLOCAL, and VUPVAL.
Referenced by restassign().
|
static |
Definition at line 130 of file lua-5.4.3/src/lparser.c.
References error_expected(), LexState::L, LexState::linenumber, luaO_pushfstring(), luaX_syntaxerror(), luaX_token2str(), and testnext().
Referenced by body(), constructor(), forstat(), funcargs(), ifstat(), primaryexp(), repeatstat(), statement(), and whilestat().
Definition at line 277 of file lua-5.4.3/src/lparser.c.
References Dyndata::actvar, Dyndata::arr, LexState::dyd, FuncState::f, LexState::fs, getlocalvardesc(), getstr, expdesc::info, expdesc::k, Upvaldesc::kind, Vardesc::kind, LexState::L, luaK_semerror(), luaO_pushfstring(), Upvaldesc::name, Vardesc::name, NULL, expdesc::u, Proto::upvalues, expdesc::var, VCONST, Vardesc::vd, VDKREG, expdesc::vidx, VLOCAL, and VUPVAL.
Referenced by restassign().
|
static |
Definition at line 87 of file lua-5.4.3/src/lparser.c.
References errorlimit().
Referenced by allocupvalue(), new_localvar(), and recfield().
|
static |
Definition at line 116 of file lua-5.4.3/src/lparser.c.
References check, and luaX_next().
Referenced by body(), constructor(), forbody(), forlist(), fornum(), getlocalattribute(), labelstat(), recfield(), restassign(), test_then_block(), whilestat(), and yindex().
Definition at line 1436 of file lua-5.4.3/src/lparser.c.
References findlabel(), getstr, LexState::L, Labeldesc::line, luaK_semerror(), luaO_pushfstring(), name, and NULL.
Referenced by labelstat().
|
static |
Definition at line 1706 of file lua-5.4.3/src/lparser.c.
References FuncState::bl, LexState::fs, BlockCnt::insidetbc, luaK_codeABC, markupval(), OP_TBC, and reglevel().
Referenced by localstat().
|
static |
Definition at line 744 of file lua-5.4.3/src/lparser.c.
References Proto::abslineinfo, FuncState::bl, Proto::code, FuncState::f, LexState::fs, Proto::k, LexState::L, leaveblock(), Proto::lineinfo, Proto::locvars, lua_assert, luaC_checkGC, luaK_finish(), luaK_ret(), luaM_shrinkvector, luaY_nvarstack(), FuncState::nabslineinfo, FuncState::ndebugvars, FuncState::nk, FuncState::np, NULL, FuncState::nups, Proto::p, FuncState::pc, FuncState::prev, Proto::sizeabslineinfo, Proto::sizecode, Proto::sizek, Proto::sizelineinfo, Proto::sizelocvars, Proto::sizep, Proto::sizeupvalues, and Proto::upvalues.
Referenced by body(), and mainfunc().
|
static |
Definition at line 856 of file lua-5.4.3/src/lparser.c.
References expdesc::info, expdesc::k, LFIELDS_PER_FLUSH, luaK_exp2nextreg(), luaK_setlist(), ConsControl::na, ConsControl::t, ConsControl::tostore, expdesc::u, ConsControl::v, and VVOID.
Referenced by constructor().
Definition at line 710 of file lua-5.4.3/src/lparser.c.
References LexState::fs, init_exp(), luaK_codeABx(), luaK_exp2nextreg(), FuncState::np, OP_CLOSURE, FuncState::prev, and VRELOC.
Referenced by body().
Definition at line 166 of file lua-5.4.3/src/lparser.c.
References codestring(), and str_checkname().
Referenced by fieldsel(), recfield(), and suffixedexp().
Definition at line 159 of file lua-5.4.3/src/lparser.c.
References expdesc::f, expdesc::k, NO_JUMP, s, expdesc::strval, expdesc::t, expdesc::u, and VKSTR.
Referenced by codename(), funcargs(), simpleexp(), and singlevar().
|
static |
Definition at line 1394 of file lua-5.4.3/src/lparser.c.
References expr(), expdesc::f, LexState::fs, expdesc::k, luaK_goiftrue(), LHS_assign::v, VFALSE, and VNIL.
Referenced by repeatstat(), and whilestat().
Definition at line 913 of file lua-5.4.3/src/lparser.c.
References check_match(), checknext(), closelistfield(), field(), FuncState::freereg, LexState::fs, expdesc::info, init_exp(), expdesc::k, lastlistfield(), LexState::linenumber, lua_assert, luaK_code(), luaK_codeABC, luaK_reserveregs(), luaK_settablesize(), ConsControl::na, ConsControl::nh, OP_NEWTABLE, LexState::t, ConsControl::t, testnext(), Token::token, ConsControl::tostore, expdesc::u, ConsControl::v, VNONRELOC, and VVOID.
Referenced by funcargs(), and simpleexp().
Definition at line 596 of file lua-5.4.3/src/lparser.c.
References Labellist::arr, FuncState::bl, LexState::dyd, LexState::fs, Dyndata::label, luaK_codeABC, luaK_getlabel(), luaY_nvarstack(), BlockCnt::nactvar, Labeldesc::nactvar, name, newlabelentry(), OP_CLOSE, and solvegotos().
Referenced by labelstat(), and leaveblock().
Definition at line 630 of file lua-5.4.3/src/lparser.c.
References FuncState::bl, LexState::dyd, BlockCnt::firstgoto, BlockCnt::firstlabel, FuncState::freereg, Dyndata::gt, BlockCnt::insidetbc, BlockCnt::isloop, Dyndata::label, FuncState::ls, lua_assert, luaY_nvarstack(), Labellist::n, BlockCnt::nactvar, FuncState::nactvar, NULL, BlockCnt::previous, and BlockCnt::upval.
Referenced by block(), forbody(), forstat(), open_func(), repeatstat(), test_then_block(), and whilestat().
Definition at line 68 of file lua-5.4.3/src/lparser.c.
References LexState::L, luaO_pushfstring(), luaX_syntaxerror(), and luaX_token2str().
Referenced by check(), and check_match().
Definition at line 74 of file lua-5.4.3/src/lparser.c.
References FuncState::f, LexState::L, Proto::linedefined, FuncState::ls, luaO_pushfstring(), and luaX_syntaxerror().
Referenced by checklimit().
|
static |
Definition at line 1505 of file lua-5.4.3/src/lparser.c.
References expr(), LexState::fs, expdesc::k, lua_assert, luaK_exp2nextreg(), and VNONRELOC.
Referenced by fornum().
Definition at line 1000 of file lua-5.4.3/src/lparser.c.
References expr(), LexState::fs, luaK_exp2nextreg(), and testnext().
Referenced by forlist(), funcargs(), localstat(), restassign(), and retstat().
Definition at line 1278 of file lua-5.4.3/src/lparser.c.
References subexpr().
Referenced by cond(), exp1(), explist(), listfield(), primaryexp(), recfield(), test_then_block(), and yindex().
|
static |
Definition at line 1784 of file lua-5.4.3/src/lparser.c.
References check_condition, LexState::fs, getinstruction, expdesc::k, NULL, restassign(), SETARG_C, suffixedexp(), LexState::t, Token::token, LHS_assign::v, and VCALL.
Referenced by statement().
|
static |
Definition at line 891 of file lua-5.4.3/src/lparser.c.
References listfield(), luaX_lookahead(), recfield(), LexState::t, TK_NAME, and Token::token.
Referenced by constructor().
Definition at line 799 of file lua-5.4.3/src/lparser.c.
References codename(), LexState::fs, luaK_exp2anyregup(), luaK_indexed(), and luaX_next().
Referenced by funcname(), and suffixedexp().
Definition at line 532 of file lua-5.4.3/src/lparser.c.
References Labellist::arr, LexState::dyd, eqstr, FuncState::firstlabel, LexState::fs, Dyndata::label, Labellist::n, name, Labeldesc::name, and NULL.
Referenced by checkrepeated(), and gotostat().
|
static |
Definition at line 1518 of file lua-5.4.3/src/lparser.c.
References Proto::code, FuncState::f, FuncState::ls, luaX_syntaxerror(), MAXARG_Bx, and SETARG_Bx.
Referenced by forbody().
|
static |
Definition at line 1532 of file lua-5.4.3/src/lparser.c.
References adjustlocalvars(), block(), checknext(), enterblock(), fixforjump(), forprep(), LexState::fs, leaveblock(), luaK_codeABC, luaK_codeABx(), luaK_fixline(), luaK_getlabel(), luaK_reserveregs(), OP_FORLOOP, OP_FORPREP, OP_TFORCALL, OP_TFORLOOP, OP_TFORPREP, and TK_DO.
Definition at line 1580 of file lua-5.4.3/src/lparser.c.
References adjust_assign(), adjustlocalvars(), checknext(), explist(), forbody(), FuncState::freereg, LexState::fs, LexState::linenumber, luaK_checkstack(), markupval(), FuncState::nactvar, new_localvar(), new_localvarliteral, str_checkname(), testnext(), and TK_IN.
Referenced by forstat().
Definition at line 1557 of file lua-5.4.3/src/lparser.c.
References adjustlocalvars(), checknext(), exp1(), forbody(), FuncState::freereg, LexState::fs, luaK_int(), luaK_reserveregs(), new_localvar(), new_localvarliteral, and testnext().
Referenced by forstat().
|
static |
Definition at line 1608 of file lua-5.4.3/src/lparser.c.
References check_match(), enterblock(), forlist(), fornum(), LexState::fs, leaveblock(), luaX_next(), luaX_syntaxerror(), str_checkname(), LexState::t, TK_END, TK_FOR, TK_IN, and Token::token.
Referenced by statement().
Definition at line 1013 of file lua-5.4.3/src/lparser.c.
References check_match(), codestring(), constructor(), explist(), FuncState::freereg, LexState::fs, hasmultret, expdesc::info, init_exp(), expdesc::k, lua_assert, LUA_MULTRET, luaK_codeABC, luaK_exp2nextreg(), luaK_fixline(), luaK_setmultret, luaX_next(), luaX_syntaxerror(), OP_CALL, Token::seminfo, LexState::t, TK_STRING, Token::token, SemInfo::ts, expdesc::u, VCALL, VNONRELOC, and VVOID.
Referenced by suffixedexp().
Definition at line 1758 of file lua-5.4.3/src/lparser.c.
References fieldsel(), singlevar(), LexState::t, Token::token, and LHS_assign::v.
Referenced by funcstat().
|
static |
Definition at line 1772 of file lua-5.4.3/src/lparser.c.
References body(), LexState::fs, funcname(), luaK_fixline(), luaK_storevar(), luaX_next(), and LHS_assign::v.
Referenced by statement().
|
static |
Definition at line 1194 of file lua-5.4.3/src/lparser.c.
References OPR_ADD, OPR_AND, OPR_BAND, OPR_BOR, OPR_BXOR, OPR_CONCAT, OPR_DIV, OPR_EQ, OPR_GE, OPR_GT, OPR_IDIV, OPR_LE, OPR_LT, OPR_MOD, OPR_MUL, OPR_NE, OPR_NOBINOPR, OPR_OR, OPR_POW, OPR_SHL, OPR_SHR, OPR_SUB, TK_AND, TK_CONCAT, TK_EQ, TK_GE, TK_IDIV, TK_LE, TK_NE, TK_OR, TK_SHL, and TK_SHR.
Referenced by subexpr().
|
static |
Definition at line 1689 of file lua-5.4.3/src/lparser.c.
References checknext(), getstr, LexState::L, luaK_semerror(), luaO_pushfstring(), RDKCONST, RDKTOCLOSE, str_checkname(), testnext(), and VDKREG.
Referenced by localstat().
Definition at line 219 of file lua-5.4.3/src/lparser.c.
References Dyndata::actvar, Dyndata::arr, LexState::dyd, FuncState::firstlocal, and FuncState::ls.
Referenced by adjustlocalvars(), check_readonly(), init_var(), jumpscopeerror(), localdebuginfo(), localstat(), newupvalue(), reglevel(), and searchvar().
|
static |
Definition at line 1183 of file lua-5.4.3/src/lparser.c.
References OPR_BNOT, OPR_LEN, OPR_MINUS, OPR_NOT, OPR_NOUNOPR, and TK_NOT.
Referenced by subexpr().
|
static |
Definition at line 1404 of file lua-5.4.3/src/lparser.c.
References findlabel(), LexState::fs, LexState::linenumber, luaK_codeABC, luaK_jump(), luaK_patchlist(), luaY_nvarstack(), Labeldesc::nactvar, name, newgotoentry(), NULL, OP_CLOSE, Labeldesc::pc, reglevel(), and str_checkname().
Referenced by statement().
|
static |
Definition at line 1663 of file lua-5.4.3/src/lparser.c.
References block(), check_match(), LexState::fs, luaK_patchtohere(), NO_JUMP, LexState::t, test_then_block(), testnext(), TK_ELSE, TK_ELSEIF, TK_END, TK_IF, and Token::token.
Referenced by statement().
Definition at line 152 of file lua-5.4.3/src/lparser.c.
References expdesc::f, expdesc::info, expdesc::k, NO_JUMP, expdesc::t, and expdesc::u.
Referenced by codeclosure(), constructor(), funcargs(), restassign(), searchvar(), simpleexp(), and singlevaraux().
Definition at line 266 of file lua-5.4.3/src/lparser.c.
References expdesc::f, getlocalvardesc(), expdesc::k, NO_JUMP, expdesc::ridx, Vardesc::ridx, expdesc::t, expdesc::u, expdesc::var, Vardesc::vd, expdesc::vidx, and VLOCAL.
Referenced by searchvar().
Definition at line 502 of file lua-5.4.3/src/lparser.c.
References LexState::fs, getlocalvardesc(), getstr, gt, LexState::L, luaK_semerror(), luaO_pushfstring(), FuncState::nactvar, Vardesc::name, and Vardesc::vd.
Referenced by solvegoto().
Definition at line 1446 of file lua-5.4.3/src/lparser.c.
References block_follow(), checknext(), checkrepeated(), createlabel(), name, statement(), LexState::t, TK_DBCOLON, and Token::token.
Referenced by statement().
|
static |
Definition at line 868 of file lua-5.4.3/src/lparser.c.
References hasmultret, expdesc::info, expdesc::k, LUA_MULTRET, luaK_exp2nextreg(), luaK_setlist(), luaK_setmultret, ConsControl::na, ConsControl::t, ConsControl::tostore, expdesc::u, ConsControl::v, and VVOID.
Referenced by constructor().
|
static |
Definition at line 660 of file lua-5.4.3/src/lparser.c.
References Labellist::arr, FuncState::bl, createlabel(), LexState::dyd, BlockCnt::firstgoto, BlockCnt::firstlabel, FuncState::freereg, Dyndata::gt, BlockCnt::isloop, LexState::L, Dyndata::label, FuncState::ls, lua_assert, luaK_codeABC, luaS_newliteral, movegotosout(), Labellist::n, BlockCnt::nactvar, FuncState::nactvar, OP_CLOSE, BlockCnt::previous, reglevel(), removevars(), undefgoto(), and BlockCnt::upval.
Referenced by block(), close_func(), forbody(), forstat(), repeatstat(), test_then_block(), and whilestat().
|
static |
Definition at line 884 of file lua-5.4.3/src/lparser.c.
References expr(), ConsControl::tostore, and ConsControl::v.
Referenced by field().
Definition at line 251 of file lua-5.4.3/src/lparser.c.
References FuncState::f, getlocalvardesc(), Vardesc::kind, Proto::locvars, lua_assert, NULL, Vardesc::pidx, RDKCTC, and Vardesc::vd.
Referenced by localfunc(), and removevars().
|
static |
Definition at line 1677 of file lua-5.4.3/src/lparser.c.
References adjustlocalvars(), body(), LexState::fs, LexState::linenumber, localdebuginfo(), FuncState::nactvar, new_localvar(), FuncState::pc, LocVar::startpc, and str_checkname().
Referenced by statement().
|
static |
Definition at line 1716 of file lua-5.4.3/src/lparser.c.
References adjust_assign(), adjustlocalvars(), checktoclose(), explist(), LexState::fs, getlocalattribute(), getlocalvardesc(), expdesc::k, Vardesc::k, Vardesc::kind, luaK_exp2const(), luaK_semerror(), FuncState::nactvar, new_localvar(), RDKCONST, RDKCTC, RDKTOCLOSE, str_checkname(), testnext(), Vardesc::vd, and VVOID.
Referenced by statement().
int luaY_nvarstack | ( | FuncState * | fs | ) |
Definition at line 243 of file lua-5.4.3/src/lparser.c.
References FuncState::nactvar, and reglevel().
Referenced by adjustlocalvars(), close_func(), createlabel(), enterblock(), freereg(), gotostat(), luaK_exp2anyreg(), retstat(), and statement().
LClosure * luaY_parser | ( | lua_State * | L, |
ZIO * | z, | ||
Mbuffer * | buff, | ||
Dyndata * | dyd, | ||
const char * | name, | ||
int | firstchar ) |
Definition at line 1931 of file lua-5.4.3/src/lparser.c.
References Dyndata::actvar, LexState::buff, LexState::dyd, FuncState::f, LexState::fs, Dyndata::gt, LexState::h, Dyndata::label, lua_assert, luaC_objbarrier, luaD_inctop(), luaF_newLclosure(), luaF_newproto(), luaH_new(), luaS_new, luaX_setinput(), mainfunc(), Labellist::n, Dyndata::n, name, FuncState::nups, LClosure::p, FuncState::prev, setclLvalue2s, sethvalue2s, Proto::source, and lua_State::top.
Definition at line 1913 of file lua-5.4.3/src/lparser.c.
References allocupvalue(), check, close_func(), LexState::envn, FuncState::f, Upvaldesc::idx, Upvaldesc::instack, Upvaldesc::kind, LexState::L, luaC_objbarrier, luaX_next(), Upvaldesc::name, open_func(), setvararg(), statlist(), TK_EOS, and VDKREG.
Referenced by luaY_parser().
|
static |
Definition at line 410 of file lua-5.4.3/src/lparser.c.
References FuncState::bl, BlockCnt::nactvar, FuncState::needclose, BlockCnt::previous, and BlockCnt::upval.
Referenced by checktoclose(), forlist(), and singlevaraux().
Definition at line 616 of file lua-5.4.3/src/lparser.c.
References Labellist::arr, Labeldesc::close, LexState::dyd, BlockCnt::firstgoto, gt, Dyndata::gt, FuncState::ls, Labellist::n, BlockCnt::nactvar, FuncState::nactvar, reglevel(), and BlockCnt::upval.
Referenced by leaveblock().
Definition at line 193 of file lua-5.4.3/src/lparser.c.
References Dyndata::actvar, Dyndata::arr, checklimit(), LexState::dyd, FuncState::firstlocal, LexState::fs, Vardesc::kind, LexState::L, luaM_growvector, MAXVARS, Dyndata::n, name, Vardesc::name, Dyndata::size, Vardesc::vd, and VDKREG.
Referenced by forlist(), fornum(), localfunc(), localstat(), and parlist().
Definition at line 563 of file lua-5.4.3/src/lparser.c.
References LexState::dyd, Dyndata::gt, name, and newlabelentry().
Referenced by breakstat(), gotostat(), and test_then_block().
Definition at line 548 of file lua-5.4.3/src/lparser.c.
References Labellist::arr, Labeldesc::close, LexState::fs, LexState::L, Labeldesc::line, luaM_growvector, Labellist::n, FuncState::nactvar, Labeldesc::nactvar, name, Labeldesc::name, Labeldesc::pc, and Labellist::size.
Referenced by createlabel(), and newgotoentry().
Definition at line 364 of file lua-5.4.3/src/lparser.c.
References allocupvalue(), cast_byte, eqstr, FuncState::f, getlocalvardesc(), Upvaldesc::idx, expdesc::info, Upvaldesc::instack, expdesc::k, Upvaldesc::kind, Vardesc::kind, LexState::L, FuncState::ls, lua_assert, luaC_objbarrier, name, Upvaldesc::name, Vardesc::name, FuncState::nups, FuncState::prev, expdesc::ridx, expdesc::u, Proto::upvalues, expdesc::var, Vardesc::vd, expdesc::vidx, and VLOCAL.
Referenced by singlevaraux().
Definition at line 717 of file lua-5.4.3/src/lparser.c.
References Dyndata::actvar, FuncState::bl, LexState::dyd, enterblock(), FuncState::f, FuncState::firstlabel, FuncState::firstlocal, FuncState::freereg, LexState::fs, FuncState::iwthabs, LexState::L, Dyndata::label, FuncState::lasttarget, Proto::linedefined, FuncState::ls, luaC_objbarrier, Proto::maxstacksize, Labellist::n, Dyndata::n, FuncState::nabslineinfo, FuncState::nactvar, FuncState::ndebugvars, FuncState::needclose, FuncState::nk, FuncState::np, NULL, FuncState::nups, FuncState::pc, FuncState::prev, FuncState::previousline, LexState::source, and Proto::source.
Referenced by body(), and mainfunc().
|
static |
Definition at line 947 of file lua-5.4.3/src/lparser.c.
References adjustlocalvars(), cast_byte, FuncState::f, LexState::fs, luaK_reserveregs(), luaX_next(), luaX_syntaxerror(), FuncState::nactvar, new_localvar(), Proto::numparams, setvararg(), str_checkname(), LexState::t, testnext(), TK_DOTS, TK_NAME, and Token::token.
Referenced by body().
Definition at line 1068 of file lua-5.4.3/src/lparser.c.
References check_match(), expr(), LexState::fs, LexState::linenumber, luaK_dischargevars(), luaX_next(), luaX_syntaxerror(), singlevar(), LexState::t, TK_NAME, and Token::token.
Referenced by suffixedexp().
|
static |
Definition at line 835 of file lua-5.4.3/src/lparser.c.
References checklimit(), checknext(), codename(), expr(), FuncState::freereg, LexState::fs, luaK_indexed(), luaK_storevar(), MAX_INT, ConsControl::nh, LexState::t, ConsControl::t, TK_NAME, Token::token, and yindex().
Referenced by field().
Definition at line 175 of file lua-5.4.3/src/lparser.c.
References FuncState::f, LexState::L, Proto::locvars, luaC_objbarrier, luaM_growvector, FuncState::ndebugvars, NULL, FuncState::pc, Proto::sizelocvars, LocVar::startpc, and LocVar::varname.
Referenced by adjustlocalvars().
|
static |
Definition at line 229 of file lua-5.4.3/src/lparser.c.
References getlocalvardesc(), Vardesc::kind, RDKCTC, Vardesc::ridx, and Vardesc::vd.
Referenced by adjustlocalvars(), checktoclose(), gotostat(), leaveblock(), luaY_nvarstack(), movegotosout(), and repeatstat().
|
static |
Definition at line 328 of file lua-5.4.3/src/lparser.c.
References Dyndata::actvar, LexState::dyd, LocVar::endpc, localdebuginfo(), FuncState::ls, Dyndata::n, FuncState::nactvar, and FuncState::pc.
Referenced by leaveblock().
|
static |
Definition at line 1475 of file lua-5.4.3/src/lparser.c.
References check_match(), cond(), enterblock(), LexState::fs, leaveblock(), luaK_codeABC, luaK_getlabel(), luaK_jump(), luaK_patchlist(), luaK_patchtohere(), luaX_next(), BlockCnt::nactvar, OP_CLOSE, reglevel(), statlist(), TK_REPEAT, TK_UNTIL, and BlockCnt::upval.
Referenced by statement().
|
static |
Definition at line 1363 of file lua-5.4.3/src/lparser.c.
References adjust_assign(), check_condition, check_conflict(), check_readonly(), checknext(), enterlevel, explist(), FuncState::freereg, LexState::fs, init_exp(), expdesc::k, leavelevel, luaK_setoneret(), luaK_storevar(), LHS_assign::prev, restassign(), suffixedexp(), testnext(), LHS_assign::v, vkisindexed, vkisvar, and VNONRELOC.
Referenced by exprstat(), and restassign().
|
static |
Definition at line 1802 of file lua-5.4.3/src/lparser.c.
References FuncState::bl, block_follow(), explist(), FuncState::freereg, LexState::fs, GETARG_A, getinstruction, hasmultret, BlockCnt::insidetbc, expdesc::k, lua_assert, LUA_MULTRET, luaK_exp2anyreg(), luaK_exp2nextreg(), luaK_ret(), luaK_setmultret, luaY_nvarstack(), OP_TAILCALL, SET_OPCODE, LexState::t, testnext(), Token::token, and VCALL.
Referenced by statement().
Definition at line 342 of file lua-5.4.3/src/lparser.c.
References eqstr, FuncState::f, name, FuncState::nups, and Proto::upvalues.
Referenced by singlevaraux().
Definition at line 390 of file lua-5.4.3/src/lparser.c.
References cast_int, eqstr, FuncState::firstlocal, getlocalvardesc(), init_exp(), init_var(), expdesc::k, Vardesc::kind, FuncState::nactvar, Vardesc::name, RDKCTC, VCONST, and Vardesc::vd.
Referenced by singlevaraux().
|
static |
Definition at line 941 of file lua-5.4.3/src/lparser.c.
References FuncState::f, Proto::is_vararg, luaK_codeABC, and OP_VARARGPREP.
Referenced by mainfunc(), and parlist().
Definition at line 1128 of file lua-5.4.3/src/lparser.c.
References body(), check_condition, codestring(), constructor(), FuncState::f, LexState::fs, SemInfo::i, init_exp(), Proto::is_vararg, expdesc::ival, LexState::linenumber, luaK_codeABC, luaX_next(), expdesc::nval, OP_VARARG, SemInfo::r, Token::seminfo, suffixedexp(), LexState::t, TK_DOTS, TK_FALSE, TK_FLT, TK_FUNCTION, TK_INT, TK_NIL, TK_STRING, TK_TRUE, Token::token, SemInfo::ts, expdesc::u, VFALSE, VKFLT, VKINT, VNIL, VTRUE, and VVARARG.
Referenced by subexpr().
Definition at line 452 of file lua-5.4.3/src/lparser.c.
References codestring(), LexState::envn, LexState::fs, expdesc::k, lua_assert, luaK_indexed(), singlevaraux(), str_checkname(), and VVOID.
Referenced by funcname(), and primaryexp().
Definition at line 424 of file lua-5.4.3/src/lparser.c.
References init_exp(), expdesc::k, markupval(), newupvalue(), NULL, FuncState::prev, searchupvalue(), searchvar(), singlevaraux(), expdesc::u, expdesc::var, expdesc::vidx, VLOCAL, VUPVAL, and VVOID.
Referenced by singlevar(), and singlevaraux().
Definition at line 515 of file lua-5.4.3/src/lparser.c.
References Labellist::arr, LexState::dyd, eqstr, LexState::fs, gt, Dyndata::gt, jumpscopeerror(), lua_assert, luaK_patchlist(), Labellist::n, Labeldesc::nactvar, Labeldesc::name, FuncState::pc, and Labeldesc::pc.
Referenced by solvegotos().
Definition at line 573 of file lua-5.4.3/src/lparser.c.
References Labellist::arr, FuncState::bl, Labeldesc::close, LexState::dyd, eqstr, BlockCnt::firstgoto, LexState::fs, Dyndata::gt, Labeldesc::name, and solvegoto().
Referenced by createlabel().
|
static |
Definition at line 1834 of file lua-5.4.3/src/lparser.c.
References block(), breakstat(), check_match(), enterlevel, exprstat(), FuncState::f, forstat(), FuncState::freereg, LexState::fs, funcstat(), gotostat(), ifstat(), labelstat(), leavelevel, LexState::linenumber, localfunc(), localstat(), lua_assert, luaX_next(), luaY_nvarstack(), Proto::maxstacksize, repeatstat(), retstat(), str_checkname(), LexState::t, testnext(), TK_BREAK, TK_DBCOLON, TK_DO, TK_END, TK_FOR, TK_FUNCTION, TK_GOTO, TK_IF, TK_LOCAL, TK_REPEAT, TK_RETURN, TK_WHILE, Token::token, and whilestat().
Referenced by labelstat(), and statlist().
|
static |
Definition at line 787 of file lua-5.4.3/src/lparser.c.
References block_follow(), statement(), LexState::t, TK_RETURN, and Token::token.
Referenced by block(), body(), mainfunc(), repeatstat(), and test_then_block().
Definition at line 143 of file lua-5.4.3/src/lparser.c.
References check, luaX_next(), Token::seminfo, LexState::t, TK_NAME, and SemInfo::ts.
Referenced by codename(), forlist(), forstat(), getlocalattribute(), gotostat(), localfunc(), localstat(), parlist(), singlevar(), and statement().
Definition at line 1248 of file lua-5.4.3/src/lparser.c.
References enterlevel, LexState::fs, getbinopr(), getunopr(), leavelevel, left, LexState::linenumber, luaK_infix(), luaK_posfix(), luaK_prefix(), luaX_next(), OPR_NOBINOPR, OPR_NOUNOPR, priority, right, simpleexp(), subexpr(), LexState::t, Token::token, and UNARY_PRIORITY.
Definition at line 1090 of file lua-5.4.3/src/lparser.c.
References codename(), fieldsel(), LexState::fs, funcargs(), LexState::linenumber, luaK_exp2anyregup(), luaK_exp2nextreg(), luaK_indexed(), luaK_self(), luaX_next(), primaryexp(), LexState::t, TK_STRING, Token::token, and yindex().
Referenced by exprstat(), restassign(), and simpleexp().
|
static |
Definition at line 1626 of file lua-5.4.3/src/lparser.c.
References block_follow(), checknext(), enterblock(), expr(), expdesc::f, LexState::fs, LexState::L, leaveblock(), LexState::linenumber, luaK_concat(), luaK_goiffalse(), luaK_goiftrue(), luaK_jump(), luaK_patchtohere(), luaS_newliteral, luaX_next(), newgotoentry(), statlist(), LexState::t, expdesc::t, testnext(), TK_BREAK, TK_ELSE, TK_ELSEIF, TK_THEN, Token::token, and LHS_assign::v.
Referenced by ifstat().
|
static |
Definition at line 95 of file lua-5.4.3/src/lparser.c.
References luaX_next(), LexState::t, and Token::token.
Referenced by check_match(), constructor(), explist(), forlist(), fornum(), getlocalattribute(), ifstat(), localstat(), parlist(), restassign(), retstat(), statement(), and test_then_block().
Definition at line 646 of file lua-5.4.3/src/lparser.c.
References eqstr, getstr, gt, LexState::L, luaK_semerror(), luaO_pushfstring(), and luaS_newliteral.
Referenced by leaveblock().
|
static |
Definition at line 1456 of file lua-5.4.3/src/lparser.c.
References block(), check_match(), checknext(), cond(), enterblock(), LexState::fs, leaveblock(), luaK_getlabel(), luaK_jumpto, luaK_patchtohere(), luaX_next(), TK_DO, TK_END, and TK_WHILE.
Referenced by statement().
Definition at line 810 of file lua-5.4.3/src/lparser.c.
References checknext(), expr(), LexState::fs, luaK_exp2val(), and luaX_next().
Referenced by recfield(), and suffixedexp().
lu_byte left |
Definition at line 1226 of file lua-5.4.3/src/lparser.c.
Referenced by subexpr().
const struct { ... } priority[] |
Referenced by subexpr().
lu_byte right |
Definition at line 1227 of file lua-5.4.3/src/lparser.c.
Referenced by subexpr().