[antlr-interest] Antlr Works debugger hangs on Linux (and Windows)

Jeffrey Newman jeffn at photorepo.com
Tue Dec 7 04:28:40 PST 2010


I'm trying to get Antlr works debugger to work with a simple test
grammer. I'm working on Linux (Suse 11.2).

I get a few steps into the debugger.
and then AntlrWorks hangs.

The linux console shows:
jeffn at merlin-3:/opt/antlr> ./antlrworks
java.lang.NullPointerException
java.lang.NullPointerException
        at
org.antlr.runtime.debug.RemoteDebugEventSocketListener.dispatch(RemoteDebugEventSocketListener.java:275)
        at
org.antlr.runtime.debug.RemoteDebugEventSocketListener.eventHandler(RemoteDebugEventSocketListener.java:176)
        at
org.antlr.runtime.debug.RemoteDebugEventSocketListener.run(RemoteDebugEventSocketListener.java:472)
        at java.lang.Thread.run(Thread.java:662)

So, this looks like a NULL Pointer.
Any suggestions about what I can do to use the Antlrworks debugger?

Any help would really be appreciated.
I've tried to bring this up Windows, and I have a similar problem.

thanks in advance 

Jeffrey


Following is from the events tab.
0
Commence




1
Enter
rule /home/jeffn/tmp/antlr-book/chap-3/Expr.g:prog




2
Location
(6,1)




3
Enter alt 1




4
Location
(6,8)




5
Enter
subrule 1
1




Grammar:


grammar Expr;

prog	:	stat+ ;

stat	:	expr NEWLINE
	|	ID '=' NEWLINE
	|	NEWLINE
	;
	
expr	:	multExpr (('+' | '-') multExpr)*
	;
	
multExpr
	:	atom ('*' atom)*
	;
	
atom	:	INT
	|	ID
	|	'(' expr ')'
	;
	
ID	:	('a'..'z' | 'A'.. 'Z')+ ;
INT	:	'0'..'9'+ ;
NEWLINE :	'\r'? '\n' ;
WS	:	(' ' | '\t' | '\n' | '\r')+  {skip();} ;
		







More information about the antlr-interest mailing list