The Private
Class Reference
Private members of a regular expression. More...
Declaration
Public Constructors Index
Private (std::string_view pat) | |
Creates the private part. More... | |
Public Member Functions Index
void | compile () |
Compiles a regular expression passed as a string into a stream of tokens that can be used for efficient searching. More... | |
bool | matchAt (size_t tokenPos, size_t tokenLen, std::string_view str, Match &match, size_t pos, int level) const |
Internal matching routine. More... | |
Public Member Attributes Index
bool | error = false |
Flag indicating the expression was successfully compiled. More... | |
std::vector< PToken > | data |
The token stream representing the compiled regular expression. More... | |
std::string | pattern |
The pattern string as passed by the user. More... | |
Description
Private members of a regular expression.
Definition at line 169 of file regex.cpp.
Public Member Functions
compile()
|
Compiles a regular expression passed as a string into a stream of tokens that can be used for efficient searching.
Definition at line 177 of file regex.cpp.
References reg::PToken::Alpha, reg::PToken::AlphaNum, reg::PToken::Any, reg::PToken::asciiValue, reg::PToken::BeginCapture, reg::PToken::BeginOfLine, reg::PToken::BeginOfWord, reg::PToken::Character, reg::PToken::CharClass, data, reg::PToken::Digit, reg::PToken::End, reg::PToken::EndCapture, reg::PToken::EndOfLine, reg::PToken::EndOfWord, error, reg::PToken::kind, reg::PToken::NegCharClass, reg::PToken::Optional, pattern, reg::PToken::Star, reg::PToken::value and reg::PToken::WhiteSpace.
matchAt()
|
Internal matching routine.
- Parameters
-
tokenPos Offset into the token stream.
tokenLen The length of the token stream.
str The input string to match against.
match The object used to store the matching results.
pos The position in the input string to start with matching
level Recursion level (used for debugging)
Definition at line 181 of file regex.cpp.
References reg::PToken::Alpha, reg::PToken::AlphaNum, reg::PToken::Any, reg::PToken::asciiValue, reg::PToken::BeginCapture, reg::PToken::BeginOfLine, reg::PToken::BeginOfWord, reg::PToken::Character, data, DBG, reg::PToken::Digit, reg::PToken::EndCapture, reg::PToken::EndOfLine, reg::PToken::EndOfWord, reg::PToken::from, reg::Match::init, reg::isalnum, reg::isalpha, reg::PToken::isCharClass, reg::isdigit, isIdChar, reg::isspace, reg::PToken::kind, reg::PToken::kindStr, reg::Match::length, reg::Ex::match, matchAt, reg::PToken::NegCharClass, reg::PToken::Optional, reg::PToken::Star, reg::PToken::to, reg::PToken::value and reg::PToken::WhiteSpace.
Referenced by matchAt.
Public Member Attributes
data
|
error
|
pattern
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus by Doxygen 1.14.0.