Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

parser Struct Template Reference

#include <xml_parser.h>

List of all members.


Detailed Description

template<typename UniverseT>
struct parser< UniverseT >

Parser class for CTTL XML stream parser sample.

UniverseT
Template parameter specifying type of the parseable universe. Can be either cttl::const_edge or cttl::edge.
The parser implements error handlers and semantic actions that populate abstract syntax tree for xml input.

Definition at line 46 of file xml_parser.h.

Public Types

typedef UniverseT universe_T
 Defines type of parseable universe.
typedef UniverseT::strict_edge_T strict_universe_T
 Defines strict universe type.
typedef UniverseT::node_T node_T
 Defines strict universe type.
typedef UniverseT::char_T char_T
 Defines chracter type in use by the parser.

Public Member Functions

 parser ()
 Constructs and initializes the object.
void error_show (universe_T &universe_, char_T const *message_)
 Displays information about syntax error encountered by lexer.
size_t error_parser_failed (universe_T &universe_)
 Error handler for generic parser error.
size_t error_bad_pi (universe_T &universe_)
 Error handler for bad xml processing instruction format.
size_t error_missing_close_element (universe_T &universe_)
 Error handler for missing closing tag of the xml element.
size_t error_missing_pi_close (universe_T &universe_)
 Error handler for missing closing unit of the processing instruction.
size_t error_missing_comment_close (universe_T &universe_)
 Error handler for missing closing unit of the xml comment.
size_t error_bad_attr_format (universe_T &universe_)
 Error handler for bad xml attribute format.

Public Attributes

std::vector< std::string > vect_xml_names
 Defines identity vector type.
std::map< std::string, size_t > map_xml_names
 Symbol table that stores names of xml elements and attributes.
std::vector< std::string > vect_xml_text
 Container that stores text of xml elements and values of xml attributes.
std::stack< size_t > xml_offset_stack
 Stack of input offsets used by syntax error reporting of nested xml elements.
std::vector< int > vect_xml_tree
 The parse tree.


Member Typedef Documentation

typedef UniverseT::char_T char_T
 

Defines chracter type in use by the parser.

Definition at line 58 of file xml_parser.h.

typedef UniverseT::node_T node_T
 

Defines strict universe type.

Definition at line 55 of file xml_parser.h.

typedef UniverseT::strict_edge_T strict_universe_T
 

Defines strict universe type.

Definition at line 52 of file xml_parser.h.

typedef UniverseT universe_T
 

Defines type of parseable universe.

Definition at line 49 of file xml_parser.h.


Constructor & Destructor Documentation

parser  )  [inline]
 

Constructs and initializes the object.

Definition at line 79 of file xml_parser.h.


Member Function Documentation

size_t error_bad_attr_format universe_T universe_  )  [inline]
 

Error handler for bad xml attribute format.

Definition at line 171 of file xml_parser.h.

size_t error_bad_pi universe_T universe_  )  [inline]
 

Error handler for bad xml processing instruction format.

Definition at line 131 of file xml_parser.h.

size_t error_missing_close_element universe_T universe_  )  [inline]
 

Error handler for missing closing tag of the xml element.

Definition at line 141 of file xml_parser.h.

size_t error_missing_comment_close universe_T universe_  )  [inline]
 

Error handler for missing closing unit of the xml comment.

Definition at line 161 of file xml_parser.h.

size_t error_missing_pi_close universe_T universe_  )  [inline]
 

Error handler for missing closing unit of the processing instruction.

Definition at line 151 of file xml_parser.h.

size_t error_parser_failed universe_T universe_  )  [inline]
 

Error handler for generic parser error.

Definition at line 121 of file xml_parser.h.

void error_show universe_T universe_,
char_T const *  message_
[inline]
 

Displays information about syntax error encountered by lexer.

Definition at line 88 of file xml_parser.h.


Member Data Documentation

std::map< std::string, size_t > map_xml_names
 

Symbol table that stores names of xml elements and attributes.

Definition at line 64 of file xml_parser.h.

std::vector< std::string > vect_xml_names
 

Defines identity vector type.

Definition at line 61 of file xml_parser.h.

std::vector< std::string > vect_xml_text
 

Container that stores text of xml elements and values of xml attributes.

Definition at line 70 of file xml_parser.h.

std::vector< int > vect_xml_tree
 

The parse tree.

Definition at line 76 of file xml_parser.h.

std::stack< size_t > xml_offset_stack
 

Stack of input offsets used by syntax error reporting of nested xml elements.

Definition at line 73 of file xml_parser.h.


The documentation for this struct was generated from the following file:
Generated on Thu Nov 2 17:43:31 2006 for CTTL XML stream parser sample by  doxygen 1.3.9.1