RetroArch
llex.h
Go to the documentation of this file.
1 /*
2 ** $Id: llex.h,v 1.79.1.1 2017/04/19 17:20:42 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 #if !defined(LUA_ENV)
18 #define LUA_ENV "_ENV"
19 #endif
20 
21 
22 /*
23 * WARNING: if you change the order of this enumeration,
24 * grep "ORDER RESERVED"
25 */
26 enum RESERVED {
27  /* terminal symbols denoted by reserved words */
32  /* other terminal symbols */
37 };
38 
39 /* number of reserved words */
40 #define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1))
41 
42 
43 typedef union {
47 } SemInfo; /* semantics information */
48 
49 
50 typedef struct Token {
51  int token;
53 } Token;
54 
55 
56 /* state of the lexer plus state of the parser when shared by all
57  functions */
58 typedef struct LexState {
59  int current; /* current character (charint) */
60  int linenumber; /* input line counter */
61  int lastline; /* line of last token 'consumed' */
62  Token t; /* current token */
63  Token lookahead; /* look ahead token */
64  struct FuncState *fs; /* current function (parser) */
65  struct lua_State *L;
66  ZIO *z; /* input stream */
67  Mbuffer *buff; /* buffer for tokens */
68  Table *h; /* to avoid collection/reuse strings */
69  struct Dyndata *dyd; /* dynamic structures used by the parser */
70  TString *source; /* current source name */
71  TString *envn; /* environment variable name */
72 } LexState;
73 
74 
77  TString *source, int firstchar);
78 LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l);
79 LUAI_FUNC void luaX_next (LexState *ls);
81 LUAI_FUNC l_noret luaX_syntaxerror (LexState *ls, const char *s);
82 LUAI_FUNC const char *luaX_token2str (LexState *ls, int token);
83 
84 
85 #endif
Definition: llex.h:50
Definition: llex.h:30
Mbuffer * buff
Definition: llex.h:67
struct FuncState * fs
Definition: llex.h:64
Definition: llex.h:33
TString * envn
Definition: llex.h:71
Definition: llex.h:33
Definition: lzio.h:23
LUAI_FUNC const char * luaX_token2str(LexState *ls, int token)
Definition: llex.c:82
Definition: llex.h:29
Table * h
Definition: llex.h:68
RESERVED
Definition: llex.h:26
Definition: llex.h:30
Token t
Definition: llex.h:62
Definition: llex.h:36
struct Token Token
Definition: llex.h:31
Definition: llex.h:36
GLdouble s
Definition: glext.h:6390
#define FIRST_RESERVED
Definition: llex.h:14
Definition: llex.h:31
GLdouble GLdouble z
Definition: glext.h:6514
LUA_NUMBER lua_Number
Definition: lua.h:89
Definition: llex.h:30
LUAI_FUNC l_noret luaX_syntaxerror(LexState *ls, const char *s)
Definition: llex.c:117
TString * ts
Definition: llex.h:46
#define LUAI_FUNC
Definition: luaconf.h:282
TString * source
Definition: llex.h:70
Definition: llex.h:30
LUA_INTEGER lua_Integer
Definition: lua.h:93
Definition: llex.h:31
Definition: llex.h:35
bool l
Definition: connect_wiiupro.c:37
int lastline
Definition: llex.h:61
Definition: llex.h:29
Definition: llex.h:36
Definition: llex.h:28
int token
Definition: llex.h:51
lua_Number r
Definition: llex.h:44
lua_Integer i
Definition: llex.h:45
Definition: llex.h:43
Definition: lparser.h:111
Definition: llex.h:33
LUAI_FUNC void luaX_next(LexState *ls)
Definition: llex.c:549
Definition: llex.h:36
Definition: llex.h:33
Definition: llex.h:34
Definition: llex.h:30
Definition: llex.h:33
struct Dyndata * dyd
Definition: llex.h:69
GLsizei GLsizei GLchar * source
Definition: glext.h:6688
Definition: llex.h:29
struct lua_State * L
Definition: llex.h:65
LUAI_FUNC int luaX_lookahead(LexState *ls)
Definition: llex.c:560
Definition: llex.h:29
Definition: llex.h:30
ZIO * z
Definition: llex.h:66
struct LexState LexState
Definition: llex.h:29
Definition: llex.h:31
Ιστορικό Εικόνα Πληροφορίες Όλοι Οι Χρήστες Χειρίζονται Το Μενού Αριστερό Αναλογικό Αριστερό Αναλογικό Αριστερό Αναλογικό Y Αριστερό Αναλογικό Δεξί Αναλογικό X Δεξί Αναλογικό Δεξί Αναλογικό Y Δεξί Αναλογικό Σκανδάλη Όπλου Όπλο Aux A Όπλο Aux C Όπλο Select Όπλο D pad Κάτω Όπλο D pad Δεξιά Νεκρή Ζώνη Αναλογικού Σύνδεση Όλων Λήξη Χρόνου Σύνδεσης Hide Unbound Core Input Descriptors Κατάλογος Συσκευών Κατάλογος Ποντικιού Duty Cycle Keyboard Gamepad Mapping Enable Κουμπί D pad κάτω Κουμπί Κουμπί L(πίσω)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT
int linenumber
Definition: llex.h:60
LUAI_FUNC void luaX_init(lua_State *L)
Definition: llex.c:70
Definition: llex.h:34
Definition: llex.h:30
LUAI_FUNC void luaX_setinput(lua_State *L, LexState *ls, ZIO *z, TString *source, int firstchar)
Definition: llex.c:162
Definition: llex.h:35
Definition: llex.h:58
Definition: llex.h:29
Definition: llex.h:33
Definition: llex.h:28
#define l_noret
Definition: llimits.h:143
Definition: llex.h:30
Definition: llex.h:31
Definition: lobject.h:497
SemInfo seminfo
Definition: llex.h:52
Definition: lstate.h:178
int current
Definition: llex.h:59
Definition: llex.h:29
Token lookahead
Definition: llex.h:63
Definition: lzio.h:55
LUAI_FUNC TString * luaX_newstring(LexState *ls, const char *str, size_t l)
Definition: llex.c:127
Definition: lparser.h:95
Definition: llex.h:33
Definition: lobject.h:303
const char *const str
Definition: portlistingparse.c:18