-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added basic interface of stage 2 parser
- Loading branch information
Showing
6 changed files
with
134 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "context.hpp" | ||
|
||
|
||
namespace dlplan::core::parsers::elements::stage_2 { | ||
|
||
Context::Context(SyntacticElementFactory& element_factory) | ||
: element_factory(element_factory) { } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef SRC_CORE_PARSERS_ELEMENTS_STAGE_2_CONTEXT_HPP_ | ||
#define SRC_CORE_PARSERS_ELEMENTS_STAGE_2_CONTEXT_HPP_ | ||
|
||
#include <map> | ||
#include <memory> | ||
#include <string> | ||
|
||
#include "include/dlplan/core.h" | ||
|
||
|
||
namespace dlplan::core::parsers::elements::stage_2 { | ||
/// @brief Provides additional context during parsing. | ||
struct Context { | ||
SyntacticElementFactory& element_factory; | ||
|
||
Context(SyntacticElementFactory& element_factory); | ||
}; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include "parser.hpp" | ||
|
||
#include <sstream> | ||
|
||
|
||
namespace dlplan::core::parsers::elements::stage_2::parser { | ||
|
||
std::shared_ptr<const Boolean> parse_boolean( | ||
Context& context, | ||
const error_handler_type& error_handler, | ||
const stage_1::ast::Element& node) { | ||
|
||
} | ||
|
||
std::shared_ptr<const Numerical> parse_numerical( | ||
Context& context, | ||
const error_handler_type& error_handler, | ||
const stage_1::ast::Element& node) { | ||
|
||
} | ||
|
||
std::shared_ptr<const Concept> parse_concept( | ||
Context& context, | ||
const error_handler_type& error_handler, | ||
const stage_1::ast::Element& node) { | ||
|
||
} | ||
|
||
std::shared_ptr<const Role> parse_role( | ||
Context& context, | ||
const error_handler_type& error_handler, | ||
const stage_1::ast::Element& node) { | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef SRC_CORE_PARSERS_ELEMENTS_STAGE_2_PARSER_HPP_ | ||
#define SRC_CORE_PARSERS_ELEMENTS_STAGE_2_PARSER_HPP_ | ||
|
||
#include <tuple> | ||
#include <variant> | ||
|
||
#include "include/dlplan/core.h" | ||
|
||
#include "src/core/parsers/common/config.hpp" | ||
#include "src/core/parsers/elements/stage_1_ast/ast.hpp" | ||
|
||
#include "context.hpp" | ||
|
||
|
||
namespace dlplan::core::parsers::elements::stage_2::parser { | ||
|
||
extern std::shared_ptr<const Boolean> parse_boolean( | ||
Context& context, | ||
const error_handler_type& error_handler, | ||
const stage_1::ast::Element& node); | ||
|
||
extern std::shared_ptr<const Numerical> parse_numerical( | ||
Context& context, | ||
const error_handler_type& error_handler, | ||
const stage_1::ast::Element& node); | ||
|
||
extern std::shared_ptr<const Concept> parse_concept( | ||
Context& context, | ||
const error_handler_type& error_handler, | ||
const stage_1::ast::Element& node); | ||
|
||
extern std::shared_ptr<const Role> parse_role( | ||
Context& context, | ||
const error_handler_type& error_handler, | ||
const stage_1::ast::Element& node); | ||
|
||
} | ||
|
||
#endif | ||
|