Go to the documentation of this file.
32 #define next(ls) (ls->current = zgetc(ls->z))
36 #define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r')
41 "and",
"break",
"do",
"else",
"elseif",
42 "end",
"false",
"for",
"function",
"goto",
"if",
43 "in",
"local",
"nil",
"not",
"or",
"repeat",
44 "return",
"then",
"true",
"until",
"while",
45 "//",
"..",
"...",
"==",
">=",
"<=",
"~=",
46 "<<",
">>",
"::",
"<eof>",
47 "<number>",
"<integer>",
"<name>",
"<string>"
51 #define save_and_next(ls) (save(ls, ls->current), next(ls))
62 lexerror(ls,
"lexical element too long", 0);
163 lexerror(ls,
"chunk has too many lines", 0);
229 const char *expo =
"Ee";
288 const char *what = (seminfo ?
"string" :
"comment");
290 "unfinished long %s (starting at line %d)", what, line);
301 case '\n':
case '\r': {
351 esccheck(ls, r <= (0x7FFFFFFFu >> 4),
"UTF-8 value too large");
376 esccheck(ls, r <= UCHAR_MAX,
"decimal escape too large");
397 case 'a': c =
'\a';
goto read_save;
398 case 'b': c =
'\b';
goto read_save;
399 case 'f': c =
'\f';
goto read_save;
400 case 'n': c =
'\n';
goto read_save;
401 case 'r': c =
'\r';
goto read_save;
402 case 't': c =
'\t';
goto read_save;
403 case 'v': c =
'\v';
goto read_save;
405 case 'u':
utf8esc(ls);
goto no_save;
406 case '\n':
case '\r':
408 case '\\':
case '\"':
case '\'':
409 c = ls->
current;
goto read_save;
410 case EOZ:
goto no_save;
449 case '\n':
case '\r': {
453 case ' ':
case '\f':
case '\t':
case '\v': {
459 if (ls->
current !=
'-')
return '-';
518 case '"':
case '\'': {
532 case '0':
case '1':
case '2':
case '3':
case '4':
533 case '5':
case '6':
case '7':
case '8':
case '9': {
void luaX_next(LexState *ls)
static int gethexa(LexState *ls)
auto first(const T &value, const Tail &...) -> const T &
static int check_next1(LexState *ls, int c)
const char * luaX_token2str(LexState *ls, int token)
#define luaZ_resizebuffer(L, buff, size)
static unsigned long readutf8esc(LexState *ls)
void luaX_setinput(lua_State *L, LexState *ls, ZIO *z, TString *source, int firstchar)
static int read_numeral(LexState *ls, SemInfo *seminfo)
TString * luaS_newlstr(lua_State *L, const char *str, size_t l)
static const char * txtToken(LexState *ls, int token)
#define setsvalue(L, obj, x)
TString * luaS_new(lua_State *L, const char *str)
#define luaZ_resetbuffer(buff)
#define luaZ_sizebuffer(buff)
#define luaZ_bufflen(buff)
void luaC_fix(lua_State *L, GCObject *o)
static void read_string(LexState *ls, int del, SemInfo *seminfo)
static int check_next2(LexState *ls, const char *set)
static int readdecesc(LexState *ls)
TString * luaX_newstring(LexState *ls, const char *str, size_t l)
ROSCPP_DECL bool del(const std::string &key)
#define luaZ_buffer(buff)
constexpr auto count() -> size_t
#define currIsNewline(ls)
l_noret luaX_syntaxerror(LexState *ls, const char *msg)
static void read_long_string(LexState *ls, SemInfo *seminfo, size_t sep)
static int readhexaesc(LexState *ls)
const TValue * luaH_getstr(Table *t, TString *key)
int luaO_hexavalue(int c)
constexpr auto set(type rhs) -> int
static const char *const luaX_tokens[]
static void utf8esc(LexState *ls)
static size_t skip_sep(LexState *ls)
#define save_and_next(ls)
const char * luaO_pushfstring(lua_State *L, const char *fmt,...)
size_t luaO_str2num(const char *s, TValue *o)
l_noret luaD_throw(lua_State *L, int errcode)
void luaX_init(lua_State *L)
const char * luaG_addinfo(lua_State *L, const char *msg, TString *src, int line)
static l_noret lexerror(LexState *ls, const char *msg, int token)
static void save(LexState *ls, int c)
#define luaZ_buffremove(buff, i)
int luaO_utf8esc(char *buff, unsigned long x)
void luaH_finishset(lua_State *L, Table *t, const TValue *key, const TValue *slot, TValue *value)
static int llex(LexState *ls, SemInfo *seminfo)
#define luaS_newliteral(L, s)
static void inclinenumber(LexState *ls)
int luaX_lookahead(LexState *ls)
static void esccheck(LexState *ls, int c, const char *msg)
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44