[antlr-interest] gUnitEditor

Gavin Lambert antlr at mirality.co.nz
Mon Apr 20 01:31:10 PDT 2009


At 12:20 20/04/2009, Aaron Leiby wrote:
>I think my first problem was that I was expecting it to compile 
>the grammar for me as needed.  When it didn't do that, I had 
>ANTLRworks export the .java files for me, and when that didn't 
>work, I had ANTLRworks compile it for me (via its automatic 
>support when using its Debug... facilities).  Unfortunately, that 
>puts all the .class files nicely in a 'class' 
>subdirectory.  Finally, I simply compiled my .java code manually 
>via commandline, and that seemed to have done the trick, however, 
>it then just locked up when I pressed run.

When you compiled your grammar on the command line, did you 
include the -debug switch?  (Or could it have picked up stray 
.java or .class files that had been generated using that switch?)

Because using -debug makes ANTLR quite intentionally "lock up" 
immediately on startup -- it's waiting for a socket connection 
from ANTLRWorks' Debug Remote feature.

(Other likely causes of lockups: you have a top-level lexer rule 
that can successfully match zero characters, most often the result 
of using * when you meant +.  Don't do that.)



More information about the antlr-interest mailing list