impala 语法解析器,使用 antlr4 适配 golang 语言,发生了异常 #321
Unanswered
HyDreamFly
asked this question in
Q&A
Replies: 1 comment
-
Hi, 报歉这么晚才看到。 @Header 是 Antlr4 的一种 acrtion ,在 @Header {} 内部的代码会被原封不动的生成在 “生成文件” 的顶部。由于 dt-sql-parser 是 typescript 版本,这里的 import 是 typescript 模块倒导入语法。如果你不需要 ImpalaSqlParser 继承自某个基类,你可以移除
然后重新尝试从 g4 文件中生成。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
antlr4 版本:4.13.1



生成代码结构:
异常位置:
感觉发生问题的原因应该是在 ImpalaSqlParser.g4 这个文件:
有没有解决方案呢?对 antlr4 语法解析器不是很懂
Beta Was this translation helpful? Give feedback.
All reactions