Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.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) new_localvarliteral_(ls, "" v, (sizeof(v)/sizeof(char))-1) |
#define | leavelevel(ls) ((ls)->L->nCcalls--) |
#define | UNARY_PRIORITY 12 /* priority for unary operators */ |
Typedefs | |
typedef struct BlockCnt | BlockCnt |
Functions | |
static void | statement (LexState *ls) |
static void | expr (LexState *ls, expdesc *v) |
static l_noret | semerror (LexState *ls, const char *msg) |
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 (LexState *ls, expdesc *e, TString *s) |
static void | checkname (LexState *ls, expdesc *e) |
static int | registerlocalvar (LexState *ls, TString *varname) |
static void | new_localvar (LexState *ls, TString *name) |
static void | new_localvarliteral_ (LexState *ls, const char *name, size_t sz) |
static LocVar * | getlocvar (FuncState *fs, int i) |
static void | adjustlocalvars (LexState *ls, int nvars) |
static void | removevars (FuncState *fs, int tolevel) |
static int | searchupvalue (FuncState *fs, TString *name) |
static int | newupvalue (FuncState *fs, TString *name, expdesc *v) |
static int | searchvar (FuncState *fs, TString *n) |
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 void | enterlevel (LexState *ls) |
static void | closegoto (LexState *ls, int g, Labeldesc *label) |
static int | findlabel (LexState *ls, int g) |
static int | newlabelentry (LexState *ls, Labellist *l, TString *name, int line, int pc) |
static void | findgotos (LexState *ls, Labeldesc *lb) |
static void | movegotosout (FuncState *fs, BlockCnt *bl) |
static void | enterblock (FuncState *fs, BlockCnt *bl, lu_byte isloop) |
static void | breaklabel (LexState *ls) |
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, struct ConsControl *cc) |
static void | closelistfield (FuncState *fs, struct ConsControl *cc) |
static void | lastlistfield (FuncState *fs, struct ConsControl *cc) |
static void | listfield (LexState *ls, struct ConsControl *cc) |
static void | field (LexState *ls, struct ConsControl *cc) |
static void | constructor (LexState *ls, expdesc *t) |
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 | assignment (LexState *ls, struct LHS_assign *lh, int nvars) |
static int | cond (LexState *ls) |
static void | gotostat (LexState *ls, int pc) |
static void | checkrepeated (FuncState *fs, Labellist *ll, TString *label) |
static void | skipnoopstat (LexState *ls) |
static void | labelstat (LexState *ls, TString *label, int line) |
static void | whilestat (LexState *ls, int line) |
static void | repeatstat (LexState *ls, int line) |
static int | exp1 (LexState *ls) |
static void | forbody (LexState *ls, int base, int line, int nvars, int isnum) |
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 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 118 of file lua-5.3.6/src/lparser.c.
Referenced by assignment(), exprstat(), and simpleexp().
Definition at line 42 of file lua-5.3.6/src/lparser.c.
Referenced by checkrepeated(), closegoto(), findgotos(), findlabel(), searchupvalue(), and searchvar().
Definition at line 37 of file lua-5.3.6/src/lparser.c.
Referenced by adjust_assign(), funcargs(), lastlistfield(), and retstat().
#define leavelevel | ( | ls | ) | ((ls)->L->nCcalls--) |
Definition at line 338 of file lua-5.3.6/src/lparser.c.
Referenced by statement(), and subexpr().
#define lparser_c |
Definition at line 7 of file lua-5.3.6/src/lparser.c.
#define LUA_CORE |
Definition at line 8 of file lua-5.3.6/src/lparser.c.
#define MAXVARS 200 |
Definition at line 34 of file lua-5.3.6/src/lparser.c.
Referenced by new_localvar().
#define new_localvarliteral | ( | ls, | |
v ) new_localvarliteral_(ls, "" v, (sizeof(v)/sizeof(char))-1) |
Definition at line 191 of file lua-5.3.6/src/lparser.c.
#define UNARY_PRIORITY 12 /* priority for unary operators */ |
Definition at line 1042 of file lua-5.3.6/src/lparser.c.
Referenced by subexpr().
typedef struct BlockCnt BlockCnt |
Definition at line 499 of file lua-5.3.6/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 309 of file lua-5.3.6/src/lparser.c.
References FuncState::freereg, LexState::fs, hasmultret, expdesc::k, luaK_exp2nextreg(), luaK_nil(), luaK_reserveregs(), luaK_setreturns(), and VVOID.
Referenced by assignment(), forlist(), and localstat().
|
static |
Definition at line 202 of file lua-5.3.6/src/lparser.c.
References cast_byte, LexState::fs, getlocvar, FuncState::nactvar, and FuncState::pc.
Referenced by body(), forbody(), localfunc(), localstat(), and parlist().
|
static |
Definition at line 1148 of file lua-5.3.6/src/lparser.c.
References adjust_assign(), assignment(), check_condition, check_conflict(), checklimit(), checknext(), explist(), FuncState::freereg, LexState::fs, init_exp(), expdesc::k, LexState::L, LUAI_MAXCCALLS, luaK_setoneret(), luaK_storevar(), lua_State::nCcalls, LHS_assign::prev, suffixedexp(), testnext(), LHS_assign::v, VINDEXED, vkisvar, and VNONRELOC.
Referenced by assignment(), and exprstat().
|
static |
Definition at line 1094 of file lua-5.3.6/src/lparser.c.
References enterblock(), LexState::fs, leaveblock(), and statlist().
Referenced by forbody(), ifstat(), statement(), and whilestat().
|
static |
Definition at line 588 of file lua-5.3.6/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 783 of file lua-5.3.6/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 454 of file lua-5.3.6/src/lparser.c.
References Labellist::arr, LexState::dyd, findgotos(), LexState::fs, LexState::L, Dyndata::label, luaS_new, newlabelentry(), and FuncState::pc.
Referenced by leaveblock().
|
static |
Definition at line 106 of file lua-5.3.6/src/lparser.c.
References error_expected(), LexState::t, and Token::token.
|
static |
Definition at line 1120 of file lua-5.3.6/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::t, expdesc::u, LHS_assign::v, VINDEXED, VLOCAL, and expdesc::vt.
Referenced by assignment().
|
static |
Definition at line 122 of file lua-5.3.6/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().
|
static |
Definition at line 92 of file lua-5.3.6/src/lparser.c.
References errorlimit().
Referenced by assignment(), enterlevel(), listfield(), new_localvar(), newupvalue(), and recfield().
Definition at line 156 of file lua-5.3.6/src/lparser.c.
References codestring(), and str_checkname().
Referenced by fieldsel(), recfield(), and suffixedexp().
|
static |
Definition at line 112 of file lua-5.3.6/src/lparser.c.
References check, and luaX_next().
Referenced by assignment(), body(), constructor(), forbody(), forlist(), fornum(), labelstat(), recfield(), test_then_block(), whilestat(), and yindex().
Definition at line 1204 of file lua-5.3.6/src/lparser.c.
References Labellist::arr, FuncState::bl, eqstr, BlockCnt::firstlabel, getstr, LexState::L, Labeldesc::line, FuncState::ls, luaO_pushfstring(), Labellist::n, Labeldesc::name, and semerror().
Referenced by labelstat().
|
static |
Definition at line 553 of file lua-5.3.6/src/lparser.c.
References FuncState::bl, Proto::code, FuncState::f, LexState::fs, Proto::k, LexState::L, leaveblock(), Proto::lineinfo, Proto::locvars, lua_assert, luaC_checkGC, luaK_ret(), luaM_reallocvector, FuncState::nk, FuncState::nlocvars, FuncState::np, NULL, FuncState::nups, Proto::p, FuncState::pc, FuncState::prev, Proto::sizecode, Proto::sizek, Proto::sizelineinfo, Proto::sizelocvars, Proto::sizep, Proto::sizeupvalues, and Proto::upvalues.
Referenced by body(), and mainfunc().
Definition at line 341 of file lua-5.3.6/src/lparser.c.
References Labellist::arr, LexState::dyd, eqstr, LexState::fs, getlocvar, getstr, gt, Dyndata::gt, LexState::L, lua_assert, luaK_patchlist(), luaO_pushfstring(), Labellist::n, FuncState::nactvar, Labeldesc::nactvar, Labeldesc::name, FuncState::pc, Labeldesc::pc, and semerror().
Referenced by findgotos(), and findlabel().
|
static |
Definition at line 668 of file lua-5.3.6/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 522 of file lua-5.3.6/src/lparser.c.
References LexState::fs, init_exp(), luaK_codeABx(), luaK_exp2nextreg(), FuncState::np, OP_CLOSURE, FuncState::prev, and VRELOCABLE.
Referenced by body().
Definition at line 151 of file lua-5.3.6/src/lparser.c.
References LexState::fs, init_exp(), luaK_stringK(), s, and VK.
Referenced by checkname(), funcargs(), simpleexp(), and singlevar().
|
static |
Definition at line 1178 of file lua-5.3.6/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 725 of file lua-5.3.6/src/lparser.c.
References check_match(), checknext(), closelistfield(), Proto::code, FuncState::f, field(), LexState::fs, init_exp(), expdesc::k, lastlistfield(), LexState::linenumber, lua_assert, luaK_codeABC, luaK_exp2nextreg(), luaO_int2fb(), ConsControl::na, ConsControl::nh, OP_NEWTABLE, SETARG_B, SETARG_C, LexState::t, ConsControl::t, testnext(), Token::token, ConsControl::tostore, ConsControl::v, VRELOCABLE, and VVOID.
Referenced by funcargs(), and simpleexp().
Definition at line 439 of file lua-5.3.6/src/lparser.c.
References FuncState::bl, LexState::dyd, BlockCnt::firstgoto, BlockCnt::firstlabel, FuncState::freereg, Dyndata::gt, BlockCnt::isloop, Dyndata::label, FuncState::ls, lua_assert, Labellist::n, BlockCnt::nactvar, FuncState::nactvar, BlockCnt::previous, and BlockCnt::upval.
Referenced by block(), forbody(), forstat(), open_func(), repeatstat(), test_then_block(), and whilestat().
|
static |
Definition at line 331 of file lua-5.3.6/src/lparser.c.
References checklimit(), LexState::fs, LexState::L, LUAI_MAXCCALLS, and lua_State::nCcalls.
Definition at line 73 of file lua-5.3.6/src/lparser.c.
References LexState::L, luaO_pushfstring(), luaX_syntaxerror(), and luaX_token2str().
Referenced by check(), and check_match().
Definition at line 79 of file lua-5.3.6/src/lparser.c.
References FuncState::f, LexState::L, Proto::linedefined, FuncState::ls, luaO_pushfstring(), and luaX_syntaxerror().
Referenced by checklimit().
|
static |
Definition at line 1281 of file lua-5.3.6/src/lparser.c.
References expr(), LexState::fs, expdesc::info, expdesc::k, lua_assert, luaK_exp2nextreg(), expdesc::u, and VNONRELOC.
Referenced by fornum().
Definition at line 805 of file lua-5.3.6/src/lparser.c.
References expr(), LexState::fs, luaK_exp2nextreg(), testnext(), and ConsControl::v.
Referenced by assignment(), forlist(), funcargs(), localstat(), and retstat().
Definition at line 1079 of file lua-5.3.6/src/lparser.c.
References subexpr().
Referenced by cond(), exp1(), explist(), listfield(), primaryexp(), recfield(), test_then_block(), and yindex().
|
static |
Definition at line 1489 of file lua-5.3.6/src/lparser.c.
References assignment(), check_condition, LexState::fs, getinstruction, expdesc::k, NULL, SETARG_C, suffixedexp(), LexState::t, Token::token, LHS_assign::v, and VCALL.
Referenced by statement().
|
static |
Definition at line 703 of file lua-5.3.6/src/lparser.c.
References listfield(), luaX_lookahead(), recfield(), LexState::t, TK_NAME, and Token::token.
Referenced by constructor().
Definition at line 611 of file lua-5.3.6/src/lparser.c.
References checkname(), LexState::fs, luaK_exp2anyregup(), luaK_indexed(), and luaX_next().
Referenced by funcname(), and suffixedexp().
Definition at line 403 of file lua-5.3.6/src/lparser.c.
References Labellist::arr, FuncState::bl, closegoto(), LexState::dyd, eqstr, BlockCnt::firstgoto, LexState::fs, Dyndata::gt, and Labeldesc::name.
Referenced by breaklabel(), and labelstat().
|
static |
Definition at line 365 of file lua-5.3.6/src/lparser.c.
References Labellist::arr, FuncState::bl, closegoto(), LexState::dyd, eqstr, BlockCnt::firstlabel, LexState::fs, gt, Dyndata::gt, Dyndata::label, luaK_patchclose(), Labellist::n, Labeldesc::nactvar, Labeldesc::name, FuncState::pc, and BlockCnt::upval.
Referenced by gotostat(), and movegotosout().
|
static |
Definition at line 1292 of file lua-5.3.6/src/lparser.c.
References adjustlocalvars(), block(), checknext(), enterblock(), LexState::fs, leaveblock(), luaK_codeABC, luaK_codeAsBx, luaK_fixline(), luaK_jump(), luaK_patchlist(), luaK_patchtohere(), luaK_reserveregs(), NO_JUMP, OP_FORLOOP, OP_FORPREP, OP_TFORCALL, OP_TFORLOOP, and TK_DO.
Definition at line 1340 of file lua-5.3.6/src/lparser.c.
References adjust_assign(), checknext(), explist(), forbody(), FuncState::freereg, LexState::fs, LexState::linenumber, luaK_checkstack(), new_localvar(), new_localvarliteral, str_checkname(), testnext(), and TK_IN.
Referenced by forstat().
Definition at line 1318 of file lua-5.3.6/src/lparser.c.
References checknext(), exp1(), forbody(), FuncState::freereg, LexState::fs, luaK_codek(), luaK_intK(), luaK_reserveregs(), new_localvar(), new_localvarliteral, and testnext().
Referenced by forstat().
|
static |
Definition at line 1365 of file lua-5.3.6/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 818 of file lua-5.3.6/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 1463 of file lua-5.3.6/src/lparser.c.
References fieldsel(), singlevar(), LexState::t, Token::token, and LHS_assign::v.
Referenced by funcstat().
|
static |
Definition at line 1477 of file lua-5.3.6/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 998 of file lua-5.3.6/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().
Definition at line 195 of file lua-5.3.6/src/lparser.c.
References Dyndata::actvar, Dyndata::arr, LexState::dyd, FuncState::f, FuncState::firstlocal, Vardesc::idx, Proto::locvars, FuncState::ls, and lua_assert.
|
static |
Definition at line 987 of file lua-5.3.6/src/lparser.c.
References OPR_BNOT, OPR_LEN, OPR_MINUS, OPR_NOT, OPR_NOUNOPR, and TK_NOT.
Referenced by subexpr().
|
static |
Definition at line 1188 of file lua-5.3.6/src/lparser.c.
References LexState::dyd, findlabel(), Dyndata::gt, LexState::L, LexState::linenumber, luaS_new, luaX_next(), newlabelentry(), str_checkname(), testnext(), and TK_GOTO.
Referenced by statement(), and test_then_block().
|
static |
Definition at line 1418 of file lua-5.3.6/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 144 of file lua-5.3.6/src/lparser.c.
References expdesc::f, expdesc::info, expdesc::k, NO_JUMP, expdesc::t, and expdesc::u.
Referenced by assignment(), codeclosure(), codestring(), constructor(), funcargs(), mainfunc(), simpleexp(), and singlevaraux().
Definition at line 1224 of file lua-5.3.6/src/lparser.c.
References Labellist::arr, FuncState::bl, block_follow(), checknext(), checkrepeated(), LexState::dyd, findgotos(), LexState::fs, Dyndata::label, luaK_getlabel(), BlockCnt::nactvar, Labeldesc::nactvar, newlabelentry(), skipnoopstat(), and TK_DBCOLON.
Referenced by statement().
|
static |
Definition at line 679 of file lua-5.3.6/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 473 of file lua-5.3.6/src/lparser.c.
References Labellist::arr, FuncState::bl, breaklabel(), LexState::dyd, BlockCnt::firstgoto, BlockCnt::firstlabel, FuncState::freereg, Dyndata::gt, BlockCnt::isloop, Dyndata::label, FuncState::ls, lua_assert, luaK_jump(), luaK_patchclose(), luaK_patchtohere(), movegotosout(), Labellist::n, BlockCnt::nactvar, FuncState::nactvar, BlockCnt::previous, removevars(), undefgoto(), and BlockCnt::upval.
Referenced by block(), close_func(), forbody(), forstat(), repeatstat(), test_then_block(), and whilestat().
|
static |
Definition at line 694 of file lua-5.3.6/src/lparser.c.
References checklimit(), expr(), LexState::fs, MAX_INT, ConsControl::na, ConsControl::tostore, and ConsControl::v.
Referenced by field().
|
static |
Definition at line 1432 of file lua-5.3.6/src/lparser.c.
References adjustlocalvars(), body(), LexState::fs, getlocvar, expdesc::info, LexState::linenumber, new_localvar(), FuncState::pc, str_checkname(), and expdesc::u.
Referenced by statement().
|
static |
Definition at line 1443 of file lua-5.3.6/src/lparser.c.
References adjust_assign(), adjustlocalvars(), explist(), expdesc::k, new_localvar(), str_checkname(), testnext(), and VVOID.
Referenced by statement().
LClosure * luaY_parser | ( | lua_State * | L, |
ZIO * | z, | ||
Mbuffer * | buff, | ||
Dyndata * | dyd, | ||
const char * | name, | ||
int | firstchar ) |
Definition at line 1628 of file lua-5.3.6/src/lparser.c.
References Dyndata::actvar, LexState::buff, LexState::dyd, FuncState::f, LexState::fs, Dyndata::gt, LexState::h, iswhite, 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, setclLvalue, sethvalue, Proto::source, and lua_State::top.
Definition at line 1613 of file lua-5.3.6/src/lparser.c.
References check, close_func(), LexState::envn, FuncState::f, init_exp(), Proto::is_vararg, LexState::L, luaC_objbarrier, luaX_next(), newupvalue(), open_func(), statlist(), TK_EOS, LHS_assign::v, and VLOCAL.
Referenced by luaY_parser().
|
static |
Definition at line 258 of file lua-5.3.6/src/lparser.c.
References FuncState::bl, BlockCnt::nactvar, BlockCnt::previous, and BlockCnt::upval.
Referenced by singlevaraux().
Definition at line 421 of file lua-5.3.6/src/lparser.c.
References Labellist::arr, LexState::dyd, findlabel(), BlockCnt::firstgoto, gt, Dyndata::gt, FuncState::ls, luaK_patchclose(), BlockCnt::nactvar, FuncState::pc, and BlockCnt::upval.
Referenced by leaveblock().
Definition at line 175 of file lua-5.3.6/src/lparser.c.
References Dyndata::actvar, Dyndata::arr, cast, checklimit(), LexState::dyd, FuncState::firstlocal, LexState::fs, Vardesc::idx, LexState::L, luaM_growvector, MAX_INT, MAXVARS, Dyndata::n, name, registerlocalvar(), and Dyndata::size.
Referenced by forlist(), fornum(), localfunc(), localstat(), new_localvarliteral_(), and parlist().
|
static |
Definition at line 187 of file lua-5.3.6/src/lparser.c.
References luaX_newstring(), name, and new_localvar().
Definition at line 385 of file lua-5.3.6/src/lparser.c.
References Labellist::arr, LexState::fs, LexState::L, Labeldesc::line, luaM_growvector, Labellist::n, FuncState::nactvar, Labeldesc::nactvar, name, Labeldesc::name, Labeldesc::pc, and Labellist::size.
Referenced by breaklabel(), gotostat(), and labelstat().
Definition at line 228 of file lua-5.3.6/src/lparser.c.
References cast_byte, checklimit(), FuncState::f, expdesc::info, expdesc::k, LexState::L, FuncState::ls, luaC_objbarrier, luaM_growvector, MAXUPVAL, name, NULL, FuncState::nups, Proto::sizeupvalues, expdesc::u, Proto::upvalues, and VLOCAL.
Referenced by mainfunc(), and singlevaraux().
Definition at line 529 of file lua-5.3.6/src/lparser.c.
References Dyndata::actvar, FuncState::bl, LexState::dyd, enterblock(), FuncState::f, FuncState::firstlocal, FuncState::freereg, LexState::fs, FuncState::jpc, LexState::L, FuncState::lasttarget, FuncState::ls, luaC_objbarrier, Proto::maxstacksize, Dyndata::n, FuncState::nactvar, FuncState::nk, FuncState::nlocvars, NO_JUMP, FuncState::np, NULL, FuncState::nups, FuncState::pc, FuncState::prev, LexState::source, and Proto::source.
Referenced by body(), and mainfunc().
|
static |
Definition at line 754 of file lua-5.3.6/src/lparser.c.
References adjustlocalvars(), cast_byte, FuncState::f, LexState::fs, Proto::is_vararg, luaK_reserveregs(), luaX_next(), luaX_syntaxerror(), FuncState::nactvar, new_localvar(), Proto::numparams, str_checkname(), LexState::t, testnext(), TK_DOTS, TK_NAME, and Token::token.
Referenced by body().
Definition at line 872 of file lua-5.3.6/src/lparser.c.
References check_match(), expr(), LexState::fs, LexState::linenumber, luaK_dischargevars(), luaX_next(), luaX_syntaxerror(), singlevar(), LexState::t, TK_NAME, Token::token, and ConsControl::v.
Referenced by suffixedexp().
|
static |
Definition at line 647 of file lua-5.3.6/src/lparser.c.
References checklimit(), checkname(), checknext(), expr(), FuncState::freereg, LexState::fs, expdesc::info, luaK_codeABC, luaK_exp2RK(), MAX_INT, ConsControl::nh, OP_SETTABLE, LexState::t, ConsControl::t, TK_NAME, Token::token, expdesc::u, and yindex().
Referenced by field().
Definition at line 161 of file lua-5.3.6/src/lparser.c.
References FuncState::f, LexState::fs, LexState::L, Proto::locvars, luaC_objbarrier, luaM_growvector, FuncState::nlocvars, NULL, Proto::sizelocvars, and LocVar::varname.
Referenced by new_localvar().
|
static |
Definition at line 211 of file lua-5.3.6/src/lparser.c.
References Dyndata::actvar, LexState::dyd, getlocvar, FuncState::ls, Dyndata::n, FuncState::nactvar, and FuncState::pc.
Referenced by leaveblock().
|
static |
Definition at line 1261 of file lua-5.3.6/src/lparser.c.
References check_match(), cond(), enterblock(), LexState::fs, leaveblock(), luaK_getlabel(), luaK_patchclose(), luaK_patchlist(), luaX_next(), BlockCnt::nactvar, statlist(), TK_REPEAT, TK_UNTIL, and BlockCnt::upval.
Referenced by statement().
|
static |
Definition at line 1505 of file lua-5.3.6/src/lparser.c.
References block_follow(), explist(), FuncState::freereg, LexState::fs, GETARG_A, getinstruction, hasmultret, expdesc::k, lua_assert, LUA_MULTRET, luaK_exp2anyreg(), luaK_exp2nextreg(), luaK_ret(), luaK_setmultret, FuncState::nactvar, OP_TAILCALL, SET_OPCODE, LexState::t, testnext(), Token::token, and VCALL.
Referenced by statement().
Definition at line 218 of file lua-5.3.6/src/lparser.c.
References eqstr, FuncState::f, name, FuncState::nups, and Proto::upvalues.
Referenced by singlevaraux().
Definition at line 244 of file lua-5.3.6/src/lparser.c.
References cast_int, eqstr, getlocvar, and FuncState::nactvar.
Referenced by singlevaraux().
Definition at line 67 of file lua-5.3.6/src/lparser.c.
References luaX_syntaxerror(), LexState::t, and Token::token.
Referenced by checkrepeated(), closegoto(), and undefgoto().
Definition at line 932 of file lua-5.3.6/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, ConsControl::v, VFALSE, VKFLT, VKINT, VNIL, VTRUE, and VVARARG.
Referenced by subexpr().
Definition at line 295 of file lua-5.3.6/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 270 of file lua-5.3.6/src/lparser.c.
References init_exp(), expdesc::k, markupval(), newupvalue(), NULL, FuncState::prev, searchupvalue(), searchvar(), singlevaraux(), VLOCAL, VUPVAL, and VVOID.
Referenced by singlevar(), and singlevaraux().
|
static |
Definition at line 1218 of file lua-5.3.6/src/lparser.c.
References statement(), LexState::t, TK_DBCOLON, and Token::token.
Referenced by labelstat().
|
static |
Definition at line 1538 of file lua-5.3.6/src/lparser.c.
References block(), check_match(), enterlevel, exprstat(), FuncState::f, forstat(), FuncState::freereg, LexState::fs, funcstat(), gotostat(), ifstat(), labelstat(), leavelevel, LexState::linenumber, localfunc(), localstat(), lua_assert, luaK_jump(), luaX_next(), Proto::maxstacksize, FuncState::nactvar, 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 skipnoopstat(), and statlist().
|
static |
Definition at line 599 of file lua-5.3.6/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 135 of file lua-5.3.6/src/lparser.c.
References check, luaX_next(), Token::seminfo, LexState::t, TK_NAME, and SemInfo::ts.
Referenced by checkname(), forlist(), forstat(), gotostat(), localfunc(), localstat(), parlist(), singlevar(), and statement().
Definition at line 1049 of file lua-5.3.6/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 894 of file lua-5.3.6/src/lparser.c.
References checkname(), fieldsel(), LexState::fs, funcargs(), LexState::linenumber, luaK_exp2anyregup(), luaK_exp2nextreg(), luaK_indexed(), luaK_self(), luaX_next(), primaryexp(), LexState::t, TK_STRING, Token::token, ConsControl::v, and yindex().
Referenced by assignment(), exprstat(), and simpleexp().
|
static |
Definition at line 1383 of file lua-5.3.6/src/lparser.c.
References block_follow(), checknext(), enterblock(), expr(), expdesc::f, LexState::fs, gotostat(), leaveblock(), luaK_concat(), luaK_goiffalse(), luaK_goiftrue(), luaK_jump(), luaK_patchtohere(), luaX_next(), statlist(), LexState::t, expdesc::t, testnext(), TK_BREAK, TK_ELSE, TK_ELSEIF, TK_GOTO, TK_THEN, Token::token, and LHS_assign::v.
Referenced by ifstat().
|
static |
Definition at line 97 of file lua-5.3.6/src/lparser.c.
References luaX_next(), LexState::t, and Token::token.
Referenced by assignment(), check_match(), constructor(), explist(), forlist(), fornum(), gotostat(), ifstat(), localstat(), parlist(), retstat(), statement(), and test_then_block().
Definition at line 464 of file lua-5.3.6/src/lparser.c.
References getstr, gt, isreserved, LexState::L, luaO_pushfstring(), and semerror().
Referenced by leaveblock().
|
static |
Definition at line 1242 of file lua-5.3.6/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 622 of file lua-5.3.6/src/lparser.c.
References checknext(), expr(), LexState::fs, luaK_exp2val(), and luaX_next().
Referenced by recfield(), and suffixedexp().
lu_byte left |
Definition at line 1027 of file lua-5.3.6/src/lparser.c.
Referenced by subexpr().
const struct { ... } priority[] |
Referenced by subexpr().
lu_byte right |
Definition at line 1028 of file lua-5.3.6/src/lparser.c.
Referenced by subexpr().