ddc
|
#include <tokenlist.h>
Public Member Functions | |
token_list () | |
constructor More... | |
virtual | ~ token_list () |
destructor More... | |
void | v_add_token (lexico l_in_enum, const _byte_ *bp_in_value, unsigned u_in_size) |
Adds a lexical token. More... | |
void | v_set_current_top () |
Set current to first real element. More... | |
void | v_set_current (lex_token *ltp_cur) |
Set current. More... | |
lex_token * | ltp_freeze () |
Return the current token. More... | |
lex_token * | ltp_get (int i_offset) |
Get next X linear token. More... | |
void | v_inc_current (int i_rel) |
Increments the linear counter. More... | |
void | v_replace_current (lexico lex_in, const char *cp_rep) |
Replaces the current element. More... | |
void | v_delete_current () |
Deletes the current element. More... | |
void | v_delete_next () |
Deletes the next element. More... | |
void | v_tokenize_expression () |
Protected Attributes | |
lex_token * | ltp_first |
Pointer to first element. More... | |
lex_token * | ltp_last |
Pointer to last element. More... | |
lex_token * | ltp_current |
A token list class. This is the output of the lexical analysis
Note that the empty list consist of a single null element in order to speed up later insertions
|
inline |
constructor
References TinyXPath::lex_null, and ltp_first.
|
inlinevirtual |
|
inline |
Adds a lexical token.
|
inline |
Set current to first real element.
Referenced by TinyXPath::token_syntax_decoder::v_syntax_decode(), and v_tokenize_expression().
|
inline |
Set current.
Referenced by TinyXPath::token_syntax_decoder::o_recognize().
|
inline |
Return the current token.
References ltp_current.
Referenced by TinyXPath::token_syntax_decoder::o_recognize().
|
inline |
Get next X linear token.
Referenced by TinyXPath::token_syntax_decoder::o_recognize(), TinyXPath::token_syntax_decoder::v_syntax_decode(), and v_tokenize_expression().
|
inline |
Increments the linear counter.
Referenced by TinyXPath::token_syntax_decoder::o_recognize(), and v_tokenize_expression().
|
inline |
Replaces the current element.
Referenced by v_tokenize_expression().
|
inline |
Deletes the current element.
References ltp_current.
Referenced by v_tokenize_expression(), and ~ token_list().
|
inline |
Deletes the next element.
References v_tokenize_expression().
Referenced by v_tokenize_expression().
void TinyXPath::token_list::v_tokenize_expression | ( | ) |
Decodes an XPath expression, further manipulating a token list
On input, we have a list of basic lexical tokens. We only merge here the multiple tokens : like '::' or '!='. We also delete whitespace tokens
References TinyXPath::lex_2_colon, TinyXPath::lex_2_dot, TinyXPath::lex_2_slash, TinyXPath::lex_colon, TinyXPath::lex_dot, TinyXPath::lex_equal, TinyXPath::lex_exclam, TinyXPath::lex_gt, TinyXPath::lex_gt_equal, TinyXPath::lex_lt, TinyXPath::lex_lt_equal, TinyXPath::lex_not_equal, TinyXPath::lex_slash, TinyXPath::lex_space, ltp_get(), v_delete_current(), v_delete_next(), v_inc_current(), v_replace_current(), and v_set_current_top().
Referenced by v_delete_next(), and TinyXPath::token_syntax_decoder::v_syntax_decode().
|
protected |
Pointer to first element.
Referenced by token_list(), and ~ token_list().
|
protected |
Pointer to last element.
|
protected |
Pointer to current element. This is for external usage : we keep track of where it is, but it's not needed to manage the list structure
Referenced by ltp_freeze(), and v_delete_current().