[antlr-interest] Antlr Error Message

Behdad Forghani behdad.forghani at samsarasol.com
Thu Mar 19 11:00:51 PDT 2009


Hello,

Has anybody seen this error before?
Exception in thread "main" java.lang.RuntimeException: more than one
node as root (TODO: make exception hierarchy)
	at
org.antlr.runtime.tree.BaseTreeAdaptor.becomeRoot(BaseTreeAdaptor.java:150)

The first rule of the grammar is:
moduleDefinitions :
	moduleDefinition+;

So, I do not think I have more than one root node.

In AntlrWorks I get a different error:
 javax.swing.text.BadLocationException: Position not represented by view
	at javax.swing.text.CompositeView.modelToView(CompositeView.java:258)
	at javax.swing.text.BoxView.modelToView(BoxView.java:467)
	at javax.swing.plaf.basic.BasicTextUI
$RootView.modelToView(BasicTextUI.java:1497)
	at
javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1035)
	at
javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1010)
	at
javax.swing.text.JTextComponent.modelToView(JTextComponent.java:1400)
	at org.antlr.works.debugger.input.DBInputProcessorToken$1.run(Unknown
Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


Thanks



More information about the antlr-interest mailing list