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

grammar_to_parser::basic_terminal< E, value > Class Template Reference

#include <terminal.h>

Inheritance diagram for grammar_to_parser::basic_terminal< E, value >:

grammar_to_parser::basic_object_parser< E, E > grammar_to_parser::basic_parser< E > List of all members.

Public Member Functions

virtual 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)
E & get_valid ()

Private Types

typedef std::auto_ptr< E > std_auto_ptr

Detailed Description

template<typename E, E value>
class grammar_to_parser::basic_terminal< E, value >

this determines parser of type terminal_type, terminal_type is parser recognizing one specific character (value template parameter), other terminal_type parsers are usable for parsing default types (using iostream functionality) - basic_value_parser, for parsing string patterns - basic_pattern_parser, for parsing a character from the defined range - basic_ascii_range_terminal, and most powerfull (but also little bit slow) parser for parsing regular expressions - basic_regexp_parser


Member Function Documentation

template<typename E, E value>
std::basic_ostream< E > & grammar_to_parser::basic_terminal< E, value >::format std::basic_ostream< E > &  os  )  [virtual]
 

grammar_to_parser::basic_terminal::format( str::ostream& os )

Implements grammar_to_parser::basic_parser< E >.

template<typename E, E value>
E& grammar_to_parser::basic_terminal< E, value >::get_valid  )  [inline, virtual]
 

The same as auto_ptr<>::get(), additionally creates a new instance of allocated object, if NULL pointer.

Reimplemented from grammar_to_parser::basic_object_parser< E, E >.

template<typename E, E value>
std::basic_istream< E > & grammar_to_parser::basic_terminal< E, value >::parse std::basic_istream< E > &  is  )  [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 >.

template<typename E, E value>
virtual unsigned long grammar_to_parser::basic_terminal< E, value >::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 >.


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