aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/reflect/sql_reflect.h
blob: dec5ff98816cad7e8182f81c793e6faea766b44f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <util/generic/string.h>
#include <util/generic/hash.h>
#include <util/generic/hash_set.h>
#include <util/generic/vector.h>

namespace NSQLReflect {

    struct TLexerGrammar {
        THashSet<TString> KeywordNames;
        THashSet<TString> PunctuationNames;
        TVector<TString> OtherNames;
        THashMap<TString, TString> BlockByName;

        static const TStringBuf KeywordBlockByName(const TStringBuf name);
        static const TString KeywordNameByBlock(const TStringBuf block);
    };

    TLexerGrammar LoadLexerGrammar();

} // namespace NSQLReflect