summaryrefslogtreecommitdiff
path: root/lib/lua/includes/llex.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lua/includes/llex.h')
-rw-r--r--lib/lua/includes/llex.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/lib/lua/includes/llex.h b/lib/lua/includes/llex.h
index 805abc5..882163a 100644
--- a/lib/lua/includes/llex.h
+++ b/lib/lua/includes/llex.h
@@ -1,5 +1,5 @@
/*
-** $Id: llex.h,v 1.4 2004-11-27 21:46:06 pixel Exp $
+** $Id: llex.h,v 1.5 2007-07-27 10:05:53 pixel Exp $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -28,14 +28,18 @@ enum RESERVED {
TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT,
TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE,
/* other terminal symbols */
- TK_NAME, TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_NUMBER,
- TK_STRING, TK_EOS
+ TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_NUMBER,
+ TK_NAME, TK_STRING, TK_EOS
};
/* number of reserved words */
#define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1))
+/* array with token `names' */
+LUAI_DATA const char *const luaX_tokens [];
+
+
typedef union {
lua_Number r;
TString *ts;
@@ -59,17 +63,19 @@ typedef struct LexState {
ZIO *z; /* input stream */
Mbuffer *buff; /* buffer for tokens */
TString *source; /* current source name */
- int nestlevel; /* level of nested non-terminals */
+ char decpoint; /* locale decimal point */
} LexState;
-void luaX_init (lua_State *L);
-void luaX_setinput (lua_State *L, LexState *LS, ZIO *z, TString *source);
-int luaX_lex (LexState *LS, SemInfo *seminfo);
-void luaX_checklimit (LexState *ls, int val, int limit, const char *msg);
-void luaX_syntaxerror (LexState *ls, const char *s);
-void luaX_errorline (LexState *ls, const char *s, const char *token, int line);
-const char *luaX_token2str (LexState *ls, int token);
+LUAI_FUNC void luaX_init (lua_State *L);
+LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z,
+ TString *source);
+LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l);
+LUAI_FUNC void luaX_next (LexState *ls);
+LUAI_FUNC void luaX_lookahead (LexState *ls);
+LUAI_FUNC void luaX_lexerror (LexState *ls, const char *msg, int token);
+LUAI_FUNC void luaX_syntaxerror (LexState *ls, const char *s);
+LUAI_FUNC const char *luaX_token2str (LexState *ls, int token);
#endif