JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
QueryParser.h
Go to the documentation of this file.
1 //
2 // Created by Nico Schäfer on 11/9/17.
3 //
4 
5 #ifndef JODA_QUERYPARSER_H
6 #define JODA_QUERYPARSER_H
7 
8 #include <tao/pegtl/parse_error.hpp>
9 
10 #include "../../../../query/include/joda/query/Query.h"
11 
12 namespace joda::queryparsing {
17 class QueryParser {
18  public:
25  std::shared_ptr<query::Query> parse(const std::string& str);
26 
33  std::vector<std::shared_ptr<query::Query>> parseMultiple(const std::string& str);
34 
35 
41  const std::string getLastError() const;
48  const std::string getLastErrorColor() const;
49 
55  static std::string getFunctionNames();
56 
62  static const size_t checkLanguage();
63 
64  protected:
65  std::unique_ptr<tao::pegtl::parse_error> lastError;
66 };
67 } // namespace joda::queryparsing
68 #endif // JODA_QUERYPARSER_H
Definition: QueryParser.h:17
std::vector< std::shared_ptr< query::Query > > parseMultiple(const std::string &str)
Definition: QueryParser.cpp:41
static std::string getFunctionNames()
Definition: QueryParser.cpp:100
static const size_t checkLanguage()
Definition: QueryParser.cpp:104
std::unique_ptr< tao::pegtl::parse_error > lastError
Definition: QueryParser.h:65
const std::string getLastErrorColor() const
Definition: QueryParser.cpp:74
const std::string getLastError() const
Definition: QueryParser.cpp:69
std::shared_ptr< query::Query > parse(const std::string &str)
Definition: QueryParser.cpp:19
Definition: QueryParser.h:12