RetroArch
Macros | Functions | Variables
llex.c File Reference
#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"
Include dependency graph for llex.c:

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)
 
TStringluaX_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 int skip_sep (LexState *ls)
 
static void read_long_string (LexState *ls, SemInfo *seminfo, int 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 []
 

Macro Definition Documentation

◆ currIsNewline

#define currIsNewline (   ls)    (ls->current == '\n' || ls->current == '\r')

◆ llex_c

#define llex_c

◆ LUA_CORE

#define LUA_CORE

◆ next

#define next (   ls)    (ls->current = zgetc(ls->z))

◆ save_and_next

#define save_and_next (   ls)    (save(ls, ls->current), next(ls))

Function Documentation

◆ check_next1()

static int check_next1 ( LexState ls,
int  c 
)
static
Here is the caller graph for this function:

◆ check_next2()

static int check_next2 ( LexState ls,
const char *  set 
)
static
Here is the caller graph for this function:

◆ esccheck()

static void esccheck ( LexState ls,
int  c,
const char *  msg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gethexa()

static int gethexa ( LexState ls)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ inclinenumber()

static void inclinenumber ( LexState ls)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lexerror()

static l_noret lexerror ( LexState ls,
const char *  msg,
int  token 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ llex()

static int llex ( LexState ls,
SemInfo seminfo 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaX_init()

void luaX_init ( lua_State L)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaX_lookahead()

int luaX_lookahead ( LexState ls)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaX_newstring()

TString* luaX_newstring ( LexState ls,
const char *  str,
size_t  l 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaX_next()

void luaX_next ( LexState ls)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaX_setinput()

void luaX_setinput ( lua_State L,
LexState ls,
ZIO z,
TString source,
int  firstchar 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaX_syntaxerror()

l_noret luaX_syntaxerror ( LexState ls,
const char *  msg 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaX_token2str()

const char* luaX_token2str ( LexState ls,
int  token 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_long_string()

static void read_long_string ( LexState ls,
SemInfo seminfo,
int  sep 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_numeral()

static int read_numeral ( LexState ls,
SemInfo seminfo 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_string()

static void read_string ( LexState ls,
int  del,
SemInfo seminfo 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readdecesc()

static int readdecesc ( LexState ls)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readhexaesc()

static int readhexaesc ( LexState ls)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readutf8esc()

static unsigned long readutf8esc ( LexState ls)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save()

static void save ( LexState ls,
int  c 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ skip_sep()

static int skip_sep ( LexState ls)
static
Here is the caller graph for this function:

◆ txtToken()

static const char* txtToken ( LexState ls,
int  token 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ utf8esc()

static void utf8esc ( LexState ls)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ luaX_tokens

const char* const luaX_tokens[]
static
Initial value:
= {
"and", "break", "do", "else", "elseif",
"end", "false", "for", "function", "goto", "if",
"in", "local", "nil", "not", "or", "repeat",
"return", "then", "true", "until", "while",
"//", "..", "...", "==", ">=", "<=", "~=",
"<<", ">>", "::", "<eof>",
"<number>", "<integer>", "<name>", "<string>"
}