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

grammar_to_parser::basic_simple_non_terminal< E > Class Template Reference

#include <simple_non_terminal.h>

Inheritance diagram for grammar_to_parser::basic_simple_non_terminal< E >:

grammar_to_parser::basic_parser< E > grammar_to_parser::basic_simple_choice< E > xml_parser::basic_xml_attribute_list_parser< E > xml_parser::basic_xml_attribute_parser< E > xml_parser::basic_xml_attributes_parser< E > xml_parser::basic_xml_param_parser< E > xml_parser::basic_xml_tag_parser< E > xml_parser::basic_xml_number_attribute_parser< E, A > xml_parser::basic_xml_string_attribute_parser< E > List of all members.

Public Types

typedef basic_parser< E
>::parser_list 
parser_list
typedef basic_parser< E
>::parser_list_iterator 
parser_list_iterator

Public Member Functions

virtual void push_parsers (parser_list &l)=0
virtual void invalidate ()
 Used for owned objects manipulation, redefined in basic_object_parser.
virtual bool is_valid () const
 Used for owned objects manipulation, redefined in basic_object_parser.
unsigned long parse (const E *buf, const unsigned long buf_length)
virtual std::basic_istream<
E > & 
parse (std::basic_istream< E > &is)
virtual std::basic_ostream<
E > & 
format (std::basic_ostream< E > &os)
 Used for formatting the class to output stream.

Protected Member Functions

virtual void prepare_for_parsing ()
virtual void prepare_for_formatting ()

Protected Attributes

parser_list m_parser_list

Detailed Description

template<typename E>
class grammar_to_parser::basic_simple_non_terminal< E >

The non_terminal - always defined as set of symbols in defined order - simplified version of basic_non_terminal. Use this class when want to inherit directly and not to use the class as template parameter, so as not to use strategy - the parsing of this class is usable for regular grammars only. See xml_parser sample project. Special type is basic_simple_choice, which inherits from this class


Member Function Documentation

template<typename E>
virtual std::basic_istream<E>& grammar_to_parser::basic_simple_non_terminal< E >::parse std::basic_istream< E > &  is  )  [inline, virtual]
 

The parse method using which the input stream is searched and the value is copied from buffer into parsed objects manipulated by basic_object_parser. For parse method is used different implementation depending on type of parser - if terminal_type, non_terminal_type or choice_type

Implements grammar_to_parser::basic_parser< E >.

Reimplemented in grammar_to_parser::basic_simple_choice< E >, xml_parser::basic_xml_attribute_list_parser< E >, xml_parser::basic_xml_attribute_list_parser< wchar_t >, and xml_parser::basic_xml_attribute_list_parser< char >.

template<typename E>
unsigned long grammar_to_parser::basic_simple_non_terminal< E >::parse const E *  buf,
const unsigned long  buf_length
[inline, virtual]
 

The parse method using which the input buffer is searched and the value is copied from buffer into parsed objects manipulated by basic_object_parser. For parse method is used different implementation depending on type of parser - if terminal_type, non_terminal_type or choice_type.

Implements grammar_to_parser::basic_parser< E >.

Reimplemented in grammar_to_parser::basic_simple_choice< E >, xml_parser::basic_xml_attribute_list_parser< E >, xml_parser::basic_xml_attribute_list_parser< wchar_t >, and xml_parser::basic_xml_attribute_list_parser< char >.

template<typename E>
virtual void grammar_to_parser::basic_simple_non_terminal< E >::prepare_for_formatting  )  [inline, protected, virtual]
 

Every format() method implementation should call this (or specialized) method at the beginning of the method.

Reimplemented from grammar_to_parser::basic_parser< E >.

template<typename E>
virtual void grammar_to_parser::basic_simple_non_terminal< E >::prepare_for_parsing  )  [inline, protected, virtual]
 

Every parse() method implementation should call this (or specialized) method at the beginning of the method.

Reimplemented from grammar_to_parser::basic_parser< E >.


The documentation for this class was generated from the following file:
Generated on Sun Jul 2 18:39:47 2006 for grammar2parser.kdevelop by  doxygen 1.4.1