mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 19:08:30 +08:00
a55f739608
Signed-off-by: SimFG <bang.fu@zilliz.com> Signed-off-by: SimFG <bang.fu@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
.