Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
lua-5.2.4/src/llex.h
Go to the documentation of this file.
1/*
2** $Id: llex.h,v 1.72.1.1 2013/04/12 18:48:47 roberto Exp $
3** Lexical Analyzer
4** See Copyright Notice in lua.h
5*/
6
7#ifndef llex_h
8#define llex_h
9
10#include "lobject.h"
11#include "lzio.h"
12
13
14#define FIRST_RESERVED 257
15
16
17
18/*
19* WARNING: if you change the order of this enumeration,
20* grep "ORDER RESERVED"
21*/
32
33/* number of reserved words */
34#define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1))
35
36
37typedef union {
38 lua_Number r;
39 TString *ts;
40} SemInfo; /* semantics information */
41
42
43typedef struct Token {
44 int token;
47
48
49/* state of the lexer plus state of the parser when shared by all
50 functions */
51typedef struct LexState {
52 int current; /* current character (charint) */
53 int linenumber; /* input line counter */
54 int lastline; /* line of last token `consumed' */
55 Token t; /* current token */
56 Token lookahead; /* look ahead token */
57 struct FuncState *fs; /* current function (parser) */
58 struct lua_State *L;
59 ZIO *z; /* input stream */
60 Mbuffer *buff; /* buffer for tokens */
61 struct Dyndata *dyd; /* dynamic structures used by the parser */
62 TString *source; /* current source name */
63 TString *envn; /* environment variable name */
64 char decpoint; /* locale decimal point */
66
67
70 TString *source, int firstchar);
71LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l);
75LUAI_FUNC const char *luaX_token2str (LexState *ls, int token);
76
77
78#endif
LUA_NUMBER lua_Number
#define LUAI_FUNC
LUAI_FUNC l_noret luaX_syntaxerror(LexState *ls, const char *s)
LUAI_FUNC TString * luaX_newstring(LexState *ls, const char *str, size_t l)
LUAI_FUNC void luaX_init(lua_State *L)
Definition noparser.c:21
LUAI_FUNC void luaX_next(LexState *ls)
#define FIRST_RESERVED
LUAI_FUNC const char * luaX_token2str(LexState *ls, int token)
struct LexState LexState
LUAI_FUNC void luaX_setinput(lua_State *L, LexState *ls, ZIO *z, TString *source, int firstchar)
LUAI_FUNC int luaX_lookahead(LexState *ls)
@ TK_FALSE
@ TK_NUMBER
@ TK_STRING
@ TK_BREAK
@ TK_DBCOLON
@ TK_ELSE
@ TK_DOTS
@ TK_WHILE
@ TK_LOCAL
@ TK_TRUE
@ TK_THEN
@ TK_CONCAT
@ TK_NAME
@ TK_REPEAT
@ TK_FUNCTION
@ TK_UNTIL
@ TK_RETURN
@ TK_GOTO
@ TK_ELSEIF
struct Token Token
#define l_noret
CURL_EXTERN CURLMcode curl_socket_t s
Definition multi.h:318
struct lua_State * L
TString * source
struct FuncState * fs
struct Dyndata * dyd
Mbuffer * buff
TString * envn
SemInfo seminfo