Added EOF symbol, making the getTable() saner for ACCEPT and lookahead support in ParseRule

This commit is contained in:
Nathan Braswell
2013-06-13 14:25:10 -04:00
parent 949dbc532a
commit 0c651a5d9e
9 changed files with 68 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
#include "NodeTree.h"
#include "Lexer.h"
#include "Parser.h"
#include <string>
#include <iostream>
@@ -67,7 +68,7 @@ int main(int argc, char* argv[]) {
//outFile << parser.grammerToDOT() << std::endl;
std::cout << programInputFileString << std::endl;
NodeTree* parseTree = parser.parseInput(programInputFileString);
NodeTree* parseTree = parser.parseInput(new Lexer(programInputFileString));
if (parseTree) {
std::cout << parseTree->DOTGraphString() << std::endl;