28 lines
421 B
C++
28 lines
421 B
C++
#ifndef LEXER_HPP
|
|
#define LEXER_HPP
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <regex>
|
|
|
|
namespace Lex{
|
|
class Lexer
|
|
{
|
|
public:
|
|
Lexer();
|
|
void lexString(const std::string& text);
|
|
void registerCallback(const std::string& pattern, void (Lexer::*f)());
|
|
|
|
protected:
|
|
void function1();
|
|
|
|
private:
|
|
std::vector<std::regex> _regexList;
|
|
std::vector<void(Lexer::*)()> _functionList;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|