Remove namespace, usage of g3log

This commit is contained in:
kwullaer 2017-01-27 21:34:00 +01:00
parent 0952ae950b
commit a103cb1c9c
1 changed files with 4 additions and 10 deletions

View File

@ -3,17 +3,10 @@
#include "Parsodus/parser.h"
#include "Parsodus/util/parserType.h"
#include "Lexesis/inputparser.h"
#include "g3log/g3log.hpp"
#include <set>
#include <fstream>
#include <iostream>
namespace {
std::set<std::string> getTerminals(std::string file) {
std::fstream f(file);
return lxs::input::InputParser::getTokens(f);
}
}
namespace pds {
@ -27,7 +20,8 @@ namespace pds {
Config cnf = *parser.parse();
if (!cnf.lexesisFile.empty()) {
auto terminals = getTerminals(cnf.lexesisFile);
std::fstream file(cnf.lexesisFile);
auto terminals = lxs::input::InputParser::getTokens(file);
for(auto& terminal : terminals)
cnf.grammar.terminals.insert(terminal);
}
@ -53,7 +47,7 @@ namespace pds {
if (found_token) break;
}
if (!found_token)
std::cout << "Warning: Terminal '" << term << "' is not been used." << std::endl;
LOG(WARNING) << "Terminal '" << term << "' is not been used." << std::endl;
}
return cnf;