We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
环境:ubuntu20.04 ide:clion2021.03
目的: 使用shell生成cpp的语法文件
shell文件
LOCATION=antlr-4.9.3-complete.jar java -jar $LOCATION -Dlanguage=Cpp -listener -visitor -o generated/mysql/ resource/mysql/MySqlLexer.g4 resource/mysql/MySqlParser.g4
遇到问题:
error(114): resource/mysql/MySqlParser.g4:28:21: cannot find tokens file resource/mysql/MySqlLexer.tokens
输出文件遇到的文件 输出文件结构
--resource | -- mysql | -- *.g4 --generated | --mysql | -- resource | --mysql | -- 相应的输出
想要的结构:
--resource | -- mysql | -- *.g4 --generated | --mysql | -- 相应的输出
The text was updated successfully, but these errors were encountered:
在antlr4官方库发现相同的issue https://github.com/antlr/antlr4/issues/638(列出了详细的case,建议查看) https://github.com/antlr/antlr4/pull/2065(解决的方案)
Sorry, something went wrong.
加上-Xexact-output-dir即可解决 java -jar antlr-4.9.3-complete.jar -Xexact-output-dir -o
No branches or pull requests
环境:ubuntu20.04
ide:clion2021.03
目的: 使用shell生成cpp的语法文件
shell文件
LOCATION=antlr-4.9.3-complete.jar java -jar $LOCATION -Dlanguage=Cpp -listener -visitor -o generated/mysql/ resource/mysql/MySqlLexer.g4 resource/mysql/MySqlParser.g4
遇到问题:
error(114): resource/mysql/MySqlParser.g4:28:21: cannot find tokens file resource/mysql/MySqlLexer.tokens
输出文件遇到的文件
输出文件结构
想要的结构:
The text was updated successfully, but these errors were encountered: