diff --git a/src/inputparser.cpp b/src/inputparser.cpp index 2bd3ea9..a328e66 100644 --- a/src/inputparser.cpp +++ b/src/inputparser.cpp @@ -12,14 +12,7 @@ namespace lxs { auto enfavect = parseLines(is); auto enfas = linesToEnfa(enfavect); auto enfa = merge(enfas); - for(auto tokens: enfa.acceptingToken) { - std::cout << tokens.first << "\t" << tokens.second << std::endl; - } - for(auto tokens: enfa.priority) { - std::cout << tokens.first << "\t" << tokens.second << std::endl; - } auto dfa = mssc(enfa); - dfa = minimize(dfa); return dfa; } @@ -28,9 +21,9 @@ namespace lxs { std::vector > result; while(std::getline(is,line)) { int loc = line.find_first_of('='); - int start = line.find_first_not_of(" "); + int start = line.find_first_not_of(" \t\v\f\r"); std::string tokenname = line.substr(start, loc); - int end = tokenname.find_last_not_of(" "); + int end = tokenname.find_last_not_of(" \t\v\f\r"); tokenname = tokenname.substr(0,end + 1); std::string regex = line.substr(loc+1); start = regex.find_first_not_of(" ");