Browse Source

move ConstantDataType and added ostream

tempestpy_adaptions
Stefan Pranger 3 years ago
parent
commit
f9d2df0b0a
  1. 14
      src/storm-parsers/parser/ConstantDataType.cpp
  2. 14
      src/storm-parsers/parser/ConstantDataType.h
  3. 5
      src/storm-parsers/parser/FormulaParserGrammar.h

14
src/storm-parsers/parser/ConstantDataType.cpp

@ -0,0 +1,14 @@
#include "ConstantDataType.h"
namespace storm {
namespace parser {
std::ostream& operator<<(std::ostream& out, ConstantDataType const& constantDataType) {
switch(constantDataType) {
case storm::parser::ConstantDataType::Bool: out << "Bool"; break;
case storm::parser::ConstantDataType::Integer: out << "Integer"; break;
case storm::parser::ConstantDataType::Rational: out << "Rational"; break;
}
return out;
}
}
}

14
src/storm-parsers/parser/ConstantDataType.h

@ -0,0 +1,14 @@
#pragma once
#include <sstream>
namespace storm {
namespace parser {
enum class ConstantDataType {
Bool, Integer, Rational
};
std::ostream& operator<<(std::ostream& out, ConstantDataType const& constantDataType);
}
}

5
src/storm-parsers/parser/FormulaParserGrammar.h

@ -10,6 +10,7 @@
#include "storm/storage/jani/Property.h"
#include "storm/logic/Formulas.h"
#include "storm-parsers/parser/ExpressionParser.h"
#include "storm-parsers/parser/ConstantDataType.h"
#include "storm/modelchecker/results/FilterType.h"
@ -148,10 +149,6 @@ namespace storm {
qi::rule<Iterator, std::vector<storm::jani::Property>(), Skipper> start;
enum class ConstantDataType {
Bool, Integer, Rational
};
qi::rule<Iterator, qi::unused_type(), qi::locals<ConstantDataType>, Skipper> constantDefinition;
qi::rule<Iterator, std::string(), Skipper> identifier;
qi::rule<Iterator, std::string(), Skipper> formulaName;
Loading…
Cancel
Save