diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-22 11:12:07 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-22 11:12:07 -0200 |
commit | 29ede6aa13144ff7b69c57a87be1ee93f57ae896 (patch) | |
tree | adcfb5dcff7db55481cd675349e23dec0e63c939 /llex.h | |
parent | 951897c09319ae5474a4b86bb7d615136577caa0 (diff) | |
download | lua-29ede6aa13144ff7b69c57a87be1ee93f57ae896.tar.gz lua-29ede6aa13144ff7b69c57a87be1ee93f57ae896.tar.bz2 lua-29ede6aa13144ff7b69c57a87be1ee93f57ae896.zip |
first implementation of multiple states (reentrant code).
Diffstat (limited to 'llex.h')
-rw-r--r-- | llex.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.h,v 1.13 1999/07/22 19:29:42 roberto Exp roberto $ | 2 | ** $Id: llex.h,v 1.14 1999/08/16 20:52:00 roberto Exp roberto $ |
3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -47,6 +47,7 @@ typedef struct LexState { | |||
47 | int current; /* look ahead character */ | 47 | int current; /* look ahead character */ |
48 | int token; /* look ahead token */ | 48 | int token; /* look ahead token */ |
49 | struct FuncState *fs; /* 'FuncState' is private for the parser */ | 49 | struct FuncState *fs; /* 'FuncState' is private for the parser */ |
50 | struct lua_State *L; | ||
50 | union { | 51 | union { |
51 | real r; | 52 | real r; |
52 | TaggedString *ts; | 53 | TaggedString *ts; |
@@ -58,8 +59,8 @@ typedef struct LexState { | |||
58 | } LexState; | 59 | } LexState; |
59 | 60 | ||
60 | 61 | ||
61 | void luaX_init (void); | 62 | void luaX_init (lua_State *L); |
62 | void luaX_setinput (LexState *LS, ZIO *z); | 63 | void luaX_setinput (lua_State *L, LexState *LS, ZIO *z); |
63 | int luaX_lex (LexState *LS); | 64 | int luaX_lex (LexState *LS); |
64 | void luaX_syntaxerror (LexState *ls, const char *s, const char *token); | 65 | void luaX_syntaxerror (LexState *ls, const char *s, const char *token); |
65 | void luaX_error (LexState *ls, const char *s); | 66 | void luaX_error (LexState *ls, const char *s); |