[antlr-interest] Composite grammar debug

Jeff Wilcox jeff.wilcox at mac.com
Tue May 19 06:26:36 PDT 2009


Greetings,

I am running into an issue (remote) debugging a large composite  
grammar with ANTLRworks & the java target.  I know the composite  
grammar support is a bit new but I haven't seen any issues posted on  
this so I figured I'd either flag it or see if there is something I am  
doing wrong.

After connecting the session I get the following in the events list  
"Rewind -2147483648" every step (using break on all).  Also the  
following exception shows up in the console with each step:

[06:03:26] java.util.EmptyStackException
	at java.util.Stack.peek(Stack.java:79)
	at org.antlr.works.debugger.tivo.DBPlayer.playRewind(Unknown Source)
	at org.antlr.works.debugger.tivo.DBPlayer.playEvent(Unknown Source)
	at org.antlr.works.debugger.tivo.DBPlayer.playEvents(Unknown Source)
	at org.antlr.works.debugger.Debugger.playEvents(Unknown Source)
	at org.antlr.works.debugger.tivo.DBRecorder.playEvents(Unknown Source)
	at org.antlr.works.debugger.tivo.DBRecorder 
$PlayEventRunnable.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at  
java 
.awt 
.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 
269)
	at  
java 
.awt 
.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java: 
190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java: 
184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java: 
176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


Other details abut the grammar that may be useful:
options {
	backtrack=true;
    	output=AST;
	ASTLabelType=CommonTree;
}

Also this is imports 5 parser grammars (I told you it was large) and 1  
lexer grammar into a top level combined grammar.  All grammars were  
open in ANTLRworks during debug.

Any pointers appreciated.

Thanks
Jeff


More information about the antlr-interest mailing list