英文:
Can't load Rlexer as lexer or parser in Intellij
问题
我在我的系统上安装了Java,我还在互联网上阅读了相关内容,但因为我使用IDE,我仍然遇到了这个错误。与此同时,我想要使用词法分析器来对文本文件进行标记化处理,但我却遇到了这个错误。我该如何修复这个错误?
英文:
I installed Java on my system + I also read the content on the Internet, but still, because I use IDE, I only get this error. At the same time, I want to tokenize a text file using lexer, and I get this error. How can I fix this error?
答案1
得分: 0
解决方案:问题出在我们右键单击语法文件并选择生成 Antlr 识别器选项时,我们必须将包含 Java 文件的gen目录标记为根源。Java 文件不在我们的输出目录(out)中,因此IDE无法找到 Java 文件,因此出现了上述错误。
英文:
Solution: The problem was that when we right-clicked on the grammar file and selected the Generate Antlr Recognizer option, we had to mark the gen directory that contained the Java file as the root source.
Java file was not in our output directory (out), the IDE could not find Java files and because of this it gave the above mentioned error..
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论