antlr 4 Can't load as lexer or parser

2,436 views
Skip to first unread message

vitel...@gmail.com

unread,
Jan 31, 2013, 11:23:23 AM1/31/13
to antlr-di...@googlegroups.com
I'm using antlr 4 to write my grammar. I would like to see the gui three generated by my grammar. When I try to run the example on the antlr site (http://www.antlr.org/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4) it works, but if I try with my grammar it doesn't work. In particular I've tried also to run the grammar on NetBeans and AntlrWorks 2 with the command "Run in TestRig.." , but the result is the same error message ""Can't load Troubles as lexer or parser"".

Edward Manning

unread,
Oct 10, 2013, 3:33:41 PM10/10/13
to antlr-di...@googlegroups.com
This is a little old now but the cause is that the lexer/parser files generated by Antlr have not been compiled. You've probably missed out the javac *.java step...
Reply all
Reply to author
Forward
0 new messages