ddc
Public Member Functions | Protected Attributes | List of all members
TinyXPath::token_list Class Reference

#include <tokenlist.h>

Inheritance diagram for TinyXPath::token_list:
Inheritance graph
[legend]
Collaboration diagram for TinyXPath::token_list:
Collaboration graph
[legend]

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_tokenltp_freeze ()
 Return the current token. More...
 
lex_tokenltp_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_tokenltp_first
 Pointer to first element. More...
 
lex_tokenltp_last
 Pointer to last element. More...
 
lex_tokenltp_current
 

Detailed Description

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

Constructor & Destructor Documentation

◆ token_list()

TinyXPath::token_list::token_list ( )
inline

constructor

References TinyXPath::lex_null, and ltp_first.

◆ ~ token_list()

virtual TinyXPath::token_list::~ token_list ( )
inlinevirtual

destructor

References ltp_first, and v_delete_current().

Here is the call graph for this function:

Member Function Documentation

◆ v_add_token()

void TinyXPath::token_list::v_add_token ( lexico  l_in_enum,
const _byte_ bp_in_value,
unsigned  u_in_size 
)
inline

Adds a lexical token.

◆ v_set_current_top()

void TinyXPath::token_list::v_set_current_top ( )
inline

Set current to first real element.

Referenced by TinyXPath::token_syntax_decoder::v_syntax_decode(), and v_tokenize_expression().

Here is the caller graph for this function:

◆ v_set_current()

void TinyXPath::token_list::v_set_current ( lex_token ltp_cur)
inline

Set current.

Referenced by TinyXPath::token_syntax_decoder::o_recognize().

Here is the caller graph for this function:

◆ ltp_freeze()

lex_token* TinyXPath::token_list::ltp_freeze ( )
inline

Return the current token.

References ltp_current.

Referenced by TinyXPath::token_syntax_decoder::o_recognize().

Here is the caller graph for this function:

◆ ltp_get()

lex_token* TinyXPath::token_list::ltp_get ( int  i_offset)
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().

Here is the caller graph for this function:

◆ v_inc_current()

void TinyXPath::token_list::v_inc_current ( int  i_rel)
inline

Increments the linear counter.

Referenced by TinyXPath::token_syntax_decoder::o_recognize(), and v_tokenize_expression().

Here is the caller graph for this function:

◆ v_replace_current()

void TinyXPath::token_list::v_replace_current ( lexico  lex_in,
const char *  cp_rep 
)
inline

Replaces the current element.

Referenced by v_tokenize_expression().

Here is the caller graph for this function:

◆ v_delete_current()

void TinyXPath::token_list::v_delete_current ( )
inline

Deletes the current element.

References ltp_current.

Referenced by v_tokenize_expression(), and ~ token_list().

Here is the caller graph for this function:

◆ v_delete_next()

void TinyXPath::token_list::v_delete_next ( )
inline

Deletes the next element.

References v_tokenize_expression().

Referenced by v_tokenize_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ltp_first

lex_token* TinyXPath::token_list::ltp_first
protected

Pointer to first element.

Referenced by token_list(), and ~ token_list().

◆ ltp_last

lex_token* TinyXPath::token_list::ltp_last
protected

Pointer to last element.

◆ ltp_current

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(), and v_delete_current().


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