summaryrefslogtreecommitdiff
path: root/llex.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-03 11:58:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-03 11:58:26 -0300
commit3c9d999424520c809e05bee11d81788b488434f6 (patch)
tree7556d9ea10bda42b226aec4dd956753467cc0864 /llex.h
parentf7840a3e0bc07813246b2bad6bf4579848187908 (diff)
downloadlua-3c9d999424520c809e05bee11d81788b488434f6.tar.gz
lua-3c9d999424520c809e05bee11d81788b488434f6.tar.bz2
lua-3c9d999424520c809e05bee11d81788b488434f6.zip
many details (most by lhf).
Diffstat (limited to 'llex.h')
-rw-r--r--llex.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/llex.h b/llex.h
index 8b11cd64..93097010 100644
--- a/llex.h
+++ b/llex.h
@@ -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 {
49typedef struct LexState { 50typedef 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];