|
| | Matcher () |
| | Default constructor. More...
|
| |
| template<typename P > |
| | Matcher (const P *pat, const Input &inp=Input(), const char *opt=NULL) |
| | Construct matcher engine from a pattern or a string regex, and an input character sequence. More...
|
| |
| template<typename P > |
| | Matcher (const P &pat, const Input &inp=Input(), const char *opt=NULL) |
| | Construct matcher engine from a pattern or a string regex, and an input character sequence. More...
|
| |
| virtual void | reset (const char *opt=NULL) |
| | Reset this matcher's state to the initial state. More...
|
| |
| const std::vector< size_t > & | stops (void) const |
| |
| void | clear_stops (void) |
| | Clear tab stops. More...
|
| |
| void | push_stops (void) |
| | Push stops and clear stops. More...
|
| |
| void | pop_stops (void) |
| | Pop stops. More...
|
| |
| void | FSM_INIT (int &c1) |
| | FSM code INIT,. More...
|
| |
| int | FSM_CHAR (void) |
| | FSM code CHAR. More...
|
| |
| void | FSM_HALT (int c1) |
| | FSM code HALT. More...
|
| |
| void | FSM_TAKE (Pattern::Index cap) |
| | FSM code TAKE. More...
|
| |
| void | FSM_TAKE (Pattern::Index cap, int c1) |
| | FSM code TAKE. More...
|
| |
| void | FSM_REDO (void) |
| | FSM code REDO. More...
|
| |
| void | FSM_REDO (int c1) |
| | FSM code REDO. More...
|
| |
| void | FSM_HEAD (Pattern::Index la) |
| | FSM code HEAD. More...
|
| |
| void | FSM_TAIL (Pattern::Index la) |
| | FSM code TAIL. More...
|
| |
| bool | FSM_DENT (void) |
| | FSM code DENT. More...
|
| |
| bool | FSM_META_DED (void) |
| | FSM code META DED. More...
|
| |
| bool | FSM_META_IND (void) |
| | FSM code META IND. More...
|
| |
| bool | FSM_META_EOB (int c1) |
| | FSM code META EOB. More...
|
| |
| bool | FSM_META_BOB (void) |
| | FSM code META BOB. More...
|
| |
| bool | FSM_META_EOL (int c1) |
| | FSM code META EOL. More...
|
| |
| bool | FSM_META_BOL (void) |
| | FSM code META BOL. More...
|
| |
| bool | FSM_META_EWE (int c0, int c1) |
| | FSM code META EWE. More...
|
| |
| bool | FSM_META_BWE (int c0, int c1) |
| | FSM code META BWE. More...
|
| |
| bool | FSM_META_EWB (void) |
| | FSM code META EWB. More...
|
| |
| bool | FSM_META_BWB (void) |
| | FSM code META BWB. More...
|
| |
| bool | FSM_META_NWE (int c0, int c1) |
| | FSM code META NWE. More...
|
| |
| bool | FSM_META_NWB (void) |
| | FSM code META NWB. More...
|
| |
| | PatternMatcher (const PatternMatcher &matcher) |
| | Copy constructor, the underlying pattern object is shared (not deep copied). More...
|
| |
| virtual | ~PatternMatcher () |
| | Delete matcher, deletes pattern when owned, deletes this matcher's internal buffer. More...
|
| |
| virtual PatternMatcher & | pattern (const PatternMatcher &matcher) |
| | Set the pattern to use with this matcher as a shared pointer to another matcher pattern. More...
|
| |
| virtual PatternMatcher & | pattern (const Pattern &pat) |
| | Set the pattern to use with this matcher (the given pattern is shared and must be persistent). More...
|
| |
| virtual PatternMatcher & | pattern (const Pattern *pat) |
| | Set the pattern to use with this matcher (the given pattern is shared and must be persistent). More...
|
| |
| virtual PatternMatcher & | pattern (const char *pat) |
| | Set the pattern from a regex string to use with this matcher. More...
|
| |
| virtual PatternMatcher & | pattern (const std::string &pat) |
| | Set the pattern from a regex string to use with this matcher. More...
|
| |
| const Pattern & | pattern (void) const |
| | Returns the pattern object associated with this matcher. More...
|
| |
| bool | has_pattern (void) const |
| | Returns true if this matcher has a pattern. More...
|
| |
| bool | own_pattern (void) const |
| | Returns true if this matcher has its own pattern not received from another matcher (responsible to delete). More...
|
| |
| bool | buffer (size_t blk=0) |
| | Set buffer block size for reading: use 1 for interactive input, 0 (or omit argument) to buffer all input in which case returns true if all the data could be read and false if a read error occurred. More...
|
| |
| void | interactive (void) |
| | Set buffer to 1 for interactive input. More...
|
| |
| void | flush (void) |
| | Flush the buffer's remaining content. More...
|
| |
| virtual AbstractMatcher & | input (const Input &inp) |
| | Set the input character sequence for this matcher and reset the matcher. More...
|
| |
| size_t | matches (void) |
| | Returns true if the entire input matches this matcher's pattern (and internally caches the true/false result for repeat invocations). More...
|
| |
| size_t | accept (void) const |
| | Returns a positive integer (true) indicating the capture index of the matched text in the pattern or zero (false) for a mismatch. More...
|
| |
| const char * | text (void) const |
| | Returns string with the text matched. More...
|
| |
| size_t | size (void) const |
| | Returns the length of the matched text in number of bytes. More...
|
| |
| size_t | wsize (void) const |
| | Returns the length of the matched text in number of (wide) characters. More...
|
| |
| size_t | lineno (void) const |
| | Returns the line number of the match in the input character sequence. More...
|
| |
| size_t | columno (void) const |
| | Returns the column number of matched text, counting wide characters (unless compiled with WITH_BYTE_COLUMNO). More...
|
| |
| std::pair< size_t, std::string > | pair () const |
| | Returns a pair of size_t accept() and std::string text(), useful for tokenizing input into containers of pairs. More...
|
| |
| size_t | first (void) const |
| | Returns the position of the first character starting the match in the input character sequence. More...
|
| |
| size_t | last (void) const |
| | Returns the position of the last character + 1 after of the match in the input character sequence. More...
|
| |
| bool | at_bob (void) const |
| | Returns true if this matcher is at the start of an input character sequence. Use reset() to restart input. More...
|
| |
| bool | at_end (void) |
| | Returns true if this matcher has no more input to read from the input character sequence. More...
|
| |
| bool | hit_end (void) const |
| | Returns true if this matcher hit the end of the input character sequence. More...
|
| |
| void | set_end (bool eof) |
| | Set and force the end of input state. More...
|
| |
| bool | at_bol (void) const |
| | Returns true if this matcher reached the begin of a new line. More...
|
| |
| void | set_bol (bool bol) |
| | Set the begin of a new line state. More...
|
| |
| int | input (void) |
| | Returns the next character from the input character sequence while preserving the current text match. More...
|
| |
| void | unput (char c) |
| | Put back one character on the input character sequence for matching, invalidating the current match info and text. More...
|
| |
| const char * | rest (void) |
| | Fetch the rest of the input as text, useful for searching/splitting up to n times after which the rest is needed. More...
|
| |
| void | more (void) |
| | Append the next match to the currently matched text returned by AbstractMatcher::text, when the next match found is adjacent to the current match. More...
|
| |
| void | less (size_t n) |
| | Truncate the AbstractMatcher::text length of the match to n characters in length and reposition for next match. More...
|
| |
| | operator size_t () const |
| | Cast this matcher to positive integer indicating the nonzero capture index of the matched text in the pattern, same as AbstractMatcher::accept. More...
|
| |
| | operator std::string () const |
| | Cast this matcher to a std::string of the text matched by this matcher. More...
|
| |
| | operator std::pair< size_t, std::string > () const |
| | Cast this matcher to a pair of size_t accept() and std::string text(), useful for tokenization into containers. More...
|
| |
| bool | operator== (const char *rhs) const |
| | Returns true if matched text is equal to a string, useful for std::algorithm. More...
|
| |
| bool | operator== (const std::string &rhs) const |
| | Returns true if matched text is equalt to a string, useful for std::algorithm. More...
|
| |
| bool | operator== (size_t rhs) const |
| | Returns true if capture index is equal to a given size_t value, useful for std::algorithm. More...
|
| |
| bool | operator== (int rhs) const |
| | Returns true if capture index is equal to a given int value, useful for std::algorithm. More...
|
| |
| bool | operator!= (const char *rhs) const |
| | Returns true if matched text is not equal to a string, useful for std::algorithm. More...
|
| |
| bool | operator!= (const std::string &rhs) const |
| | Returns true if matched text is not equal to a string, useful for std::algorithm. More...
|
| |
| bool | operator!= (size_t rhs) const |
| | Returns true if capture index is not equal to a given size_t value, useful for std::algorithm. More...
|
| |
| bool | operator!= (int rhs) const |
| | Returns true if capture index is not equal to a given int value, useful for std::algorithm. More...
|
| |
|
| virtual size_t | match (Method method) |
| | Returns true if input matched the pattern using method Const::SCAN, Const::FIND, Const::SPLIT, or Const::MATCH. More...
|
| |
| void | newline (size_t &col) |
| | Update indentation column counter for indent() and dedent(). More...
|
| |
| bool | indent (size_t &col) |
| | Returns true if looking at indent. More...
|
| |
| bool | dedent (size_t &col) |
| | Returns true if looking at dedent. More...
|
| |
| | PatternMatcher (const Pattern *pat=NULL, const Input &inp=Input(), const char *opt=NULL) |
| | Construct a base abstract matcher from a pointer to a persistent pattern object (that is shared with this class) and an input character sequence. More...
|
| |
| | PatternMatcher (const Pattern &pat, const Input &inp=Input(), const char *opt=NULL) |
| |
| | PatternMatcher (const char *pat, const Input &inp=Input(), const char *opt=NULL) |
| | Construct a base abstract matcher from a regex pattern string and an input character sequence. More...
|
| |
| | PatternMatcher (const std::string &pat, const Input &inp=Input(), const char *opt=NULL) |
| | Construct a base abstract matcher from a regex pattern string and an input character sequence. More...
|
| |
| | AbstractMatcher (const Input &inp, const char *opt) |
| | Construct a base abstract matcher. More...
|
| |
| | AbstractMatcher (const Input &inp, const Option &opt) |
| | Construct a base abstract matcher. More...
|
| |
| void | init (const char *opt=NULL) |
| | Initialize the base abstract matcher at construction. More...
|
| |
| virtual size_t | get (char *s, size_t n) |
| | Returns more input (method can be overriden as by reflex::FlexLexer::get to invoke reflex::FlexLexer::LexerInput). More...
|
| |
| virtual bool | wrap (void) |
| | Returns true if wrapping of input after EOF is supported. More...
|
| |
| bool | grow (size_t need=Const::BLOCK) |
| | Shift or expand the internal buffer when it is too small to accommodate more input, where the buffer size is doubled when needed. More...
|
| |
| int | get (void) |
| | Returns the next character from the buffered input character sequence. More...
|
| |
| int | peek (void) |
| | Peek at the next character in the buffered input without consuming it. More...
|
| |
| void | set_current (size_t loc) |
| | Set the current position to advance to the next match. More...
|
| |
RE/flex matcher engine class, implements reflex::PatternMatcher pattern matching interface with scan, find, split functors and iterators.
More info TODO