#include <pattern_parser.h>
Inheritance diagram for grammar_to_parser::basic_pattern_parser< E >:
Public Types | |
typedef std::basic_string< E > | string_type |
Public Member Functions | |
basic_pattern_parser () | |
Default constructor. | |
basic_pattern_parser (const std::basic_string< E > &pattern, int comparison_type=IGNORE_CASE|IGNORE_SPACE) | |
basic_pattern_parser (const char *pattern, int comparison_type=IGNORE_CASE|IGNORE_SPACE) | |
~basic_pattern_parser () | |
Destructor. | |
virtual unsigned long | parse (const E *buf, const unsigned long buf_length) |
std::basic_istream< E > & | parse (std::basic_istream< E > &is) |
std::basic_string< E > | widen (const char *pattern) |
Protected Types | |
enum | comparison_type { IGNORE_SPACE = 1, IGNORE_CASE = 2 } |
Protected Attributes | |
int | comparison_type_ |
Stores the type of comparison. | |
Private Member Functions | |
bool | is_capital (const char cr) |
bool | is_space (const char cr) |
bool | compare (typename string_type::iterator &it, const E cr) |
|
Defines how pattern string will be compared with input buffer. |
|
Constructor with definition of pattern as string parameter
|
|
The method succeedes if input is same as pattern passed to constructor Implements grammar_to_parser::basic_parser< E >. |
|
The method compares the pattern, passed as constructor parameter, with string stored in input buffer.
Implements grammar_to_parser::basic_parser< E >. |