Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 #ifndef lparser_h
00008 #define lparser_h
00009 
00010 #include <lua/llimits.h>
00011 #include <lua/lobject.h>
00012 #include <lua/lzio.h>
00013 
00014 
00015 
00016 
00017 
00018 
00019 typedef enum {
00020   VVOID,    
00021   VNIL,
00022   VTRUE,
00023   VFALSE,
00024   VK,       
00025   VKNUM,    
00026   VLOCAL,   
00027   VUPVAL,       
00028   VGLOBAL,  
00029   VINDEXED, 
00030   VJMP,     
00031   VRELOCABLE,   
00032   VNONRELOC,    
00033   VCALL,    
00034   VVARARG   
00035 } expkind;
00036 
00037 typedef struct expdesc {
00038   expkind k;
00039   union {
00040     struct { int info, aux; } s;
00041     lua_Number nval;
00042   } u;
00043   int t;  
00044   int f;  
00045 } expdesc;
00046 
00047 
00048 typedef struct upvaldesc {
00049   lu_byte k;
00050   lu_byte info;
00051 } upvaldesc;
00052 
00053 
00054 struct BlockCnt;  
00055 
00056 
00057 
00058 typedef struct FuncState {
00059   Proto *f;  
00060   Table *h;  
00061   struct FuncState *prev;  
00062   struct LexState *ls;  
00063   struct lua_State *L;  
00064   struct BlockCnt *bl;  
00065   int pc;  
00066   int lasttarget;   
00067   int jpc;  
00068   int freereg;  
00069   int nk;  
00070   int np;  
00071   short nlocvars;  
00072   lu_byte nactvar;  
00073   upvaldesc upvalues[LUAI_MAXUPVALUES];  
00074   unsigned short actvar[LUAI_MAXVARS];  
00075 } FuncState;
00076 
00077 
00078 LUAI_FUNC Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,
00079                                             const char *name);
00080 
00081 
00082 #endif