-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename parser to parser_text and add parser_json
Signed-off-by: Kunlin Yu <[email protected]>
- Loading branch information
Showing
4 changed files
with
71 additions
and
36 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
/* | ||
* File Name: cql2_parser_json.h | ||
* | ||
* Copyright (c) 2024 IndoorSpatial | ||
* | ||
* Author: Kunlin Yu <[email protected]> | ||
* Create Date: 2024/12/19 | ||
* | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "ast_node.h" | ||
|
||
namespace cql2cpp { | ||
|
||
class Cql2ParserJson { | ||
private: | ||
AstNodePtr root_; | ||
|
||
public: | ||
Cql2ParserJson() {} | ||
|
||
bool parse() { return true; } | ||
|
||
AstNodePtr root() const { return root_; } | ||
}; | ||
|
||
} // namespace cql2cpp |
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,36 @@ | ||
/* | ||
* File Name: cql2_parser_text.h | ||
* | ||
* Copyright (c) 2024 IndoorSpatial | ||
* | ||
* Author: Kunlin Yu <[email protected]> | ||
* Create Date: 2024/12/19 | ||
* | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <FlexLexer.h> | ||
#include <glog/logging.h> | ||
|
||
#include <cql2_parser_base.hh> | ||
|
||
namespace cql2cpp { | ||
|
||
class Cql2ParserText : public Cql2ParserBase { | ||
private: | ||
AstNodePtr root_; | ||
|
||
public: | ||
Cql2ParserText() : Cql2ParserBase(&root_) {} | ||
|
||
void error(const std::string& msg) override { | ||
LOG(ERROR) << "Cql2ParserText Error: " << msg << std::endl; | ||
} | ||
|
||
int parse() override { return Cql2ParserBase::parse(); } | ||
|
||
AstNodePtr root() const { return root_; } | ||
}; | ||
|
||
} // namespace cql2cpp |
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