The abstract lexer class template that is the abstract root class of all reflex-generated scanners.
More...
#include <abslexer.h>
|
class | Matcher |
| Extend matcher class M with a member pointing to the instantiating lexer class. More...
|
|
|
AbstractLexer & | start (int state) |
| Transition to the given start condition state. More...
|
|
int | start (void) const |
| Returns the current start condition state. More...
|
|
void | push_state (int state) |
| Push the current start condition state on the stack and transition to the given start condition state. More...
|
|
void | pop_state (void) |
| Pop the stack start condition state and transition to that state. More...
|
|
int | top_state (void) const |
| Returns the stack top start condition state. More...
|
|
template<typename M>
class reflex::AbstractLexer< M >
The abstract lexer class template that is the abstract root class of all reflex-generated scanners.
More info TODO
- Template Parameters
-
Construct abstract lexer to scan an input character sequence and echo the text matches to output.
- Parameters
-
input | reflex::Input character sequence to read from |
os | echo the text matches to this std::ostream or to std::cout |
Delete lexer and its current matcher and input.
Column number of matched text.
- Returns
- column number.
Get debug flag value.
- Returns
- debug flag value.
Echo the matched text to the current output.
Returns true if a matcher was assigned to this lexer for scanning.
- Returns
- true if a matcher was assigned.
Start scanning from the given input character sequence.
- Returns
- reference to *this.
- Parameters
-
Returns the current input character sequence that is being scanned.
- Returns
- reference to the current reflex::Input object.
Line number of matched text.
- Returns
- line number.
Set the matcher (and its current state) for scanning.
- Returns
- reference to *this.
- Parameters
-
matcher | points to a matcher object |
Returns the current matcher.
- Returns
- reference to the current matcher.
Set the current output to the given output stream to echo text matches to.
- Returns
- reference to *this.
- Parameters
-
os | output stream to echo text matches to |
Returns the current output stream used to echo text matches to.
- Returns
- reference to the current std::ostream object.
Pop matcher from the stack and continue scanning where it left off, delete the current matcher.
Pop the stack start condition state and transition to that state.
Push the current matcher on the stack and use the given matcher for scanning.
- Parameters
-
matcher | points to a matcher object |
Push the current start condition state on the stack and transition to the given start condition state.
- Parameters
-
state | start condition state to transition to |
Set debug flag value.
- Parameters
-
Matched text size (length in bytes).
- Returns
- matched text size.
Transition to the given start condition state.
- Returns
- reference to *this.
- Parameters
-
state | start condition state to transition to |
Returns the current start condition state.
- Returns
- start condition (integer).
Returns string with the text matched.
- Returns
- matched text.
Returns the stack top start condition state.
- Returns
- start condition (integer).
The default wrap operation at EOF: do not wrap input.
- Returns
- 1 (override to return 0 to indicate that new input is available after this invocation so that wrap after EOF is OK).
1 if -d (–debug) 0 otherwise:
the input character sequence to scan
the matcher used for scanning
the output stream to echo text matches to
a stack of pointers to matchers
the current start condition state
a stack of start condition states
The documentation for this class was generated from the following file: