When attempting to create an editor for the RTG language I got the following exception (in the Eclipse error log) right after substituting the EntityLang grammar for the RTG grammar.

Lennart said he had seen this before, although not with the stack trace.

A workaround is to convert the parse table to text (using baffle) and include that in the main.esv file.

Here is the exception:

java.lang.RuntimeException: org.strategoxt.imp.runtime.dynamicloading.BadDescriptorException: Exception occurred when initializing IParseController editor service for rtg
...
Caused by: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 3
	at org.strategoxt.imp.runtime.parser.JSGLRI.getParseTable(JSGLRI.java:79)
	at org.strategoxt.imp.runtime.parser.JSGLRI.resetState(JSGLRI.java:117)
	at org.strategoxt.imp.runtime.parser.JSGLRI.<init>(JSGLRI.java:47)
	at org.strategoxt.imp.runtime.parser.SGLRParseController.<init>(SGLRParseController.java:201)
	at org.strategoxt.imp.runtime.dynamicloading.ParseControllerFactory.create(ParseControllerFactory.java:38)
	at org.strategoxt.imp.runtime.dynamicloading.ParseControllerFactory.create(ParseControllerFactory.java:1)
	at org.strategoxt.imp.runtime.dynamicloading.Descriptor.createService(Descriptor.java:162)
	... 67 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
	at aterm.pure.BAFReader.readTerm(BAFReader.java:203)
	at aterm.pure.BAFReader.readFromBinaryFile(BAFReader.java:116)
	at aterm.pure.PureFactory.readFromBinaryFile(PureFactory.java:796)
	at aterm.pure.PureFactory.readFromFile(PureFactory.java:805)
	at org.spoofax.jsglr.ParseTableManager.loadFromStream(ParseTableManager.java:115)
	at org.strategoxt.imp.runtime.Environment.loadParseTable(Environment.java:249)
	at org.strategoxt.imp.runtime.dynamicloading.ParseTableProvider.get(ParseTableProvider.java:53)
	at org.strategoxt.imp.runtime.parser.JSGLRI.getParseTable(JSGLRI.java:77)
	... 73 more

This is with Spoofax/IMP 0.5.3.94

Submitted by Tobi Vollebregt on 23 November 2010 at 13:46
rtg.tbl23 November 2010 at 13:48

On 12 January 2011 at 13:25 Nathan Bruning commented:

The literal string value “<int>” in the parse table tricked the parser to think it should read an integer value, instead of a string application.
Fixed as of r21673.


On 12 January 2011 at 13:25 Nathan Bruning closed this issue.

On 12 January 2011 at 13:37 Lennart Kats tagged @nathanbruning

On 12 January 2011 at 13:38 Lennart Kats tagged 1.0

Log in to post comments