diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-03 11:58:26 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-03 11:58:26 -0300 |
commit | 3c9d999424520c809e05bee11d81788b488434f6 (patch) | |
tree | 7556d9ea10bda42b226aec4dd956753467cc0864 /llex.h | |
parent | f7840a3e0bc07813246b2bad6bf4579848187908 (diff) | |
download | lua-3c9d999424520c809e05bee11d81788b488434f6.tar.gz lua-3c9d999424520c809e05bee11d81788b488434f6.tar.bz2 lua-3c9d999424520c809e05bee11d81788b488434f6.zip |
many details (most by lhf).
Diffstat (limited to 'llex.h')
-rw-r--r-- | llex.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.h,v 1.17 2000/01/25 18:44:21 roberto Exp roberto $ | 2 | ** $Id: llex.h,v 1.18 2000/02/08 16:34:31 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 | */ |
@@ -11,7 +11,7 @@ | |||
11 | #include "lzio.h" | 11 | #include "lzio.h" |
12 | 12 | ||
13 | 13 | ||
14 | #define FIRST_RESERVED 260 | 14 | #define FIRST_RESERVED 257 |
15 | 15 | ||
16 | /* maximum length of a reserved word (+1 for final 0) */ | 16 | /* maximum length of a reserved word (+1 for final 0) */ |
17 | #define TOKEN_LEN 15 | 17 | #define TOKEN_LEN 15 |
@@ -30,7 +30,8 @@ enum RESERVED { | |||
30 | NAME, CONC, DOTS, EQ, GE, LE, NE, NUMBER, STRING, EOS | 30 | NAME, CONC, DOTS, EQ, GE, LE, NE, NUMBER, STRING, EOS |
31 | }; | 31 | }; |
32 | 32 | ||
33 | #define NUM_RESERVED (WHILE-FIRST_RESERVED+1) /* number of reserved words */ | 33 | /* number of reserved words */ |
34 | #define NUM_RESERVED ((int)(WHILE-FIRST_RESERVED+1)) | ||
34 | 35 | ||
35 | 36 | ||
36 | #ifndef MAX_IFS | 37 | #ifndef MAX_IFS |
@@ -49,13 +50,13 @@ struct ifState { | |||
49 | typedef struct LexState { | 50 | typedef struct LexState { |
50 | int current; /* look ahead character */ | 51 | int current; /* look ahead character */ |
51 | int token; /* look ahead token */ | 52 | int token; /* look ahead token */ |
52 | struct FuncState *fs; /* `FuncState' is private for the parser */ | 53 | struct FuncState *fs; /* `FuncState' is private to the parser */ |
53 | struct lua_State *L; | 54 | struct lua_State *L; |
54 | union { | 55 | union { |
55 | real r; | 56 | real r; |
56 | TaggedString *ts; | 57 | TaggedString *ts; |
57 | } seminfo; /* semantics information */ | 58 | } seminfo; /* semantics information */ |
58 | struct zio *lex_z; /* input stream */ | 59 | struct zio *z; /* input stream */ |
59 | int linenumber; /* input line counter */ | 60 | int linenumber; /* input line counter */ |
60 | int iflevel; /* level of nested $if's (for lexical analysis) */ | 61 | int iflevel; /* level of nested $if's (for lexical analysis) */ |
61 | struct ifState ifstate[MAX_IFS]; | 62 | struct ifState ifstate[MAX_IFS]; |