1 //
2 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
3 //
4 // Copyright: See COPYING file that comes with this distribution
5 //
6
7 #ifndef REGEXHIGHLIGHTRULE_H_
8 #define REGEXHIGHLIGHTRULE_H_
9
10 #include "highlightrule.h"
11
12 #include <boost/regex.hpp>
13
15
22 public:
27
34
35 virtual bool tryToMatch(std::string::const_iterator start,
38
39 virtual const std::string toString() const;
40
42
44
45 void setRegExp(const std::string &s);
46 };
47
48 }
49
50 #endif /*REGEXHIGHLIGHTRULE_H_*/
Structure for passing parameters to the matching algorithm, for instance, "not beginning of line"...
Definition: matchingparameters.h:16
boost::regex regExp
the regular expression for the rule
Definition: regexhighlightrule.h:21
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
virtual HighlightRule * clone()
Definition: regexhighlightrule.cpp:87
An implementation of HighlightRule using Boost regex library.
Definition: regexhighlightrule.h:19
virtual bool tryToMatch(std::string::const_iterator start, std::string::const_iterator end, HighlightToken &token, const MatchingParameters ¶ms)
Try to match this rule against the passed string.
Definition: regexhighlightrule.cpp:35
Base class for highlight rules.
Definition: highlightrule.h:27
std::vector< std::string > ReplacementList
the values for replacing references (it should contain 9 possibly empty elements, because 9 is usuall...
Definition: highlightstate.h:36
Token containing information for performing the highlight.
Definition: highlighttoken.h:33
virtual void replaceReferences(const ReplacementList &rep)
Performs replacement of references in this rule.
Definition: regexhighlightrule.cpp:83
RegexHighlightRule(const std::string &s)
Definition: regexhighlightrule.cpp:21