From 20b40d3e1cc472ece083cfd23f7fd1fed3be04af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Fri, 10 Jun 2016 16:46:02 +0200 Subject: [PATCH] =?UTF-8?q?Allowing=20primitive=20type=20=C2=BBobjects?= =?UTF-8?q?=C2=AB=20for=20compatibility.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plasp/pddl/expressions/PrimitiveType.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plasp/pddl/expressions/PrimitiveType.cpp b/src/plasp/pddl/expressions/PrimitiveType.cpp index 97e3aa8..b6845e7 100644 --- a/src/plasp/pddl/expressions/PrimitiveType.cpp +++ b/src/plasp/pddl/expressions/PrimitiveType.cpp @@ -121,8 +121,11 @@ PrimitiveType *PrimitiveType::parseAndFind(Context &context, Domain &domain) if (match == types.cend()) { // Only "object" is allowed as an implicit type - if (typeName == "object") + if (typeName == "object" || typeName == "objects") + { + context.logger.parserWarning(context.parser, "Primitive type \"" + typeName + "\" should be declared"); types.emplace_back(std::make_unique(typeName)); + } else throw utils::ParserException(context.parser, "Type \"" + typeName + "\" used but never declared");