2013-06-13 14:25:10 -04:00
|
|
|
#ifndef LEXER_H
|
|
|
|
|
#define LEXER_H
|
|
|
|
|
|
|
|
|
|
#include "util.h"
|
|
|
|
|
#include "StringReader.h"
|
2013-07-01 22:45:33 -04:00
|
|
|
#include "RegEx.h"
|
2013-06-13 14:25:10 -04:00
|
|
|
#include "Symbol.h"
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
class Lexer {
|
|
|
|
|
public:
|
|
|
|
|
Lexer();
|
|
|
|
|
Lexer(std::string inputString);
|
|
|
|
|
~Lexer();
|
2013-07-01 22:45:33 -04:00
|
|
|
void addRegexString(std::string regExString);
|
2013-06-13 14:25:10 -04:00
|
|
|
void setInput(std::string inputString);
|
|
|
|
|
Symbol* next();
|
|
|
|
|
private:
|
2013-07-01 22:45:33 -04:00
|
|
|
std::vector<RegEx*> regExs;
|
|
|
|
|
std::string input;
|
|
|
|
|
int currentPosition;
|
2013-06-13 14:25:10 -04:00
|
|
|
};
|
|
|
|
|
#endif
|