#include <pcre_scanner.h>
Public Member Functions | |
| Scanner () | |
| Scanner (const std::string &input) | |
| ~Scanner () | |
| int | LineNumber () const |
| int | Offset () const |
| bool | LookingAt (const RE &re) const |
| bool | Consume (const RE &re, const Arg &arg0=RE::no_arg, const Arg &arg1=RE::no_arg, const Arg &arg2=RE::no_arg) |
| void | Skip (const char *re) |
| void | SetSkipExpression (const char *re) |
| void | DisableSkip () |
| void | EnableSkip () |
| void | SkipCXXComments () |
| void | set_save_comments (bool comments) |
| bool | save_comments () |
| void | GetComments (int start, int end, std::vector< StringPiece > *ranges) |
| void | GetNextComments (std::vector< StringPiece > *ranges) |
Private Member Functions | |
| void | ConsumeSkip () |
Private Attributes | |
| std::string | data_ |
| StringPiece | input_ |
| RE * | skip_ |
| bool | should_skip_ |
| bool | skip_repeat_ |
| bool | save_comments_ |
| std::vector< StringPiece > * | comments_ |
| int | comments_offset_ |
Definition at line 56 of file pcre_scanner.h.
| pcrecpp::Scanner::Scanner | ( | ) |
Definition at line 46 of file pcre_scanner.cc.
| pcrecpp::Scanner::Scanner | ( | const std::string & | input | ) | [explicit] |
| pcrecpp::Scanner::~Scanner | ( | ) |
| int pcrecpp::Scanner::LineNumber | ( | ) | const |
Definition at line 112 of file pcre_scanner.cc.
References pcrecpp::StringPiece::data(), data_, input_, and p.
| int pcrecpp::Scanner::Offset | ( | ) | const |
Definition at line 123 of file pcre_scanner.cc.
References pcrecpp::StringPiece::data(), data_, and input_.
| bool pcrecpp::Scanner::LookingAt | ( | const RE & | re | ) | const |
Definition at line 127 of file pcre_scanner.cc.
References pcrecpp::RE::ANCHOR_START, pcrecpp::RE::DoMatch(), and input_.
| bool pcrecpp::Scanner::Consume | ( | const RE & | re, | |
| const Arg & | arg0 = RE::no_arg, |
|||
| const Arg & | arg1 = RE::no_arg, |
|||
| const Arg & | arg2 = RE::no_arg | |||
| ) |
Definition at line 133 of file pcre_scanner.cc.
References pcrecpp::RE::Consume(), ConsumeSkip(), input_, result(), and should_skip_.
| void pcrecpp::Scanner::Skip | ( | const char * | re | ) |
Definition at line 87 of file pcre_scanner.cc.
References ConsumeSkip(), NULL, should_skip_, skip_, and skip_repeat_.
| void pcrecpp::Scanner::SetSkipExpression | ( | const char * | re | ) |
Definition at line 73 of file pcre_scanner.cc.
References ConsumeSkip(), NULL, should_skip_, skip_, and skip_repeat_.
| void pcrecpp::Scanner::DisableSkip | ( | ) |
| void pcrecpp::Scanner::EnableSkip | ( | ) |
Definition at line 106 of file pcre_scanner.cc.
References ConsumeSkip(), NULL, should_skip_, and skip_.
| void pcrecpp::Scanner::SkipCXXComments | ( | ) | [inline] |
Definition at line 124 of file pcre_scanner.h.
| void pcrecpp::Scanner::set_save_comments | ( | bool | comments | ) | [inline] |
Definition at line 128 of file pcre_scanner.h.
| bool pcrecpp::Scanner::save_comments | ( | ) | [inline] |
Definition at line 132 of file pcre_scanner.h.
| void pcrecpp::Scanner::GetComments | ( | int | start, | |
| int | end, | |||
| std::vector< StringPiece > * | ranges | |||
| ) |
| void pcrecpp::Scanner::GetNextComments | ( | std::vector< StringPiece > * | ranges | ) |
| void pcrecpp::Scanner::ConsumeSkip | ( | ) | [private] |
Definition at line 143 of file pcre_scanner.cc.
References comments_, pcrecpp::RE::Consume(), pcrecpp::StringPiece::data(), input_, length, NULL, save_comments_, skip_, and skip_repeat_.
Referenced by Consume(), EnableSkip(), SetSkipExpression(), and Skip().
std::string pcrecpp::Scanner::data_ [private] |
StringPiece pcrecpp::Scanner::input_ [private] |
Definition at line 151 of file pcre_scanner.h.
Referenced by Consume(), ConsumeSkip(), LineNumber(), LookingAt(), and Offset().
RE* pcrecpp::Scanner::skip_ [private] |
Definition at line 152 of file pcre_scanner.h.
Referenced by ConsumeSkip(), DisableSkip(), EnableSkip(), SetSkipExpression(), Skip(), and ~Scanner().
bool pcrecpp::Scanner::should_skip_ [private] |
Definition at line 153 of file pcre_scanner.h.
Referenced by Consume(), DisableSkip(), EnableSkip(), SetSkipExpression(), and Skip().
bool pcrecpp::Scanner::skip_repeat_ [private] |
Definition at line 154 of file pcre_scanner.h.
Referenced by ConsumeSkip(), SetSkipExpression(), and Skip().
bool pcrecpp::Scanner::save_comments_ [private] |
std::vector<StringPiece>* pcrecpp::Scanner::comments_ [private] |
int pcrecpp::Scanner::comments_offset_ [private] |
Definition at line 163 of file pcre_scanner.h.
1.5.1