Several recognizers.
More...
Several recognizers.
Definition at line 306 of file lexer.h.
#include "lexer.h"
◆ BaseVector
◆ ListOfInds
A list with indexes into some recognizers of the vector.
Definition at line 317 of file lexer.h.
◆ find()
Return one of the recognizers, or a false (null) one if not found.
This is O(n) in the length of RS.
Definition at line 326 of file lexer.h.
◆ active()
| const ListOfInds & elementa::parsing::FSMLexer::Recognizers::active |
( |
void |
| ) |
const |
|
inlinenoexcept |
Return the indexes of FSMs that are active right now.
Definition at line 333 of file lexer.h.
◆ reset()
| void elementa::parsing::FSMLexer::Recognizers::reset |
( |
void |
| ) |
|
Initiate the recognition through all the FSMs, all becoming active.
It must be called before starting feeding characters, and it can be called again at any time to restart the process or when the FSMs are changed.
◆ feed()
| void elementa::parsing::FSMLexer::Recognizers::feed |
( |
char |
o | ) |
|
Feed FSMs with the given observation O.
Those FSMs that do not consume it become deactivated. This is O(n), being n the current number of active FSMs.
◆ whoWins()
| size_type elementa::parsing::FSMLexer::Recognizers::whoWins |
( |
void |
| ) |
const |
Return the recognizer that has recognized all characters fed so far.
Return >= size of the recognizers vector if none.
The documentation for this class was generated from the following file: