#include <boss_fsa.h>
Public Member Functions | |
FSA (const string &filename) throw (BOSS::FileOpenError, BOSS::FileFormatError) | |
This constructor reads regular expressions from a file. | |
FSA (const BOSS::t_SVector &expressions) throw (BOSS::FileFormatError) | |
This constructor reads regular expressions from an input string vector (t_SVector). | |
~FSA () | |
Destroy the FSA. | |
BOSS::t_SVector | parse (const string &trans) const throw (BOSS::NoRegexMatch) |
Divide "trans" into substrings. | |
Protected Member Functions | |
FSA () | |
Protected Attributes | |
regex_t | preg |
|
|
|
This constructor reads regular expressions from a file. This constructor reads elements from file "filename". Each row of the input file is expected to contain a regular expression X, which is extended to (^X). After creation, the FSA is stored in "preg". This constructor throws the following exceptions: "BOSS_FileOpenError", if file opening fails, or "BOSS_FormatError", if there are problems creating the FSA. |
|
This constructor reads regular expressions from an input string vector (t_SVector). This constructor reads regular expressions from an input string vector (t_SVector). It works exactly like the constructor that reads from a file, except that the expressions are read from an input string vector instead of a file. |
|
Destroy the FSA.
|
|
Divide "trans" into substrings. Divide "trans" into substrings. Each substring satisfies at least one regular expression. If more than one regular expression matches, the longest match is taken. The result is returned as a vector. Each element contains one substring. |
|
|