Lua 5.1.4: llex.h
L0001
L0006
L0007 #ifndef llex_h
L0008 #define llex_h
L0009
L0010 #include "lobject.h"
L0011 #include "lzio.h"
L0012
L0013
L0014 #define FIRST_RESERVED 257
L0015
L0016
L0017 #define TOKEN_LEN (sizeof("function")/sizeof(char))
L0018
L0019
L0020
L0024 enum RESERVED {
L0025
L0026 TK_AND = FIRST_RESERVED, TK_BREAK,
L0027 TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION,
L0028 TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT,
L0029 TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE,
L0030
L0031 TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_NUMBER,
L0032 TK_NAME, TK_STRING, TK_EOS
L0033 };
L0034
L0035
L0036 #define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1))
L0037
L0038
L0039
L0040 LUAI_DATA const char *const luaX_tokens [];
L0041
L0042
L0043 typedef union {
L0044 lua_Number r;
L0045 TString *ts;
L0046 } SemInfo;
L0047
L0048
L0049 typedef struct Token {
L0050 int token;
L0051 SemInfo seminfo;
L0052 } Token;
L0053
L0054
L0055 typedef struct LexState {
L0056 int current;
L0057 int linenumber;
L0058 int lastline;
L0059 Token t;
L0060 Token lookahead;
L0061 struct FuncState *fs;
L0062 struct lua_State *L;
L0063 ZIO *z;
L0064 Mbuffer *buff;
L0065 TString *source;
L0066 char decpoint;
L0067 } LexState;
L0068
L0069
L0070 LUAI_FUNC void luaX_init (lua_State *L);
L0071 LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z,
L0072 TString *source);
L0073 LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l);
L0074 LUAI_FUNC void luaX_next (LexState *ls);
L0075 LUAI_FUNC void luaX_lookahead (LexState *ls);
L0076 LUAI_FUNC void luaX_lexerror (LexState *ls, const char *msg, int token);
L0077 LUAI_FUNC void luaX_syntaxerror (LexState *ls, const char *s);
L0078 LUAI_FUNC const char *luaX_token2str (LexState *ls, int token);
L0079
L0080
L0081 #endif
Generated by pretty.lua