Added compatibility check for unsupported “in-package” sections.

This commit is contained in:
Patrick Lühne 2017-06-15 23:45:08 +02:00
parent 9642bab0c8
commit 849faad134
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -70,6 +70,17 @@ void DescriptionParser::findSections()
const auto position = tokenizer.position();
tokenizer.expect<std::string>("(");
if (tokenizer.testAndReturn<std::string>("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<std::string>("define");
tokenizer.expect<std::string>("(");