6 #include <boost/spirit/include/phoenix.hpp>
7 #include "knowrob/queries/parsers/terms.h"
8 #include "knowrob/queries/parsers/strings.h"
9 #include "knowrob/queries/parsers/common.h"
10 #include "knowrob/terms/String.h"
11 #include "knowrob/terms/Numeric.h"
12 #include "knowrob/terms/Variable.h"
13 #include "knowrob/terms/ListTerm.h"
14 #include "knowrob/terms/Function.h"
15 #include "knowrob/terms/IRIAtom.h"
16 #include "knowrob/terms/Blank.h"
18 #define RETURN_TERM_RULE(expr) static TermRule r(expr); return r
19 #define RETURN_ATOM_RULE(expr) static AtomRule r(expr); return r
20 #define RETURN_VAR_RULE(expr) static VariableRule r(expr); return r
21 #define RETURN_FUNCTION_RULE(expr) static FunctionRule r(expr); return r
49 namespace qi = boost::spirit::qi;
107 boost::phoenix::bind(&createTermVector2, qi::_1, qi::_2))]);
122 struct term_and_function_parsers {
123 term_and_function_parsers() {
132 static term_and_function_parsers p;
static std::shared_ptr< knowrob::Atom > Tabled(std::string_view stringForm)
static std::shared_ptr< Blank > Tabled(std::string_view stringForm)
static std::shared_ptr< IRIAtom > Tabled(std::string_view stringForm)
static std::shared_ptr< ListTerm > nil()
static std::shared_ptr< XSDAtomic > create(std::string_view lexicalForm, std::string_view xsdTypeIRI)
const AtomPtr equalFunctor
StringRule & upper_prefix()
StringRule & lower_prefix()
StringRule & double_quotes()
VariableRule & var_question()
TermRule & key_value_pair()
boost::spirit::qi::rule< std::string::const_iterator, std::shared_ptr< Function >(), boost::spirit::ascii::space_type > FunctionRule
AtomRule & atom_regular()
VariableRule & var_upper()
boost::spirit::qi::rule< std::string::const_iterator, std::shared_ptr< Variable >(), boost::spirit::ascii::space_type > VariableRule
TermRule & options_or_nil()
boost::spirit::qi::rule< std::string::const_iterator, std::shared_ptr< Atom >(), boost::spirit::ascii::space_type > AtomRule
boost::spirit::qi::rule< std::string::const_iterator, std::shared_ptr< Term >(), boost::spirit::ascii::space_type > TermRule
auto & term_and_function()
boost::phoenix::function< make_shared_f< T > > ptr_
RDFNodeType rdfNodeTypeGuess(std::string_view str)
std::shared_ptr< Term > TermPtr
std::shared_ptr< Atom > AtomPtr
#define RETURN_FUNCTION_RULE(expr)
#define RETURN_ATOM_RULE(expr)
#define RETURN_VAR_RULE(expr)
#define RETURN_TERM_RULE(expr)