parser for NPL files.
More...
#include <NPLParser.h>
|
static bool | IsMsgData (const char *input, int nLen) |
| whether the NPL data is a msg data or not. More...
|
|
static bool | IsPureData (const char *input, int nLen) |
| it will return true if input string is "false", "true", NUMBER, STRING, and {table}
|
|
static bool | IsPureTable (const char *input, int nLen) |
| it will return true if input string is a {table} containing only "false", "true", NUMBER, STRING, and other such {table}
|
|
static bool | CheckPureDataBlock (LexState *ls) |
| it consumes, "false", "true", NUMBER, STRING, and {table} More...
|
|
static bool | IsIdentifier (const char *str, int nLength) |
| whether the string is an identifier. More...
|
|
static void | enterlevel (LexState *ls) |
|
static void | leavelevel (LexState *ls) |
|
static void | next (LexState *ls) |
|
static void | lookahead (LexState *ls) |
|
static void | error_expected (LexState *ls, int token) |
|
static int | testnext (LexState *ls, int c) |
|
static void | check (LexState *ls, int c) |
|
static void | check_condition (LexState *ls, void *c, const char *msg) |
|
static void | check_match (LexState *ls, int what, int who, int where) |
|
|
static const int | LUA_MAXPARSERLEVEL = 200 |
|
parser for NPL files.
Internally it uses NPLLexer
§ CheckPureDataBlock()
bool NPLParser::CheckPureDataBlock |
( |
LexState * |
ls | ) |
|
|
static |
it consumes, "false", "true", NUMBER, STRING, and {table}
Fixed: 2008.6.3 LiXizhi the following is for auto indexed table items {"string1", "string2\r\n", 213, nil,["A"]="B", true, false, {"another table", "field1"}}
§ IsIdentifier()
bool NPLParser::IsIdentifier |
( |
const char * |
str, |
|
|
int |
nLength |
|
) |
| |
|
static |
whether the string is an identifier.
Identifiers in npl can be any string of letters, digits, and underscores, not beginning with a digit. This coincides with the definition of identifiers in most languages. (The definition of letter depends on the current locale: any character considered alphabetic by the current locale can be used in an identifier.)
- Parameters
-
str | string |
nLength | it must be a valid length. |
§ IsMsgData()
bool NPLParser::IsMsgData |
( |
const char * |
input, |
|
|
int |
nLen |
|
) |
| |
|
static |
whether the NPL data is a msg data or not.
msg data is a pure data or data table that is usually received via network.
- Parameters
-
input | code to be parsed |
nLen | length of the code |
- Returns
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/NPL/NPLParser.h
- Client/trunk/ParaEngineClient/NPL/NPLParser.cpp