milvus/internal/parser/planparserv2
SimFG a55f739608
Separate public proto files (#19782)
Signed-off-by: SimFG <bang.fu@zilliz.com>

Signed-off-by: SimFG <bang.fu@zilliz.com>
2022-10-16 20:49:27 +08:00
..
generated Replace plan parser with antlr (#17090) 2022-05-19 17:15:57 +08:00
check_identical_test.go Add logic for search merging and a simple task scheduler for read tasks (#17022) 2022-05-23 16:41:58 +08:00
check_identical.go Add logic for search merging and a simple task scheduler for read tasks (#17022) 2022-05-23 16:41:58 +08:00
error_listener.go
floating_comparision_test.go
floating_comparision.go
logical_expr_visitor.go
node_ret.go Separate public proto files (#19782) 2022-10-16 20:49:27 +08:00
operators.go Separate public proto files (#19782) 2022-10-16 20:49:27 +08:00
parser_visitor.go Separate public proto files (#19782) 2022-10-16 20:49:27 +08:00
pattern_match_test.go Limit and translate pattern match operations (#16818) 2022-05-07 16:31:52 +08:00
pattern_match.go Limit and translate pattern match operations (#16818) 2022-05-07 16:31:52 +08:00
plan_parser_v2_test.go Separate public proto files (#19782) 2022-10-16 20:49:27 +08:00
plan_parser_v2.go Separate public proto files (#19782) 2022-10-16 20:49:27 +08:00
Plan.g4 Replace plan parser with antlr (#17090) 2022-05-19 17:15:57 +08:00
pool_test.go Fix pool of lexer and parser (#17129) 2022-05-20 18:47:57 +08:00
pool.go Fix pool of lexer and parser (#17129) 2022-05-20 18:47:57 +08:00
README.md
show_visitor.go
utils_test.go Separate public proto files (#19782) 2022-10-16 20:49:27 +08:00
utils.go Separate public proto files (#19782) 2022-10-16 20:49:27 +08:00

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.