#include <tokenlist.h>
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
TinyXPath::token_list::token_list | ( | ) | [inline] |
constructor
References TinyXPath::lex_null, ltp_current, ltp_first, and ltp_last.
virtual TinyXPath::token_list::~token_list | ( | ) | [inline, virtual] |
destructor
References ltp_current, ltp_first, and v_delete_current().
void TinyXPath::token_list::v_set_current_top | ( | ) | [inline] |
Set current to first real element.
References ltp_current, and ltp_first.
Referenced by TinyXPath::token_syntax_decoder::v_syntax_decode(), and v_tokenize_expression().
void TinyXPath::token_list::v_set_current | ( | lex_token * | ltp_cur | ) | [inline] |
Set current.
References ltp_current.
Referenced by TinyXPath::token_syntax_decoder::o_recognize().
lex_token* TinyXPath::token_list::ltp_freeze | ( | ) | [inline] |
Return the current token.
References ltp_current.
lex_token* TinyXPath::token_list::ltp_get | ( | int | i_offset | ) | [inline] |
Get next X linear token.
References ltp_current.
Referenced by TinyXPath::token_syntax_decoder::o_recognize(), TinyXPath::token_syntax_decoder::v_syntax_decode(), and v_tokenize_expression().
void TinyXPath::token_list::v_inc_current | ( | int | i_rel | ) | [inline] |
Increments the linear counter.
References ltp_current.
Referenced by TinyXPath::token_syntax_decoder::o_recognize(), and v_tokenize_expression().
void TinyXPath::token_list::v_replace_current | ( | lexico | lex_in, | |
const char * | cp_rep | |||
) | [inline] |
Replaces the current element.
References ltp_current.
Referenced by v_tokenize_expression().
void TinyXPath::token_list::v_delete_current | ( | ) | [inline] |
Deletes the current element.
References ltp_current.
Referenced by v_tokenize_expression(), and ~token_list().
void TinyXPath::token_list::v_delete_next | ( | ) | [inline] |
Deletes the next element.
References ltp_current.
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 TinyXPath::token_syntax_decoder::v_syntax_decode().
lex_token* TinyXPath::token_list::ltp_first [protected] |
Pointer to first element.
Referenced by token_list(), v_add_token(), v_set_current_top(), and ~token_list().
lex_token* TinyXPath::token_list::ltp_last [protected] |
Pointer to last element.
Referenced by token_list(), and v_add_token().
lex_token* TinyXPath::token_list::ltp_current [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(), ltp_get(), token_list(), v_delete_current(), v_delete_next(), v_inc_current(), v_replace_current(), v_set_current(), v_set_current_top(), and ~token_list().