From 19f2ad19b08eab5c65748594bae12dee7484313b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 20 Jun 2017 03:01:20 +0200 Subject: [PATCH] =?UTF-8?q?Fixed=20incorrect=20language=20detection=20with?= =?UTF-8?q?=20legacy=20=E2=80=9Cin-package=E2=80=9D=20directives.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/plasp/LanguageDetection.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/plasp/LanguageDetection.h b/include/plasp/LanguageDetection.h index f257368..c3b78b0 100644 --- a/include/plasp/LanguageDetection.h +++ b/include/plasp/LanguageDetection.h @@ -32,8 +32,10 @@ Language::Type detectLanguage(tokenize::Tokenizer("(") && tokenizer.testAndSkip("define")) + // PDDL contains sections starting with “(define” + // Some legacy domains contain “in-package” sections, however + if (tokenizer.testAndSkip("(") + && (tokenizer.testAndSkip("define") || tokenizer.testAndSkip("in-package"))) { tokenizer.seek(std::ios::beg); return Language::Type::PDDL;