My Project
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
NPL::NPLLex Class Reference

for lexer for NPL files More...

#include <NPLParser.h>

Public Types

enum  RESERVED {
  TK_AND = FIRST_RESERVED, 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
}
 

Public Member Functions

LexStateSetInput (const char *input, int nLen)
 set the input stream. More...
 
LexStateGetState ()
 

Static Public Member Functions

static int luaX_lex (LexState *LS, SemInfo *seminfo)
 
static const char * FormatString (const char *zFormat,...)
 
static void luaX_errorline (LexState *ls, const char *s, const char *token, int line)
 
static void luaX_error (LexState *ls, const char *s, const char *token)
 
static void luaX_syntaxerror (LexState *ls, const char *msg)
 
static void luaX_checklimit (LexState *ls, int val, int limit, const char *msg)
 
static void luaX_lexerror (LexState *ls, const char *s, int token)
 
static const char * luaX_token2str (LexState *ls, int token)
 

Static Public Attributes

static const int EOZ = -1
 
static const int MAX_INT = 65530
 
static const int FIRST_RESERVED = 257
 
static const int MAXNOCHECK = 5
 
static const int EXTRABUFF = 32
 
static const int TOKEN_LEN = (sizeof("function")/sizeof(char))
 
static const int NUM_RESERVED = (int)TK_WHILE-FIRST_RESERVED+1
 

Detailed Description

for lexer for NPL files

Member Function Documentation

§ SetInput()

LexState * NPLLex::SetInput ( const char *  input,
int  nLen 
)

set the input stream.

and clean up all states

Parameters
inputcode to be parsed
nLenlength of the code
Returns
the state

The documentation for this class was generated from the following files: