mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 05:18:52 +08:00
8139106b51
Signed-off-by: longjiquan <jiquan.long@zilliz.com> |
||
---|---|---|
.. | ||
generated | ||
check_identical_test.go | ||
check_identical.go | ||
error_listener.go | ||
floating_comparision_test.go | ||
floating_comparision.go | ||
logical_expr_visitor.go | ||
node_ret.go | ||
operators.go | ||
parser_visitor.go | ||
pattern_match_test.go | ||
pattern_match.go | ||
plan_parser_v2_test.go | ||
plan_parser_v2.go | ||
Plan.g4 | ||
pool_test.go | ||
pool.go | ||
README.md | ||
show_visitor.go | ||
utils_test.go | ||
utils.go |
Generate Parser with Antlr4
Install Antlr4
Please follow install antlr4 to install the antlr tool.
The version of antlr tool: 4.9
.
Code Generate
After you install the antlr4, you can generate the parser code in golang with:
export CLASSPATH=".:${PWD}/antlr-4.9-complete.jar:$CLASSPATH"
alias antlr4='java -Xmx500M -cp "${PWD}/antlr-4.9-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
alias grun='java -Xmx500M -cp "${PWD}/antlr-4.9-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig'
antlr4 -Dlanguage=Go -package planparserv2 -o generated -no-listener -visitor Plan.g4
All generated code will be under directory generated
.