Lexer/RegExs now work on a very basic level. Regular expressions have not been fully implemented, but the structure is there. It creates trivial regexs that only accept a specified sequence, no actual regular expression power.

This commit is contained in:
Nathan Braswell
2013-07-02 01:47:42 -04:00
parent 94a7739bd9
commit 85da0bf646
10 changed files with 72 additions and 16 deletions

View File

@@ -32,7 +32,7 @@ class Parser {
std::string stateSetToString();
void addToTable(State* fromState, Symbol* tranSymbol, ParseAction* action);
ParseAction* getTable(int state, Symbol* token);
NodeTree* parseInput(Lexer* lexer);
NodeTree* parseInput(std::string inputString);
std::string grammerToString();
std::string grammerToDOT();
@@ -41,6 +41,7 @@ class Parser {
private:
StringReader reader;
Lexer lexer;
std::map<std::string, Symbol*> symbols;
std::vector<ParseRule*> loadedGrammer;