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:

Go to the source code of this file.

Macros

#define currIsNewline(ls)   (ls->current == '\n' || ls->current == '\r')
 
#define llex_c
 
#define LUA_CORE
 
#define next(ls)   (ls->current = zgetc(ls->z))
 
#define save_and_next(ls)   (save(ls, ls->current), next(ls))
 

Functions

static int check_next1 (LexState *ls, int c)
 
static int check_next2 (LexState *ls, const char *set)
 
static void esccheck (LexState *ls, int c, const char *msg)
 
static int gethexa (LexState *ls)
 
static void inclinenumber (LexState *ls)
 
static l_noret lexerror (LexState *ls, const char *msg, int token)
 
static int llex (LexState *ls, SemInfo *seminfo)
 
void luaX_init (lua_State *L)
 
int luaX_lookahead (LexState *ls)
 
TStringluaX_newstring (LexState *ls, const char *str, size_t l)
 
void luaX_next (LexState *ls)
 
void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source, int firstchar)
 
l_noret luaX_syntaxerror (LexState *ls, const char *msg)
 
const char * luaX_token2str (LexState *ls, int token)
 
static void read_long_string (LexState *ls, SemInfo *seminfo, size_t sep)
 
static int read_numeral (LexState *ls, SemInfo *seminfo)
 
static void read_string (LexState *ls, int del, SemInfo *seminfo)
 
static int readdecesc (LexState *ls)
 
static int readhexaesc (LexState *ls)
 
static unsigned long readutf8esc (LexState *ls)
 
static void save (LexState *ls, int c)
 
static size_t skip_sep (LexState *ls)
 
static const char * txtToken (LexState *ls, int token)
 
static void utf8esc (LexState *ls)
 

Variables

static const char *const luaX_tokens []
 

Macro Definition Documentation

◆ currIsNewline

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

Definition at line 36 of file llex.c.

◆ llex_c

#define llex_c

Definition at line 7 of file llex.c.

◆ LUA_CORE

#define LUA_CORE

Definition at line 8 of file llex.c.

◆ next

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

Definition at line 32 of file llex.c.

◆ save_and_next

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

Definition at line 51 of file llex.c.

Function Documentation

◆ check_next1()

static int check_next1 ( LexState ls,
int  c 
)
static

Definition at line 191 of file llex.c.

◆ check_next2()

static int check_next2 ( LexState ls,
const char *  set 
)
static

Definition at line 204 of file llex.c.

◆ esccheck()

static void esccheck ( LexState ls,
int  c,
const char *  msg 
)
static

Definition at line 319 of file llex.c.

◆ gethexa()

static int gethexa ( LexState ls)
static

Definition at line 328 of file llex.c.

◆ inclinenumber()

static void inclinenumber ( LexState ls)
static

Definition at line 156 of file llex.c.

◆ lexerror()

static l_noret lexerror ( LexState ls,
const char *  msg,
int  token 
)
static

Definition at line 111 of file llex.c.

◆ llex()

static int llex ( LexState ls,
SemInfo seminfo 
)
static

Definition at line 445 of file llex.c.

◆ luaX_init()

void luaX_init ( lua_State L)

Definition at line 70 of file llex.c.

◆ luaX_lookahead()

int luaX_lookahead ( LexState ls)

Definition at line 576 of file llex.c.

◆ luaX_newstring()

TString* luaX_newstring ( LexState ls,
const char *  str,
size_t  l 
)

Definition at line 134 of file llex.c.

◆ luaX_next()

void luaX_next ( LexState ls)

Definition at line 565 of file llex.c.

◆ luaX_setinput()

void luaX_setinput ( lua_State L,
LexState ls,
ZIO z,
TString source,
int  firstchar 
)

Definition at line 167 of file llex.c.

◆ luaX_syntaxerror()

l_noret luaX_syntaxerror ( LexState ls,
const char *  msg 
)

Definition at line 119 of file llex.c.

◆ luaX_token2str()

const char* luaX_token2str ( LexState ls,
int  token 
)

Definition at line 82 of file llex.c.

◆ read_long_string()

static void read_long_string ( LexState ls,
SemInfo seminfo,
size_t  sep 
)
static

Definition at line 280 of file llex.c.

◆ read_numeral()

static int read_numeral ( LexState ls,
SemInfo seminfo 
)
static

Definition at line 227 of file llex.c.

◆ read_string()

static void read_string ( LexState ls,
int  del,
SemInfo seminfo 
)
static

Definition at line 382 of file llex.c.

◆ readdecesc()

static int readdecesc ( LexState ls)
static

Definition at line 369 of file llex.c.

◆ readhexaesc()

static int readhexaesc ( LexState ls)
static

Definition at line 335 of file llex.c.

◆ readutf8esc()

static unsigned long readutf8esc ( LexState ls)
static

Definition at line 343 of file llex.c.

◆ save()

static void save ( LexState ls,
int  c 
)
static

Definition at line 57 of file llex.c.

◆ skip_sep()

static size_t skip_sep ( LexState ls)
static

Definition at line 265 of file llex.c.

◆ txtToken()

static const char* txtToken ( LexState ls,
int  token 
)
static

Definition at line 99 of file llex.c.

◆ utf8esc()

static void utf8esc ( LexState ls)
static

Definition at line 361 of file llex.c.

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>"
}

Definition at line 40 of file llex.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:27