-
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.
rename policy builder -> policy factory to be consistent with element…
… factory, remove old policy parser
- Loading branch information
Showing
37 changed files
with
935 additions
and
1,177 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
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,39 @@ | ||
#ifndef DLPLAN_INCLUDE_DLPLAN_POLICY_PARSERS_COMMON_CONFIG_HPP_ | ||
#define DLPLAN_INCLUDE_DLPLAN_POLICY_PARSERS_COMMON_CONFIG_HPP_ | ||
|
||
#include <boost/spirit/home/x3.hpp> | ||
#include <boost/spirit/home/x3/support/ast/position_tagged.hpp> | ||
#include <boost/spirit/home/x3/support/utility/error_reporting.hpp> | ||
|
||
|
||
namespace dlplan::policy::parsers | ||
{ | ||
namespace x3 = boost::spirit::x3; | ||
|
||
// Our Iterator Type | ||
typedef std::string::const_iterator iterator_type; | ||
|
||
// The Phrase Parse Context | ||
typedef | ||
x3::phrase_parse_context<x3::ascii::space_type>::type | ||
phrase_context_type; | ||
|
||
// X3 Error Handler Utility | ||
template <typename Iterator> | ||
using error_handler = x3::error_handler<Iterator>; | ||
|
||
// tag used to get our error handler from the context | ||
using error_handler_tag = x3::error_handler_tag; | ||
|
||
// Our Error Handler | ||
typedef error_handler<iterator_type> error_handler_type; | ||
|
||
// Combined Error Handler and Phrase Parse Context | ||
typedef x3::context< | ||
error_handler_tag | ||
, std::reference_wrapper<error_handler_type> | ||
, phrase_context_type> | ||
context_type; | ||
} | ||
|
||
#endif |
Oops, something went wrong.