Steps to reproduce:

Take the EntityLang generated by the wizard. Replace the context-free syntax with:


context-free syntax

Definition*   -> Start {cons("Module")}
"{" Part1 "}" -> Definition {cons("Def")}
"part1"       -> Part1 {cons("Part1")}

Replace the example module with:


{
p
}

Now put the cursor after the p and hit ctrl+space to trigger completion.

This will raise the following NPE:


Internal parsing error: null
java.lang.NullPointerException
at org.spoofax.jsglr.client.NewStructureSkipper.readLine(NewStructureSkipper.java:465)
at org.spoofax.jsglr.client.NewStructureSkipper.readLine(NewStructureSkipper.java:459)
at org.spoofax.jsglr.client.NewStructureSkipper.isScopeClosingLine(NewStructureSkipper.java:440)
at org.spoofax.jsglr.client.NewStructureSkipper.findParentBegin(NewStructureSkipper.java:418)
at org.spoofax.jsglr.client.NewStructureSkipper.getParentSkipSuggestions(NewStructureSkipper.java:139)
at org.spoofax.jsglr.client.RegionRecovery.selectErroneousFragment(RegionRecovery.java:121)
at org.spoofax.jsglr.client.RecoveryConnector.combinedRecover(RecoveryConnector.java:63)
at org.spoofax.jsglr.client.RecoveryConnector.recover(RecoveryConnector.java:48)
at org.spoofax.jsglr.client.SGLR.sglrParse(SGLR.java:292)
at org.spoofax.jsglr.client.SGLR.parse(SGLR.java:271)
at org.strategoxt.imp.runtime.parser.JSGLRI.doParse(JSGLRI.java:163)
at org.strategoxt.imp.runtime.parser.AbstractSGLRI.parse(AbstractSGLRI.java:106)
at org.strategoxt.imp.runtime.parser.SGLRParseController.doParse(SGLRParseController.java:343)
at org.strategoxt.imp.runtime.parser.SGLRParseController.parse(SGLRParseController.java:281)
at org.strategoxt.imp.runtime.parser.SGLRParseController.parse(SGLRParseController.java:1)
at org.strategoxt.imp.runtime.dynamicloading.DynamicParseController.parse(DynamicParseController.java:168)
at org.eclipse.imp.editor.ParserScheduler.run(ParserScheduler.java:86)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Note: This happens only if there is indentation on the line where completion is triggered. When there is no indentation, there is no NPE.

Edit: This is with Spoofax r22419.

Submitted by Tobi Vollebregt on 22 March 2011 at 12:53

On 22 March 2011 at 13:02 Lennart Kats tagged @maartje

On 22 March 2011 at 13:02 Lennart Kats tagged error

On 22 March 2011 at 13:02 Lennart Kats tagged parser

On 23 March 2011 at 14:55 Tobi Vollebregt tagged completion

On 30 March 2011 at 14:33 Tobi Vollebregt removed tag completion

On 19 September 2011 at 20:07 Tobi Vollebregt commented:

An easier way to reproduce in this duplicate: https://yellowgrass.org/issue/Spoofax/426


On 20 September 2011 at 16:15 Maartje closed this issue.

On 20 September 2011 at 16:15 Maartje commented:

bug fixed


On 17 October 2011 at 17:37 Lennart Kats tagged completion

On 22 December 2011 at 16:50 Lennart Kats tagged 1.0

Log in to post comments