Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <locale.h>
#include <string.h>
#include "lua.h"
#include "lctype.h"
#include "ldebug.h"
#include "ldo.h"
#include "lgc.h"
#include "llex.h"
#include "lobject.h"
#include "lparser.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "lzio.h"
Go to the source code of this file.
Macros | |
#define | llex_c |
#define | LUA_CORE |
#define | next(ls) (ls->current = zgetc(ls->z)) |
#define | currIsNewline(ls) (ls->current == '\n' || ls->current == '\r') |
#define | save_and_next(ls) (save(ls, ls->current), next(ls)) |
Functions | |
static l_noret | lexerror (LexState *ls, const char *msg, int token) |
static void | save (LexState *ls, int c) |
void | luaX_init (lua_State *L) |
const char * | luaX_token2str (LexState *ls, int token) |
static const char * | txtToken (LexState *ls, int token) |
l_noret | luaX_syntaxerror (LexState *ls, const char *msg) |
TString * | luaX_newstring (LexState *ls, const char *str, size_t l) |
static void | inclinenumber (LexState *ls) |
void | luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source, int firstchar) |
static int | check_next1 (LexState *ls, int c) |
static int | check_next2 (LexState *ls, const char *set) |
static int | read_numeral (LexState *ls, SemInfo *seminfo) |
static size_t | skip_sep (LexState *ls) |
static void | read_long_string (LexState *ls, SemInfo *seminfo, size_t sep) |
static void | esccheck (LexState *ls, int c, const char *msg) |
static int | gethexa (LexState *ls) |
static int | readhexaesc (LexState *ls) |
static unsigned long | readutf8esc (LexState *ls) |
static void | utf8esc (LexState *ls) |
static int | readdecesc (LexState *ls) |
static void | read_string (LexState *ls, int del, SemInfo *seminfo) |
static int | llex (LexState *ls, SemInfo *seminfo) |
void | luaX_next (LexState *ls) |
int | luaX_lookahead (LexState *ls) |
Variables | |
static const char *const | luaX_tokens [] |
#define currIsNewline | ( | ls | ) | (ls->current == '\n' || ls->current == '\r') |
Definition at line 36 of file lua-5.4.3/src/llex.c.
Referenced by inclinenumber(), llex(), read_long_string(), and read_string().
#define llex_c |
Definition at line 7 of file lua-5.4.3/src/llex.c.
#define LUA_CORE |
Definition at line 8 of file lua-5.4.3/src/llex.c.
#define next | ( | ls | ) | (ls->current = zgetc(ls->z)) |
Definition at line 32 of file lua-5.4.3/src/llex.c.
Referenced by check_next1(), inclinenumber(), llex(), read_long_string(), read_string(), and readutf8esc().
Definition at line 51 of file lua-5.4.3/src/llex.c.
Referenced by check_next2(), esccheck(), gethexa(), llex(), read_long_string(), read_numeral(), read_string(), readdecesc(), readutf8esc(), and skip_sep().
|
static |
Definition at line 191 of file lua-5.4.3/src/llex.c.
References LexState::current, and next.
Referenced by llex().
|
static |
Definition at line 204 of file lua-5.4.3/src/llex.c.
References LexState::current, lua_assert, and save_and_next.
Referenced by read_numeral().
|
static |
Definition at line 319 of file lua-5.4.3/src/llex.c.
References LexState::current, EOZ, lexerror(), save_and_next, and TK_STRING.
Referenced by gethexa(), read_string(), readdecesc(), and readutf8esc().
|
static |
Definition at line 328 of file lua-5.4.3/src/llex.c.
References LexState::current, esccheck(), lisxdigit, luaO_hexavalue(), and save_and_next.
Referenced by readhexaesc(), and readutf8esc().
|
static |
Definition at line 156 of file lua-5.4.3/src/llex.c.
References LexState::current, currIsNewline, lexerror(), LexState::linenumber, lua_assert, MAX_INT, and next.
Referenced by llex(), read_long_string(), and read_string().
Definition at line 111 of file lua-5.4.3/src/llex.c.
References LexState::L, LexState::linenumber, LUA_ERRSYNTAX, luaD_throw(), luaG_addinfo(), luaO_pushfstring(), LexState::source, and txtToken().
Referenced by esccheck(), inclinenumber(), llex(), luaX_syntaxerror(), read_long_string(), read_numeral(), read_string(), and save().
Definition at line 445 of file lua-5.4.3/src/llex.c.
References LexState::buff, check_next1(), LexState::current, currIsNewline, EOZ, TString::extra, FIRST_RESERVED, inclinenumber(), isreserved, lexerror(), lisdigit, lislalnum, lislalpha, luaX_newstring(), luaZ_buffer, luaZ_bufflen, luaZ_resetbuffer, next, NULL, read_long_string(), read_numeral(), read_string(), save_and_next, skip_sep(), TK_CONCAT, TK_DBCOLON, TK_DOTS, TK_EOS, TK_EQ, TK_GE, TK_IDIV, TK_LE, TK_NAME, TK_NE, TK_SHL, TK_SHR, TK_STRING, and SemInfo::ts.
Referenced by luaX_lookahead(), and luaX_next().
void luaX_init | ( | lua_State * | L | ) |
Definition at line 70 of file lua-5.4.3/src/llex.c.
References cast_byte, TString::extra, LUA_ENV, luaC_fix(), luaS_new, luaS_newliteral, luaX_tokens, NUM_RESERVED, and obj2gco.
int luaX_lookahead | ( | LexState * | ls | ) |
Definition at line 576 of file lua-5.4.3/src/llex.c.
References llex(), LexState::lookahead, lua_assert, Token::seminfo, TK_EOS, and Token::token.
Definition at line 134 of file lua-5.4.3/src/llex.c.
References LexState::h, keystrval, LexState::L, luaC_checkGC, luaH_finishset(), luaH_getstr(), luaS_newlstr(), nodefromval, s2v, setsvalue, lua_State::top, and ttisnil.
Referenced by llex(), read_long_string(), and read_string().
void luaX_next | ( | LexState * | ls | ) |
Definition at line 565 of file lua-5.4.3/src/llex.c.
References LexState::lastline, LexState::linenumber, llex(), LexState::lookahead, Token::seminfo, LexState::t, TK_EOS, and Token::token.
Definition at line 167 of file lua-5.4.3/src/llex.c.
References LexState::buff, LexState::current, LexState::envn, LexState::fs, LexState::L, LexState::lastline, LexState::linenumber, LexState::lookahead, LUA_ENV, LUA_MINBUFFER, luaS_newliteral, luaZ_resizebuffer, NULL, LexState::source, LexState::t, TK_EOS, Token::token, and LexState::z.
Definition at line 119 of file lua-5.4.3/src/llex.c.
References lexerror(), LexState::t, and Token::token.
const char * luaX_token2str | ( | LexState * | ls, |
int | token ) |
Definition at line 82 of file lua-5.4.3/src/llex.c.
References FIRST_RESERVED, LexState::L, lisprint, luaO_pushfstring(), luaX_tokens, s, and TK_EOS.
Referenced by txtToken().
Definition at line 280 of file lua-5.4.3/src/llex.c.
References LexState::buff, LexState::current, currIsNewline, EOZ, inclinenumber(), LexState::L, lexerror(), LexState::linenumber, luaO_pushfstring(), luaX_newstring(), luaZ_buffer, luaZ_bufflen, luaZ_resetbuffer, next, save(), save_and_next, skip_sep(), TK_EOS, and SemInfo::ts.
Referenced by llex().
Definition at line 227 of file lua-5.4.3/src/llex.c.
References LexState::buff, check_next2(), LexState::current, fltvalue, SemInfo::i, ivalue, lexerror(), lisdigit, lislalpha, lisxdigit, lua_assert, luaO_str2num(), luaZ_buffer, SemInfo::r, save(), save_and_next, TK_FLT, TK_INT, ttisfloat, and ttisinteger.
Referenced by llex().
Definition at line 382 of file lua-5.4.3/src/llex.c.
References LexState::buff, LexState::current, currIsNewline, EOZ, esccheck(), inclinenumber(), lexerror(), lisdigit, lisspace, luaX_newstring(), luaZ_buffer, luaZ_bufflen, luaZ_buffremove, next, readdecesc(), readhexaesc(), save(), save_and_next, TK_EOS, TK_STRING, SemInfo::ts, and utf8esc().
Referenced by llex().
|
static |
Definition at line 369 of file lua-5.4.3/src/llex.c.
References LexState::buff, LexState::current, esccheck(), lisdigit, luaZ_buffremove, and save_and_next.
Referenced by read_string().
|
static |
Definition at line 335 of file lua-5.4.3/src/llex.c.
References LexState::buff, gethexa(), and luaZ_buffremove.
Referenced by read_string().
|
static |
Definition at line 343 of file lua-5.4.3/src/llex.c.
References LexState::buff, cast_void, LexState::current, esccheck(), gethexa(), lisxdigit, luaO_hexavalue(), luaZ_buffremove, next, and save_and_next.
Referenced by utf8esc().
|
static |
Definition at line 57 of file lua-5.4.3/src/llex.c.
References LexState::buff, Mbuffer::buffer, cast_char, LexState::L, lexerror(), luaZ_bufflen, luaZ_resizebuffer, luaZ_sizebuffer, and MAX_SIZE.
Referenced by read_long_string(), read_numeral(), read_string(), txtToken(), and utf8esc().
|
static |
Definition at line 265 of file lua-5.4.3/src/llex.c.
References LexState::current, lua_assert, s, and save_and_next.
Referenced by llex(), and read_long_string().
|
static |
Definition at line 99 of file lua-5.4.3/src/llex.c.
References LexState::buff, LexState::L, luaO_pushfstring(), luaX_token2str(), luaZ_buffer, save(), TK_FLT, TK_INT, TK_NAME, and TK_STRING.
Referenced by lexerror().
|
static |
Definition at line 361 of file lua-5.4.3/src/llex.c.
References luaO_utf8esc(), readutf8esc(), save(), and UTF8BUFFSZ.
Referenced by read_string().
|
static |
Definition at line 40 of file lua-5.4.3/src/llex.c.
Referenced by luaX_init(), and luaX_token2str().