milvus/internal/parser/planparserv2
Jiquan Long 6578a27fe7
Support empty expression (#26153)
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
2023-08-10 08:37:15 +08:00
..
generated Support escape string (#24848) 2023-07-25 10:29:01 +08:00
check_identical_test.go Move some modules from internal to public package (#22572) 2023-04-06 19:14:32 +08:00
check_identical.go Move some modules from internal to public package (#22572) 2023-04-06 19:14:32 +08:00
error_listener.go Support antlr as plan parser (#16696) 2022-05-06 17:43:51 +08:00
floating_comparision_test.go Support antlr as plan parser (#16696) 2022-05-06 17:43:51 +08:00
floating_comparision.go Support antlr as plan parser (#16696) 2022-05-06 17:43:51 +08:00
logical_expr_visitor.go Support antlr as plan parser (#16696) 2022-05-06 17:43:51 +08:00
node_ret.go Use go-api/v2 for milvus-proto (#24770) 2023-06-09 01:28:37 +08:00
operators.go Use go-api/v2 for milvus-proto (#24770) 2023-06-09 01:28:37 +08:00
parser_visitor.go Support escape string (#24848) 2023-07-25 10:29:01 +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 Support empty expression (#26153) 2023-08-10 08:37:15 +08:00
plan_parser_v2.go Support empty expression (#26153) 2023-08-10 08:37:15 +08:00
Plan.g4 Support escape string (#24848) 2023-07-25 10:29:01 +08:00
pool_test.go Json key must be enclosed in double quotes (#24113) 2023-05-16 16:19:22 +08:00
pool.go Fix pool of lexer and parser (#17129) 2022-05-20 18:47:57 +08:00
README.md Support antlr as plan parser (#16696) 2022-05-06 17:43:51 +08:00
show_visitor.go Move some modules from internal to public package (#22572) 2023-04-06 19:14:32 +08:00
utils_test.go Support empty expression (#26153) 2023-08-10 08:37:15 +08:00
utils.go Support empty expression (#26153) 2023-08-10 08:37:15 +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.