knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
terms.h
Go to the documentation of this file.
1 /*
2  * This file is part of KnowRob, please consult
3  * https://github.com/knowrob/knowrob for license details.
4  */
5 
6 #ifndef KNOWROB_TERM_PARSERS_H
7 #define KNOWROB_TERM_PARSERS_H
8 
9 #include <boost/spirit/include/qi.hpp>
10 #include "knowrob/terms/Term.h"
11 #include "knowrob/terms/Atom.h"
12 #include "knowrob/terms/Function.h"
13 #include "knowrob/terms/Variable.h"
14 
15 namespace knowrob::parsers::terms {
16  using TermRule = boost::spirit::qi::rule<std::string::const_iterator, std::shared_ptr<Term>(), boost::spirit::ascii::space_type>;
17  using VariableRule = boost::spirit::qi::rule<std::string::const_iterator, std::shared_ptr<Variable>(), boost::spirit::ascii::space_type>;
18  using AtomRule = boost::spirit::qi::rule<std::string::const_iterator, std::shared_ptr<Atom>(), boost::spirit::ascii::space_type>;
19  using FunctionRule = boost::spirit::qi::rule<std::string::const_iterator, std::shared_ptr<Function>(), boost::spirit::ascii::space_type>;
20 
21  AtomRule &iri();
22 
24 
25  AtomRule &atom();
26 
27  TermRule &string();
28 
29  TermRule &number();
30 
31  TermRule &blank();
32 
33  TermRule &xsd();
34 
35  TermRule &atomic();
36 
38 
40 
41  VariableRule &var();
42 
44 
45  TermRule &nil();
46 
48 
49  TermRule &option();
50 
51  TermRule &options();
52 
54 
55  TermRule &term();
56 
57  FunctionRule &function();
58 }
59 
60 #endif //KNOWROB_TERM_PARSERS_H
VariableRule & var()
Definition: terms.cpp:91
VariableRule & var_question()
Definition: terms.cpp:87
TermRule & key_value_pair()
Definition: terms.cpp:103
boost::spirit::qi::rule< std::string::const_iterator, std::shared_ptr< Function >(), boost::spirit::ascii::space_type > FunctionRule
Definition: terms.h:19
AtomRule & atom_regular()
Definition: terms.cpp:55
TermRule & number()
Definition: terms.cpp:67
VariableRule & var_upper()
Definition: terms.cpp:83
boost::spirit::qi::rule< std::string::const_iterator, std::shared_ptr< Variable >(), boost::spirit::ascii::space_type > VariableRule
Definition: terms.h:17
TermRule & blank()
Definition: terms.cpp:71
TermRule & nil()
Definition: terms.cpp:99
TermRule & option()
Definition: terms.cpp:110
AtomRule & iri()
Definition: terms.cpp:51
TermRule & options_or_nil()
Definition: terms.cpp:118
TermRule & string()
Definition: terms.cpp:63
TermRule & xsd()
Definition: terms.cpp:75
AtomRule & atom()
Definition: terms.cpp:59
TermRule & atomic_list()
Definition: terms.cpp:95
TermRule & atomic()
Definition: terms.cpp:79
boost::spirit::qi::rule< std::string::const_iterator, std::shared_ptr< Atom >(), boost::spirit::ascii::space_type > AtomRule
Definition: terms.h:18
TermRule & term()
Definition: terms.cpp:136
boost::spirit::qi::rule< std::string::const_iterator, std::shared_ptr< Term >(), boost::spirit::ascii::space_type > TermRule
Definition: terms.h:16
TermRule & options()
Definition: terms.cpp:114