|
@ -126,7 +126,7 @@ namespace storm { |
|
|
size_t row = 0; |
|
|
size_t row = 0; |
|
|
size_t state = 0; |
|
|
size_t state = 0; |
|
|
bool firstState = true; |
|
|
bool firstState = true; |
|
|
bool firstAction = true; |
|
|
|
|
|
|
|
|
bool firstActionForState = true; |
|
|
while (std::getline(file, line)) { |
|
|
while (std::getline(file, line)) { |
|
|
STORM_LOG_TRACE("Parsing: " << line); |
|
|
STORM_LOG_TRACE("Parsing: " << line); |
|
|
if (boost::starts_with(line, "state ")) { |
|
|
if (boost::starts_with(line, "state ")) { |
|
@ -135,7 +135,9 @@ namespace storm { |
|
|
firstState = false; |
|
|
firstState = false; |
|
|
} else { |
|
|
} else { |
|
|
++state; |
|
|
++state; |
|
|
|
|
|
++row; |
|
|
} |
|
|
} |
|
|
|
|
|
firstActionForState = true; |
|
|
STORM_LOG_TRACE("New state " << state); |
|
|
STORM_LOG_TRACE("New state " << state); |
|
|
|
|
|
|
|
|
// Parse state id
|
|
|
// Parse state id
|
|
@ -209,8 +211,8 @@ namespace storm { |
|
|
|
|
|
|
|
|
} else if (boost::starts_with(line, "\taction ")) { |
|
|
} else if (boost::starts_with(line, "\taction ")) { |
|
|
// New action
|
|
|
// New action
|
|
|
if (firstAction) { |
|
|
|
|
|
firstAction = false; |
|
|
|
|
|
|
|
|
if (firstActionForState) { |
|
|
|
|
|
firstActionForState = false; |
|
|
} else { |
|
|
} else { |
|
|
++row; |
|
|
++row; |
|
|
} |
|
|
} |
|
@ -232,7 +234,7 @@ namespace storm { |
|
|
} else { |
|
|
} else { |
|
|
// New transition
|
|
|
// New transition
|
|
|
size_t posColon = line.find(":"); |
|
|
size_t posColon = line.find(":"); |
|
|
STORM_LOG_ASSERT(posColon != std::string::npos, "':' not found."); |
|
|
|
|
|
|
|
|
STORM_LOG_THROW(posColon != std::string::npos, storm::exceptions::WrongFormatException, "':' not found."); |
|
|
size_t target = NumberParser<size_t>::parse(line.substr(2, posColon-3)); |
|
|
size_t target = NumberParser<size_t>::parse(line.substr(2, posColon-3)); |
|
|
std::string valueStr = line.substr(posColon+2); |
|
|
std::string valueStr = line.substr(posColon+2); |
|
|
ValueType value = valueParser.parseValue(valueStr); |
|
|
ValueType value = valueParser.parseValue(valueStr); |
|
|