mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 09:38:39 +08:00
issue: #40729 Current approach to parse negative numbers is first parse the numeric part and then multiply the result by -1(mainly to distinguish the precedence of the negative sign and the subtraction operator). However, for the minimum value of int64(`-9223372036854775808`), the value `9223372036854775808` already exceeds the representable range of int64. As a result, parsing error occurs. Therefore, use a specific rule to match `-9223372036854775808`. --------- Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Generate Parser with Antlr4
Install Antlr4
Please follow install antlr4 to install the antlr tool.
The version of antlr tool: 4.13.2.
Code Generate
After you install the antlr4, you can generate the parser code in golang with:
go generate
All generated code will be under directory generated.