Started implementing parsing of action preconditions.
This commit is contained in:
43
include/plasp/pddl/Action.h
Normal file
43
include/plasp/pddl/Action.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef __PLASP__PDDL__ACTION_H
|
||||
#define __PLASP__PDDL__ACTION_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <plasp/pddl/Variable.h>
|
||||
#include <plasp/utils/Parser.h>
|
||||
|
||||
namespace plasp
|
||||
{
|
||||
namespace pddl
|
||||
{
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Action
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class Action
|
||||
{
|
||||
public:
|
||||
static Action &parseDeclaration(utils::Parser &parser, Context &context);
|
||||
|
||||
public:
|
||||
const std::string &name() const;
|
||||
|
||||
private:
|
||||
Action(std::string name);
|
||||
|
||||
void parsePrecondition(utils::Parser &parser, Context &context);
|
||||
|
||||
std::string m_name;
|
||||
|
||||
std::vector<Variable> m_parameters;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
37
include/plasp/pddl/Expression.h
Normal file
37
include/plasp/pddl/Expression.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef __PLASP__PDDL__EXPRESSION_H
|
||||
#define __PLASP__PDDL__EXPRESSION_H
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
|
||||
#include <plasp/utils/Parser.h>
|
||||
|
||||
namespace plasp
|
||||
{
|
||||
namespace pddl
|
||||
{
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Expression
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class Context;
|
||||
|
||||
namespace expression
|
||||
{
|
||||
class And;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using ExpressionPtr = boost::variant<void *>;
|
||||
|
||||
ExpressionPtr parsePreconditionExpression(utils::Parser &parser, Context &context);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user