| struct yajl_lexer_t | |
| { | |
| size_t lineOff; | the current line count |
| size_t charOff; | |
| yajl_lex_error error; | error |
| yajl_buf buf; | a input buffer to handle the case where a token is spread over multiple chunks |
| size_t bufOff; | in the case where we have data in the lexBuf, bufOff holds the current offset into the lexBuf. |
| int bufInUse; | are we using the lex buf? |
| int allowComments; | shall we allow comments? |
| int validateUTF8; | shall we validate utf8 inside strings? |
| yajl_alloc_funcs* alloc; | |
| } |
static const char charLookupTable[256]
| Used in: | yajl_lex_string() | |
| yajl_string_scan() |
yajl_lexer yajl_lex_alloc ( yajl_alloc_funcs* alloc, int allowComments, int validateUTF8 )
| Prototyped in: | src/yajl_lex.h | |
| Calls: | yajl_buf_alloc() | src/yajl_buf.c |
| memset() | ||
| Called by: | yajl_complete_parse() | src/yajl.c |
| yajl_parse() | src/yajl.c | |
size_t yajl_lex_current_char ( yajl_lexer lexer )
| Prototyped in: | src/yajl_lex.h | |
size_t yajl_lex_current_line ( yajl_lexer lexer )
| Prototyped in: | src/yajl_lex.h | |
const char* yajl_lex_error_to_string ( yajl_lex_error error )
| Prototyped in: | src/yajl_lex.h | |
| Called by: | yajl_render_error_string() | src/yajl_parser.c |
void yajl_lex_free ( yajl_lexer lxr )
| Prototyped in: | src/yajl_lex.h | |
| Calls: | yajl_buf_free() | src/yajl_buf.c |
| Called by: | yajl_free() | src/yajl.c |
yajl_lex_error yajl_lex_get_error ( yajl_lexer lexer )
| Prototyped in: | src/yajl_lex.h | |
| Called by: | yajl_render_error_string() | src/yajl_parser.c |
| Prototyped in: | src/yajl_lex.h | |
| Calls: | yajl_buf_len() | src/yajl_buf.c |
| yajl_buf_truncate() | src/yajl_buf.c | |
| yajl_lex_lex() | src/yajl_lex.c | |
| Calls: | yajl_buf_data() | src/yajl_buf.c |
| yajl_buf_len() | src/yajl_buf.c | |
| Called by: | yajl_lex_lex() | src/yajl_lex.c |
| Calls: | yajl_buf_data() | src/yajl_buf.c |
| yajl_buf_len() | src/yajl_buf.c | |
| Called by: | yajl_lex_lex() | src/yajl_lex.c |
| Calls: | yajl_buf_data() | src/yajl_buf.c |
| yajl_buf_len() | src/yajl_buf.c | |
| yajl_lex_utf8_char() | src/yajl_lex.c | |
| yajl_string_scan() | src/yajl_lex.c | |
| Called by: | yajl_lex_lex() | src/yajl_lex.c |
| References Variables: | charLookupTable | src/yajl_lex.c |
static yajl_tok yajl_lex_utf8_char ( yajl_lexer lexer, const unsigned char* jsonText, size_t jsonTextLen, size_t* offset, unsigned int curChar )
returns:
yajl_tok_string - if valid utf8 char was parsed and offset was
advanced
yajl_tok_eof - if end of input was hit before validation could
complete
yajl_tok_error - if invalid utf8 was encountered
NOTE: on error the offset will point to the first char of the
invalid utf8
| Calls: | yajl_buf_data() | src/yajl_buf.c |
| yajl_buf_len() | src/yajl_buf.c | |
| Called by: | yajl_lex_string() | src/yajl_lex.c |
static size_t yajl_string_scan ( const unsigned char* buf, size_t len, int utf8check )
returns the number of chars that are uninteresting and can be skipped.
(lth) hi world, any thoughts on how to make this routine faster?
| Called by: | yajl_lex_string() | src/yajl_lex.c |
| References Variables: | charLookupTable | src/yajl_lex.c |