lua/llex.h File Reference

#include "lobject.h"
#include "lzio.h"

Go to the source code of this file.

Data Structures

union  SemInfo
struct  Token
struct  LexState

Defines

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

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)


Define 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().


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 
)


Generated on Fri Dec 12 13:02:11 2008 for rpm by  doxygen 1.5.6