summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/proto_parser/proto_parser.h
blob: 39f8f2cbf2e59e8f58f030164d146ce62b108b90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include <yql/essentials/parser/proto_ast/common.h>
#include <yql/essentials/public/issue/yql_warning.h>
#include <yql/essentials/public/issue/yql_issue_manager.h>
#include <yql/essentials/sql/settings/translation_settings.h>

#include <google/protobuf/message.h>

namespace NSQLTranslation {
struct TTranslationSettings;
} // namespace NSQLTranslation

namespace NSQLTranslationV1 {

struct TParsers {
    NSQLTranslation::TParserFactoryPtr Antlr3;
    NSQLTranslation::TParserFactoryPtr Antlr3Ansi;
    NSQLTranslation::TParserFactoryPtr Antlr4;
    NSQLTranslation::TParserFactoryPtr Antlr4Ansi;
};

google::protobuf::Message* SqlAST(const TParsers& parsers, const TString& query, const TString& queryName,
                                  NYql::TIssues& err, size_t maxErrors, bool ansiLexer, bool antlr4Parser, google::protobuf::Arena* arena);
google::protobuf::Message* SqlAST(const TParsers& parsers, const TString& query, const TString& queryName,
                                  NAST::IErrorCollector& err, bool ansiLexer, bool antlr4Parser, google::protobuf::Arena* arena);

} // namespace NSQLTranslationV1