|
Source-highlight Library
|
Implementation of the abstract factory, creating highlighting rules based on boost::regex regular expressions. More...
#include <regexrulefactory.h>


Public Member Functions | |
| virtual HighlightRule * | createSimpleRule (const std::string &name, const std::string &s) |
| Creates a generic highlighting rule. | |
| virtual HighlightRule * | createWordListRule (const std::string &name, const WordList &list, bool caseSensitve=true) |
| Creates a rule for detecting a list of specific words, i.e., isolated from other parts by a space or a delimiter (e.g., if "class" is considered as a word, then it will not match the substring "class" in "myclass") | |
| virtual HighlightRule * | createListRule (const std::string &name, const WordList &list, bool caseSensitve=true) |
| Creates a rule for detecting a list of specific expressions. | |
| virtual HighlightRule * | createLineRule (const std::string &name, const std::string &start, const std::string &end, const std::string &escape="", bool nested=false) |
| Creates a rule for matching a delimited string (spanning a single line) | |
| virtual HighlightRule * | createMultiLineRule (const std::string &name, const std::string &start, const std::string &end, const std::string &escape, bool nested) |
| Creates a rule for matching a delimited string (possibly spanning more than one line) | |
| virtual HighlightRule * | createCompoundRule (const ElemNameList &nameList, const std::string &rep) |
| Creates a rule for matching many element names, each represented by a subexpression (the number of subexpression must be equal to the size of the nameList) | |
Implementation of the abstract factory, creating highlighting rules based on boost::regex regular expressions.
| HighlightRule * srchilite::RegexRuleFactory::createCompoundRule | ( | const ElemNameList & | nameList, |
| const std::string & | rep | ||
| ) | [virtual] |
Creates a rule for matching many element names, each represented by a subexpression (the number of subexpression must be equal to the size of the nameList)
| nameList | the list of element names represented by the rule |
| rep | the string representation of the rule |
Implements srchilite::HighlightRuleFactory.
| HighlightRule * srchilite::RegexRuleFactory::createLineRule | ( | const std::string & | name, |
| const std::string & | start, | ||
| const std::string & | end, | ||
| const std::string & | escape = "", |
||
| bool | nested = false |
||
| ) | [virtual] |
Creates a rule for matching a delimited string (spanning a single line)
| name | the element name represented by the rule |
| start | the string determining the start of the sequence |
| end | the string determining the end of the sequence |
| escape | the string the escape sequence (typically a char, e.g., \) |
| nested | whether the delimiters can be nested |
Implements srchilite::HighlightRuleFactory.
| HighlightRule * srchilite::RegexRuleFactory::createListRule | ( | const std::string & | name, |
| const WordList & | list, | ||
| bool | caseSensitve = true |
||
| ) | [virtual] |
Creates a rule for detecting a list of specific expressions.
| name | the element name represented by the rule |
| list | the list of words to detect |
| caseSensitive | if the characters in the expression must be interpreted case sensitive |
Implements srchilite::HighlightRuleFactory.
| HighlightRule * srchilite::RegexRuleFactory::createMultiLineRule | ( | const std::string & | name, |
| const std::string & | start, | ||
| const std::string & | end, | ||
| const std::string & | escape, | ||
| bool | nested | ||
| ) | [virtual] |
Creates a rule for matching a delimited string (possibly spanning more than one line)
| name | the element name represented by the rule |
| start | the string determining the start of the sequence |
| end | the string determining the end of the sequence |
| escape | the string the escape sequence (typically a char, e.g., \) |
| nested | whether the delimiters can be nested |
Implements srchilite::HighlightRuleFactory.
| HighlightRule * srchilite::RegexRuleFactory::createSimpleRule | ( | const std::string & | name, |
| const std::string & | s | ||
| ) | [virtual] |
Creates a generic highlighting rule.
| name | the element name represented by the rule |
| the | string representation |
Implements srchilite::HighlightRuleFactory.
| HighlightRule * srchilite::RegexRuleFactory::createWordListRule | ( | const std::string & | name, |
| const WordList & | list, | ||
| bool | caseSensitve = true |
||
| ) | [virtual] |
Creates a rule for detecting a list of specific words, i.e., isolated from other parts by a space or a delimiter (e.g., if "class" is considered as a word, then it will not match the substring "class" in "myclass")
| name | the element name represented by the rule |
| list | the list of words to detect |
| caseSensitive | if the characters in the expression must be interpreted case sensitive |
Implements srchilite::HighlightRuleFactory.