250515.2 · 79e2ec1efa87cc489ac09159b13a48c5ce184b02
some cleanup with override specifiers
reading declarations
Changes to include/reflex/stdmatcher.h. All files
@@ -95,12 +95,12 @@ class StdMatcher : public PatternMatcher<std::regex> { return *this; } /// Polymorphic cloning.- virtual StdMatcher *clone()+ virtual StdMatcher *clone() REFLEX_OVERRIDE { return new StdMatcher(*this); } /// Reset this matcher's state to the initial state and when assigned new input.- virtual void reset(const char *opt = NULL)+ virtual void reset(const char *opt = NULL) REFLEX_OVERRIDE { DBGLOG("StdMatcher::reset()"); itr_ = fin_ = std::cregex_iterator();@@ -120,6 +120,7 @@ class StdMatcher : public PatternMatcher<std::regex> { /// Set the pattern to use with this matcher (the given pattern is shared and must be persistent), overrides the ECMA/POSIX/AWK syntax option. virtual PatternMatcher& pattern(const Pattern *pattern) ///< std::regex for this matcher /// @returns this matcher.+ REFLEX_OVERRIDE { itr_ = fin_; return PatternMatcher::pattern(pattern);@@ -127,6 +128,7 @@ class StdMatcher : public PatternMatcher<std::regex> { /// Set the pattern to use with this matcher (the given pattern is shared and must be persistent), overrides the ECMA/POSIX/AWK syntax option. virtual PatternMatcher& pattern(const Pattern& pattern) ///< std::regex for this matcher /// @returns this matcher.+ REFLEX_OVERRIDE { itr_ = fin_; return PatternMatcher::pattern(pattern);@@ -134,6 +136,7 @@ class StdMatcher : public PatternMatcher<std::regex> { /// Set the pattern from a regex string to use with this matcher. virtual PatternMatcher& pattern(const char *pattern) ///< regex string to instantiate internal pattern object /// @returns this matcher.+ REFLEX_OVERRIDE { itr_ = fin_; PatternMatcher::pattern(new std::regex(pattern));@@ -143,13 +146,14 @@ class StdMatcher : public PatternMatcher<std::regex> { /// Set the pattern from a regex string to use with this matcher. virtual PatternMatcher& pattern(const std::string& pattern) ///< regex string to instantiate internal pattern object /// @returns this matcher.+ REFLEX_OVERRIDE { itr_ = fin_; PatternMatcher::pattern(new std::regex(pattern)); own_ = true; return *this; }- virtual std::pair<const char*,size_t> operator[](size_t n) const+ virtual std::pair<const char*,size_t> operator[](size_t n) const REFLEX_OVERRIDE { if (n == 0) return std::pair<const char*,size_t>(txt_, len_);@@ -160,6 +164,7 @@ class StdMatcher : public PatternMatcher<std::regex> { /// Returns the group capture identifier containing the group capture index >0 and name (or NULL) of a named group capture, or (1,NULL) by default virtual std::pair<size_t,const char*> group_id() /// @returns a pair of size_t and string+ REFLEX_OVERRIDE { grp_ = 1; if (itr_ == fin_ || (*itr_).size() <= 1)@@ -171,6 +176,7 @@ class StdMatcher : public PatternMatcher<std::regex> { /// Returns the next group capture identifier containing the group capture index >0 and name (or NULL) of a named group capture, or (0,NULL) when no more groups matched virtual std::pair<size_t,const char*> group_next_id() /// @returns a pair of size_t and string+ REFLEX_OVERRIDE { if (itr_ == fin_) return std::pair<size_t,const char*>(0, static_cast<const char*>(NULL)); // cast to appease MSVC 2010@@ -186,6 +192,7 @@ class StdMatcher : public PatternMatcher<std::regex> { /// The match method Const::SCAN, Const::FIND, Const::SPLIT, or Const::MATCH, implemented with std::regex. virtual size_t match(Method method) ///< match method Const::SCAN, Const::FIND, Const::SPLIT, or Const::MATCH /// @returns nonzero when input matched the pattern using method Const::SCAN, Const::FIND, Const::SPLIT, or Const::MATCH.+ REFLEX_OVERRIDE { DBGLOG("BEGIN StdMatcher::match(%d)", method); reset_text();@@ -411,6 +418,7 @@ class StdEcmaMatcher : public StdMatcher { /// Set the pattern to use with this matcher (the given pattern is shared and must be persistent), fails when a POSIX std::regex is given. virtual PatternMatcher& pattern(const Pattern& pattern) ///< std::regex for this matcher /// @returns this matcher.+ REFLEX_OVERRIDE { ASSERT(!(pattern.flags() & (std::regex::basic | std::regex::extended | std::regex::awk))); return StdMatcher::pattern(pattern);@@ -418,6 +426,7 @@ class StdEcmaMatcher : public StdMatcher { /// Set the pattern to use with this matcher (the given pattern is shared and must be persistent), fails when a POSIX std::regex is given. virtual PatternMatcher& pattern(const Pattern *pattern) ///< std::regex for this matcher /// @returns this matcher.+ REFLEX_OVERRIDE { ASSERT(!(pattern.flags() & (std::regex::basic | std::regex::extended | std::regex::awk))); return StdMatcher::pattern(pattern);@@ -425,6 +434,7 @@ class StdEcmaMatcher : public StdMatcher { /// Set the pattern from a regex string to use with this matcher. virtual PatternMatcher& pattern(const char *pattern) ///< regex string to instantiate internal pattern object /// @returns this matcher.+ REFLEX_OVERRIDE { itr_ = fin_; PatternMatcher::pattern(new std::regex(pattern, std::regex::ECMAScript));@@ -434,6 +444,7 @@ class StdEcmaMatcher : public StdMatcher { /// Set the pattern from a regex string to use with this matcher. virtual PatternMatcher& pattern(const std::string& pattern) ///< regex string to instantiate internal pattern object /// @returns this matcher.+ REFLEX_OVERRIDE { itr_ = fin_; PatternMatcher::pattern(new std::regex(pattern, std::regex::ECMAScript));@@ -492,6 +503,7 @@ class StdPosixMatcher : public StdMatcher { /// Set the pattern to use with this matcher (the given pattern is shared and must be persistent), fails when a non-POSIX ERE std::regex is given. virtual PatternMatcher& pattern(const Pattern& pattern) ///< std::regex for this matcher /// @returns this matcher.+ REFLEX_OVERRIDE { ASSERT(pattern.flags() & std::regex::awk); return StdMatcher::pattern(pattern);@@ -499,6 +511,7 @@ class StdPosixMatcher : public StdMatcher { /// Set the pattern to use with this matcher (the given pattern is shared and must be persistent), fails when a non-POSIX ERE std::regex is given. virtual PatternMatcher& pattern(const Pattern *pattern) ///< std::regex for this matcher /// @returns this matcher.+ REFLEX_OVERRIDE { ASSERT(pattern.flags() & std::regex::awk); return StdMatcher::pattern(pattern);@@ -506,6 +519,7 @@ class StdPosixMatcher : public StdMatcher { /// Set the pattern from a regex string to use with this matcher. virtual PatternMatcher& pattern(const char *pattern) ///< regex string to instantiate internal pattern object /// @returns this matcher.+ REFLEX_OVERRIDE { itr_ = fin_; PatternMatcher::pattern(new std::regex(pattern, std::regex::awk));@@ -515,6 +529,7 @@ class StdPosixMatcher : public StdMatcher { /// Set the pattern from a regex string to use with this matcher. virtual PatternMatcher& pattern(const std::string& pattern) ///< regex string to instantiate internal pattern object /// @returns this matcher.+ REFLEX_OVERRIDE { itr_ = fin_; PatternMatcher::pattern(new std::regex(pattern, std::regex::awk));