aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/parser/proto_ast/gen/v0_proto/ya.make.gen
blob: faa69469f13b00eb4fa82220e6dc3c9711ba4618 (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
29
PROTO_LIBRARY()

IF (GEN_PROTO)

    SET(antlr_output ${ARCADIA_BUILD_ROOT}/${MODDIR})
    SET(antlr_templates ${antlr_output}/org/antlr/codegen/templates)
    SET(sql_grammar ${ARCADIA_ROOT}/yql/essentials/sql/v0/SQL.g)

    SET(ANTLR_PACKAGE_NAME NSQLGenerated)

    CONFIGURE_FILE(${ARCADIA_ROOT}/yql/essentials/parser/proto_ast/org/antlr/codegen/templates/protobuf/protobuf.stg.in ${antlr_templates}/protobuf/protobuf.stg)

    RUN_ANTLR(
        ${sql_grammar}
        -lib .
        -fo ${antlr_output}
        -language protobuf
        IN ${sql_grammar} ${antlr_templates}/protobuf/protobuf.stg
        OUT_NOAUTO SQLParser.proto
        CWD ${antlr_output}
    )

ENDIF()

SRCS(SQLParser.proto)

EXCLUDE_TAGS(GO_PROTO JAVA_PROTO)

END()