28#define next(ls) (ls->current = zgetc(ls->z))
33#define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r')
38 "and",
"break",
"do",
"else",
"elseif",
39 "end",
"false",
"for",
"function",
"if",
40 "in",
"local",
"nil",
"not",
"or",
"repeat",
41 "return",
"then",
"true",
"until",
"while",
42 "..",
"...",
"==",
">=",
"<=",
"~=",
43 "<number>",
"<name>",
"<string>",
"<eof>",
48#define save_and_next(ls) (save(ls, ls->current), next(ls))
175 if (p[n] == from) p[n] = to;
181 struct lconv *cv = localeconv();
183 ls->
decpoint = (cv ? cv->decimal_point[0] :
'.');
219 return (ls->
current ==
s) ? count : (-count) - 1;
233 "unfinished long comment",
TK_EOS);
235#if defined(LUA_COMPAT_LSTR)
240#if LUA_COMPAT_LSTR == 1
251#if defined(LUA_COMPAT_LSTR) && LUA_COMPAT_LSTR == 2
253 if (sep == 0 && cont >= 0)
break;
293 case 'a': c =
'\a';
break;
294 case 'b': c =
'\b';
break;
295 case 'f': c =
'\f';
break;
296 case 'n': c =
'\n';
break;
297 case 'r': c =
'\r';
break;
298 case 't': c =
'\t';
break;
299 case 'v': c =
'\v';
break;
312 }
while (++i<3 && isdigit(ls->
current));
345 if (ls->
current !=
'-')
return '-';
368 else if (sep == -1)
return '[';
373 if (ls->
current !=
'=')
return '=';
378 if (ls->
current !=
'=')
return '<';
383 if (ls->
current !=
'=')
return '>';
388 if (ls->
current !=
'=')
return '~';
403 else if (!isdigit(ls->
current))
return '.';
418 else if (isdigit(ls->
current)) {
void luaD_throw(lua_State *L, int errcode)
void luaX_syntaxerror(LexState *ls, const char *msg)
const char *const luaX_tokens[]
static void save(LexState *ls, int c)
static void read_numeral(LexState *ls, SemInfo *seminfo)
void luaX_lexerror(LexState *ls, const char *msg, int token)
static void trydecpoint(LexState *ls, SemInfo *seminfo)
static void read_long_string(LexState *ls, SemInfo *seminfo, int sep)
void luaX_init(lua_State *L)
TString * luaX_newstring(LexState *ls, const char *str, size_t l)
static void read_string(LexState *ls, int del, SemInfo *seminfo)
static int check_next(LexState *ls, const char *set)
static int llex(LexState *ls, SemInfo *seminfo)
void luaX_next(LexState *ls)
static void buffreplace(LexState *ls, char from, char to)
static void inclinenumber(LexState *ls)
#define save_and_next(ls)
static int skip_sep(LexState *ls)
void luaX_setinput(lua_State *L, LexState *ls, ZIO *z, TString *source)
static const char * txtToken(LexState *ls, int token)
const char * luaX_token2str(LexState *ls, int token)
#define currIsNewline(ls)
void luaX_lookahead(LexState *ls)
void luaO_chunkid(char *out, const char *source, size_t bufflen)
const char * luaO_pushfstring(lua_State *L, const char *fmt,...)
int luaO_str2d(const char *s, lua_Number *result)
#define setbvalue(obj, x)
TString * luaS_newlstr(lua_State *L, const char *str, size_t l)
TValue * luaH_setstr(lua_State *L, Table *t, TString *key)
#define luaZ_bufflen(buff)
#define luaZ_resetbuffer(buff)
#define luaZ_buffer(buff)
#define luaZ_resizebuffer(L, buff, size)
CURL_EXTERN CURLMcode curl_socket_t s