rpm  4.5
Data Structures | Macros | Typedefs | Enumerations | Functions
llex.h File Reference
#include "lobject.h"
#include "lzio.h"
Include dependency graph for llex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  SemInfo
 
struct  Token
 
struct  LexState
 

Macros

#define FIRST_RESERVED   257
 
#define TOKEN_LEN   (sizeof("function")/sizeof(char))
 
#define NUM_RESERVED   (cast(int, TK_WHILE-FIRST_RESERVED+1))
 

Typedefs

typedef struct Token Token
 
typedef struct LexState LexState
 

Enumerations

enum  RESERVED {
  TK_AND = 257, TK_BREAK, TK_DO, TK_ELSE,
  TK_ELSEIF, TK_END, TK_FALSE, TK_FOR,
  TK_FUNCTION, TK_IF, TK_IN, TK_LOCAL,
  TK_NIL, TK_NOT, TK_OR, TK_REPEAT,
  TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL,
  TK_WHILE, TK_NAME, TK_CONCAT, TK_DOTS,
  TK_EQ, TK_GE, TK_LE, TK_NE,
  TK_NUMBER, TK_STRING, TK_EOS
}
 

Functions

void luaX_init (lua_State *L)
 
void luaX_setinput (lua_State *L, LexState *LS, ZIO *z, TString *source)
 
int luaX_lex (LexState *LS, SemInfo *seminfo)
 
void luaX_checklimit (LexState *ls, int val, int limit, const char *msg)
 
void luaX_syntaxerror (LexState *ls, const char *s)
 
void luaX_errorline (LexState *ls, const char *s, const char *token, int line)
 
const char * luaX_token2str (LexState *ls, int token)
 

Macro Definition Documentation

#define FIRST_RESERVED   257

Definition at line 14 of file llex.h.

Referenced by luaX_lex(), and luaX_token2str().

#define NUM_RESERVED   (cast(int, TK_WHILE-FIRST_RESERVED+1))

Definition at line 36 of file llex.h.

Referenced by luaX_init().

#define TOKEN_LEN   (sizeof("function")/sizeof(char))

Definition at line 17 of file llex.h.

Referenced by luaX_init().

Typedef Documentation

typedef struct LexState LexState
typedef struct Token Token

Enumeration Type Documentation

enum RESERVED
Enumerator:
TK_AND 
TK_BREAK 
TK_DO 
TK_ELSE 
TK_ELSEIF 
TK_END 
TK_FALSE 
TK_FOR 
TK_FUNCTION 
TK_IF 
TK_IN 
TK_LOCAL 
TK_NIL 
TK_NOT 
TK_OR 
TK_REPEAT 
TK_RETURN 
TK_THEN 
TK_TRUE 
TK_UNTIL 
TK_WHILE 
TK_NAME 
TK_CONCAT 
TK_DOTS 
TK_EQ 
TK_GE 
TK_LE 
TK_NE 
TK_NUMBER 
TK_STRING 
TK_EOS 

Definition at line 24 of file llex.h.

Function Documentation

void luaX_checklimit ( LexState ls,
int  val,
int  limit,
const char *  msg 
)
void luaX_errorline ( LexState ls,
const char *  s,
const char *  token,
int  line 
)

Definition at line 63 of file llex.c.

References getstr, LexState::L, luaD_throw(), luaO_chunkid(), luaO_pushfstring(), MAXSRC, and LexState::source.

Referenced by luaX_error(), and prefixexp().

void luaX_init ( lua_State L)

Definition at line 41 of file llex.c.

References cast, lua_assert, luaS_fix, luaS_new, NUM_RESERVED, TString::reserved, token2string, TOKEN_LEN, and TString::tsv.

Referenced by f_luaopen().

int luaX_lex ( LexState LS,
SemInfo seminfo 
)
void luaX_setinput ( lua_State L,
LexState LS,
ZIO z,
TString source 
)
void luaX_syntaxerror ( LexState ls,
const char *  s 
)
const char* luaX_token2str ( LexState ls,
int  token 
)