You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
850 B
39 lines
850 B
/*
|
|
* LtlFileParser.cpp
|
|
*
|
|
* Created on: 13.05.2013
|
|
* Author: thomas
|
|
*/
|
|
|
|
#include "LtlFileParser.h"
|
|
#include "LtlParser.h"
|
|
|
|
namespace storm {
|
|
namespace parser {
|
|
|
|
std::list<storm::property::ltl::AbstractLtlFormula<double>*> LtlFileParser(std::string filename) {
|
|
// Open file
|
|
std::ifstream inputFileStream(filename, std::ios::in);
|
|
|
|
if (!inputFileStream.is_open()) {
|
|
std::string message = "Error while opening file ";
|
|
throw storm::exceptions::FileIoException() << message << filename;
|
|
}
|
|
|
|
std::list<storm::property::ltl::AbstractLtlFormula<double>*> result;
|
|
|
|
while(!inputFileStream.eof()) {
|
|
std::string line;
|
|
//The while loop reads the input file line by line
|
|
while (std::getline(inputFileStream, line)) {
|
|
result.push_back(storm::parser::LtlParser(line));
|
|
}
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
} //namespace parser
|
|
} //namespace storm
|
|
|
|
|