Consistently printing operators and Booleans.

This commit is contained in:
Patrick Lühne 2016-11-24 03:20:22 +01:00
parent 098f2bf813
commit 47d7058f5a
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
2 changed files with 3 additions and 3 deletions

View File

@ -238,7 +238,7 @@ struct HeadLiteralPrintSubstitutedVisitor
throwErrorAtLocation(headLiteral.location, "conditional head literals currently unsupported", context);
if (i != disjunction.elements.cbegin())
context.logger.outputStream() << " " << output::Keyword("or") << " ";
context.logger.outputStream() << " " << Clingo::AST::BinaryOperator::Or << " ";
visit(conditionLiteral.literal, headLiteral, context);
}

View File

@ -54,7 +54,7 @@ struct StatementVisitor
}
if (rule.body.empty() && context.headTerms.empty())
outputStream << output::Boolean("true");
outputStream << Clingo::AST::Boolean({true});
else
{
// Print translated body literals
@ -63,7 +63,7 @@ struct StatementVisitor
const auto &bodyLiteral = *i;
if (!context.headTerms.empty())
std::cout << " and ";
outputStream << " " << Clingo::AST::BinaryOperator::And << " ";
if (bodyLiteral.sign != Clingo::AST::Sign::None)
throwErrorAtLocation(bodyLiteral.location, "only positive literals currently supported", context);