1

I install antlr in my eclipse. And set antlr-code generator-output folder-project relative folder as antlr-generator.

I can new grammar file (grammar.g)and compile it successfully. There isn't files in the folder (antlr-generator) But files: grammarLexer.java and grammarParser.java are not created.

How can fix this issue?

Janet
  • 13
  • 3

1 Answers1

0

Just installed Eclipse Indigo and ANTLR 3.4 on Windows 7x64 and had the same problem and no errors on the ANTLR Console. Uninstalled java and installed latest v7 update 4 (32 and 64 bit) and cleaned up classpath and path environment variables. Still no files generated but now I was seeing error "No such directory: org/antlr/tool/templates/dot/dfa" in the ANTLR Console. The fix is in Eclipse under Window, Preferences, ANTLR, Builder, Building. In the General section, make sure that -nfa and -dfa are unchecked. This fixed it for me.

I am not an expert programmer and have yet to write an ANTLR program. Probably others here can figure out how to fix the directory not found error.

I ended up creating this article on configuring ANTLR IDE in case you never go this working or just wanted to check your configuration. And this article on testing/debugging may be helpful also.

Community
  • 1
  • 1
cb4
  • 6,689
  • 7
  • 45
  • 57