knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::parsers::str Namespace Reference

Typedefs

using StringRule = boost::spirit::qi::rule< std::string::const_iterator, std::string()>
 

Functions

StringRulesingle_quotes ()
 
StringRuledouble_quotes ()
 
StringRulelower_prefix ()
 
StringRuleupper_prefix ()
 
StringRuleiri_ns ()
 
StringRuleiri_entity ()
 
StringRuleiri ()
 
StringRuleatom ()
 
StringRuleatom_or_iri ()
 
StringRuleblank ()
 
StringRulenumber ()
 
StringRulexsd_value ()
 

Typedef Documentation

◆ StringRule

typedef boost::spirit::qi::rule< std::string::const_iterator, std::string()> knowrob::parsers::str::StringRule

Definition at line 12 of file strings.h.

Function Documentation

◆ atom()

StringRule & knowrob::parsers::str::atom ( )

Definition at line 54 of file strings.cpp.

54  {
56  }
StringRule & single_quotes()
Definition: strings.cpp:25
StringRule & lower_prefix()
Definition: strings.cpp:33
#define RETURN_STRING_RULE(expr)
Definition: strings.cpp:23

◆ atom_or_iri()

StringRule & knowrob::parsers::str::atom_or_iri ( )

Definition at line 58 of file strings.cpp.

58  {
60  }
StringRule & iri()
Definition: strings.cpp:49
StringRule & atom()
Definition: strings.cpp:54

◆ blank()

StringRule & knowrob::parsers::str::blank ( )

Definition at line 62 of file strings.cpp.

62  {
63  RETURN_STRING_RULE(qi::raw['_']);
64  }

◆ double_quotes()

StringRule & knowrob::parsers::str::double_quotes ( )

Definition at line 29 of file strings.cpp.

29  {
30  RETURN_STRING_RULE(qi::lexeme['"' >> +(qi::char_ - '"') >> '"']);
31  }

◆ iri()

StringRule & knowrob::parsers::str::iri ( )

Definition at line 49 of file strings.cpp.

49  {
50  RETURN_STRING_RULE((iri_ns() >> ':' >> iri_entity())
51  [qi::_val = boost::phoenix::bind(&createIRI, qi::_1, qi::_2)]);
52  }
StringRule & iri_entity()
Definition: strings.cpp:45
StringRule & iri_ns()
Definition: strings.cpp:41

◆ iri_entity()

StringRule & knowrob::parsers::str::iri_entity ( )

Definition at line 45 of file strings.cpp.

45  {
46  RETURN_STRING_RULE(str::single_quotes() | qi::raw[ascii::alpha >> *(ascii::alnum | '_')]);
47  }

◆ iri_ns()

StringRule & knowrob::parsers::str::iri_ns ( )

Definition at line 41 of file strings.cpp.

41  {
42  RETURN_STRING_RULE(qi::raw[ascii::alpha >> *(ascii::alnum | '_')]);
43  }

◆ lower_prefix()

StringRule & knowrob::parsers::str::lower_prefix ( )

Definition at line 33 of file strings.cpp.

33  {
34  RETURN_STRING_RULE(qi::raw[ascii::lower >> *(ascii::alnum | '_')]);
35  }

◆ number()

StringRule & knowrob::parsers::str::number ( )

Definition at line 66 of file strings.cpp.

66  {
67  RETURN_STRING_RULE(qi::raw[qi::double_]);
68  }

◆ single_quotes()

StringRule & knowrob::parsers::str::single_quotes ( )

Definition at line 25 of file strings.cpp.

25  {
26  RETURN_STRING_RULE(qi::lexeme['\'' >> +(qi::char_ - '\'') >> '\'']);
27  }

◆ upper_prefix()

StringRule & knowrob::parsers::str::upper_prefix ( )

Definition at line 37 of file strings.cpp.

37  {
38  RETURN_STRING_RULE(qi::raw[ascii::upper >> *(ascii::alnum | '_')]);
39  }

◆ xsd_value()

StringRule & knowrob::parsers::str::xsd_value ( )

Definition at line 70 of file strings.cpp.

70  {
72  }
StringRule & number()
Definition: strings.cpp:66