Relaxing white space requirements.
This commit is contained in:
@@ -64,7 +64,8 @@ void Description::parseContent(utils::Parser &parser)
|
||||
{
|
||||
std::cout << "Parsing file content" << std::endl;
|
||||
|
||||
parser.expect<std::string>("(define");
|
||||
parser.expect<std::string>("(");
|
||||
parser.expect<std::string>("define");
|
||||
parseSection(parser);
|
||||
parser.expect<std::string>(")");
|
||||
}
|
||||
|
@@ -97,7 +97,8 @@ const std::vector<std::unique_ptr<Action>> &Domain::actions() const
|
||||
|
||||
void Domain::parseSection(utils::Parser &parser)
|
||||
{
|
||||
parser.expect<std::string>("(:");
|
||||
parser.expect<std::string>("(");
|
||||
parser.expect<std::string>(":");
|
||||
|
||||
const auto sectionIdentifier = parser.parseIdentifier(isIdentifier);
|
||||
|
||||
|
@@ -39,8 +39,12 @@ Predicate &Predicate::parseDeclaration(utils::Parser &parser, Context &context)
|
||||
|
||||
// Parse arguments
|
||||
while (parser.currentCharacter() != ')')
|
||||
{
|
||||
Variable::parseTyped(parser, context, predicate->m_arguments);
|
||||
|
||||
parser.skipWhiteSpace();
|
||||
}
|
||||
|
||||
parser.expect<std::string>(")");
|
||||
|
||||
const auto predicateArity = predicate->m_arguments.size();
|
||||
|
Reference in New Issue
Block a user