Getting an NPE from the parser when parsing SpoofaxLang.generated.pp in Spoofax r23367:

Narrowed down to this snippet (possibly not the smallest yet):


[
KeywordFollowRestriction.1:parameterized-sort.1:“Lookaheads” – ,
simple-ref-group – _1,
prods-ref-group – V [V vs=2 [KW[“{”] _1] KW[“}”]],
prods-ref-group.1:iter – _1,
assoc-ref-group – KW[“{”] _1 KW[“:”] _2 KW[“}”],
assoc-ref-group.1:parameterized-sort – _1 _2,
assoc-ref-group.1:parameterized-sort.1:“Associativity” – ,
assoc-ref-group.2:iter – _1,
TemplateSection – V [H [KW[“templates”]] _1],
TemplateSection.1:iter-star – _1,
SdfProduction – _1 KW[“=”] _2 _3,
TemplateProductionWithCons.3:parameterized-sort.1:“Attributes” – ]

It Seems “Lookaheads” etc. aren’t proper pp syntax, but parser shouldn’t NPE on it in any case .

Strangely there is no stack in the Eclipse error log, just:


java.lang.NullPointerException

I’ll see if I can get a trace later in the debugger.

Submitted by Tobi Vollebregt on 19 September 2011 at 17:14

On 19 September 2011 at 17:32 Lennart Kats tagged parser

On 19 September 2011 at 19:56 Tobi Vollebregt commented:

Stack (now on Spoofax r23358):

NewStructureSkipper.readLine(IndentInfo) line: 465
NewStructureSkipper.readLine(int) line: 459
NewStructureSkipper.isScopeClosingLine(int) line: 440
NewStructureSkipper.findParentBegin(int) line: 418
NewStructureSkipper.getParentSkipSuggestions(int) line: 139
RegionRecovery.selectErroneousFragment() line: 122
RecoveryConnector.combinedRecover() line: 62
RecoveryConnector.recover() line: 48
SGLR(SGLR).sglrParse(String) line: 316
SGLR(SGLR).parse(String, String, String) line: 297
SGLR(SGLR).parse(String, String, String, boolean, int) line: 278
JSGLRI.doParse(String, String) line: 174
JSGLRI(AbstractSGLRI).parse(String, String) line: 112
SGLRParseController.doParse(String, String) line: 347
SGLRParseController.parse(String, IProgressMonitor) line: 285
SGLRParseController.parse(String, IProgressMonitor) line: 1
BoxPPParseController(DynamicParseController).parse(String, IProgressMonitor) line: 169
ParserScheduler.run(IProgressMonitor) line: 86
Worker.run() line: 54


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

Ah, this looks like a duplicate of https://yellowgrass.org/issue/Spoofax/355 then.


On 19 September 2011 at 20:06 Tobi Vollebregt closed this issue.

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

On 22 December 2011 at 16:55 Lennart Kats tagged duplicate

On 22 December 2011 at 16:55 Lennart Kats removed tag 1.0

Log in to post comments