2
** $Id: lparser.h,v 1.1 2003/02/09 21:30:32 dheck Exp $
3
** LL(1) Parser and code generator for Lua
4
** See Copyright Notice in lua.h
15
** Expression descriptor
25
typedef struct expdesc {
28
int index; /* VGLOBAL: `kstr' index of global name; VLOCAL: stack index */
30
int t; /* patch list of `exit when true' */
31
int f; /* patch list of `exit when false' */
38
/* state needed to generate code for a given function */
39
typedef struct FuncState {
40
Proto *f; /* current function header */
41
struct FuncState *prev; /* enclosing function */
42
struct LexState *ls; /* lexical state */
43
struct lua_State *L; /* copy of the Lua state */
44
int pc; /* next position to code */
45
int lasttarget; /* `pc' of last `jump target' */
46
int jlt; /* list of jumps to `lasttarget' */
47
short stacklevel; /* number of values on activation register */
48
short nactloc; /* number of active local variables */
49
short nupvalues; /* number of upvalues */
50
int lastline; /* line where last `lineinfo' was generated */
51
struct Breaklabel *bl; /* chain of breakable blocks */
52
expdesc upvalues[MAXUPVALUES]; /* upvalues */
53
int actloc[MAXLOCALS]; /* local-variable stack (indices to locvars) */
57
Proto *luaY_parser (lua_State *L, ZIO *z);