ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

llex.h

Go to the documentation of this file.
00001 /*
00002 ** Lexical Analizer
00003 ** See Copyright Notice in lua.h
00004 */
00005 
00006 #ifndef GRIM_LLEX_H
00007 #define GRIM_LLEX_H
00008 
00009 #include "engines/grim/lua/lobject.h"
00010 #include "engines/grim/lua/lzio.h"
00011 
00012 namespace Grim {
00013 
00014 #define MAX_IFS 5
00015 
00016 // "ifstate" keeps the state of each nested $if the lexical is dealing with.
00017 
00018 struct ifState {
00019     int32 elsepart;  // true if its in the $else part
00020     int32 condition;  // true if $if condition is true
00021     int32 skip;  // true if part must be skipped
00022 };
00023 
00024 typedef struct LexState {
00025     int32 current;  // look ahead character
00026     zio *lex_z;  // input stream
00027     int32 linenumber;  // input line counter
00028     int linelasttoken;  /* line where last token was read */
00029     int lastline;  /* last line wherein a SETLINE was generated */
00030     int32 iflevel;  // level of nested $if's (for lexical analysis)
00031     ifState ifstate[MAX_IFS];
00032 } LexState;
00033 
00034 void luaX_init();
00035 void luaX_setinput(ZIO *z);
00036 char *luaX_lasttoken();
00037 
00038 } // end of namespace Grim
00039 
00040 #endif


Generated on Sat May 25 2019 05:00:48 for ResidualVM by doxygen 1.7.1
curved edge   curved edge