From 849faad1345eaaba3db074ec711c1c413f6ce1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Thu, 15 Jun 2017 23:45:08 +0200 Subject: [PATCH] =?UTF-8?q?Added=20compatibility=20check=20for=20unsupport?= =?UTF-8?q?ed=20=E2=80=9Cin-package=E2=80=9D=20sections.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pddlparse/detail/parsing/Description.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/pddlparse/src/pddlparse/detail/parsing/Description.cpp b/lib/pddlparse/src/pddlparse/detail/parsing/Description.cpp index b7ded73..97236a5 100644 --- a/lib/pddlparse/src/pddlparse/detail/parsing/Description.cpp +++ b/lib/pddlparse/src/pddlparse/detail/parsing/Description.cpp @@ -70,6 +70,17 @@ void DescriptionParser::findSections() const auto position = tokenizer.position(); tokenizer.expect("("); + + if (tokenizer.testAndReturn("in-package")) + { + m_context.warningCallback(tokenizer.location(), "ignoring “in-package” section, which is not part of the PDDL 3.1 specification"); + + skipSection(tokenizer); + tokenizer.skipWhiteSpace(); + + continue; + } + tokenizer.expect("define"); tokenizer.expect("(");