ScummVM API documentation
llex.h
1
/*
2
** Lexical Analizer
3
** See Copyright Notice in lua.h
4
*/
5
6
#ifndef GRIM_LLEX_H
7
#define GRIM_LLEX_H
8
9
#include "engines/grim/lua/lobject.h"
10
#include "engines/grim/lua/lzio.h"
11
12
namespace
Grim
{
13
14
#define MAX_IFS 5
15
16
// "ifstate" keeps the state of each nested $if the lexical is dealing with.
17
18
struct
ifState
{
19
int32 elsepart;
// true if its in the $else part
20
int32 condition;
// true if $if condition is true
21
int32 skip;
// true if part must be skipped
22
};
23
24
typedef
struct
LexState
{
25
int32 current;
// look ahead character
26
zio
*lex_z;
// input stream
27
int32 linenumber;
// input line counter
28
int
linelasttoken;
/* line where last token was read */
29
int
lastline;
/* last line wherein a SETLINE was generated */
30
int32 iflevel;
// level of nested $if's (for lexical analysis)
31
ifState
ifstate[MAX_IFS];
32
}
LexState
;
33
34
void
luaX_init();
35
void
luaX_setinput(
ZIO
*z);
36
char
*luaX_lasttoken();
37
38
}
// end of namespace Grim
39
40
#endif
Grim::zio
Definition:
lzio.h:38
Grim
Definition:
actor.h:33
Grim::ifState
Definition:
llex.h:18
Grim::LexState
Definition:
llex.h:24
engines
grim
lua
llex.h
Generated on Sat Aug 31 2024 09:05:34 for ScummVM API documentation by
1.8.13