diff options
author | vvvv <[email protected]> | 2025-02-18 14:49:48 +0300 |
---|---|---|
committer | vvvv <[email protected]> | 2025-02-18 16:08:18 +0300 |
commit | 1213d16b7fd20d4255d2ebb709a1745efbfeb91b (patch) | |
tree | a1cd11d96b5abf0a0ec287c76c4f3cfe9b32a86e /yql/essentials/parser/proto_ast/common.h | |
parent | 408888e6801333da2d97af0b27a1c4da4448b9e0 (diff) |
Introduced lexer & parser interfaces
commit_hash:fee365c90a176dd33a967cee20994b21d530080c
Diffstat (limited to 'yql/essentials/parser/proto_ast/common.h')
-rw-r--r-- | yql/essentials/parser/proto_ast/common.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/yql/essentials/parser/proto_ast/common.h b/yql/essentials/parser/proto_ast/common.h index 013f4722883..64017a5c449 100644 --- a/yql/essentials/parser/proto_ast/common.h +++ b/yql/essentials/parser/proto_ast/common.h @@ -65,5 +65,24 @@ namespace NProtoAST { IOutputStream& Err; TString Name; }; - } // namespace NProtoAST + +namespace NSQLTranslation { + class IParser { + public: + virtual ~IParser() = default; + + virtual google::protobuf::Message* Parse( + const TString& query, const TString& queryName, NProtoAST::IErrorCollector& err, + google::protobuf::Arena* arena) = 0; + }; + + class IParserFactory : public TThrRefBase { + public: + virtual ~IParserFactory() = default; + + virtual std::unique_ptr<IParser> MakeParser() const = 0; + }; + + using TParserFactoryPtr = TIntrusivePtr<IParserFactory>; +} // namespace NSQLTranslation |