Improved the lexer to be functionally equlivant to the C++ version and ported the tests, commented out the dot generation from Import as it was slowing things down significantly.

This commit is contained in:
Nathan Braswell
2015-06-29 01:03:51 -04:00
parent b81abee459
commit 91f801d14f
5 changed files with 90 additions and 12 deletions

View File

@@ -130,7 +130,7 @@ void Importer::import(std::string fileName) {
return;
}
if (i.ast) {
outFileAST << i.ast->DOTGraphString() << std::endl;
//outFileAST << i.ast->DOTGraphString() << std::endl;
} else {
std::cout << "Tree returned from ASTTransformation for " << fileName << " is NULL!" << std::endl;
}
@@ -186,8 +186,8 @@ NodeTree<Symbol>* Importer::parseAndTrim(std::string fileName) {
NodeTree<Symbol>* parseTree = parser->parseInput(programInputFileString);
if (parseTree) {
//std::cout << parseTree->DOTGraphString() << std::endl;
outFile << parseTree->DOTGraphString() << std::endl;
//std::cout << parseTree->DOTGraphString() << std::endl;
//outFile << parseTree->DOTGraphString() << std::endl;
} else {
std::cout << "ParseTree returned from parser for " << fileName << " is NULL!" << std::endl;
outFile.close(); outFileTransformed.close();
@@ -207,7 +207,7 @@ NodeTree<Symbol>* Importer::parseAndTrim(std::string fileName) {
parseTree = CollapseTransformation<Symbol>(collapseSymbols[i]).transform(parseTree);
if (parseTree) {
outFileTransformed << parseTree->DOTGraphString() << std::endl;
//outFileTransformed << parseTree->DOTGraphString() << std::endl;
} else {
std::cout << "Tree returned from transformation is NULL!" << std::endl;
}