From 8a82f52100b8ab6a8b461e99ae98c1bd8b940317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sat, 13 Aug 2016 01:36:08 +0200 Subject: [PATCH] Wrapped translated SAS variable definitions for usability in meta encodings. --- src/plasp/sas/TranslatorASP.cpp | 4 ++-- src/plasp/sas/Variable.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plasp/sas/TranslatorASP.cpp b/src/plasp/sas/TranslatorASP.cpp index 12b3231..4c838a2 100644 --- a/src/plasp/sas/TranslatorASP.cpp +++ b/src/plasp/sas/TranslatorASP.cpp @@ -107,9 +107,9 @@ void TranslatorASP::translateVariables() const BOOST_ASSERT(!values.empty()); - m_outputStream << std::endl; + m_outputStream << std::endl << utils::Keyword("variable") << "("; variable.printNameAsASPPredicate(m_outputStream); - m_outputStream << "." << std::endl; + m_outputStream << ")." << std::endl; std::for_each(values.cbegin(), values.cend(), [&](const auto &value) diff --git a/src/plasp/sas/Variable.cpp b/src/plasp/sas/Variable.cpp index 7f90ec2..ec8f121 100644 --- a/src/plasp/sas/Variable.cpp +++ b/src/plasp/sas/Variable.cpp @@ -29,6 +29,7 @@ Variable Variable::fromSAS(utils::Parser<> &parser) Variable variable; parser.expect("begin_variable"); + parser.expect("var"); variable.m_name = parser.parse(); variable.m_axiomLayer = parser.parse();