Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: parser returned null output even though parsing did not fail #121

Open
MeAmAnUsername opened this issue Jul 13, 2022 · 0 comments
Open
Labels
C-Bug Category: bug. Not working as expected

Comments

@MeAmAnUsername
Copy link

Summary

List elements with indent and offside constraint result in error in the title

What you did

Grammar:

context-free start-symbols
  Exp
context-free sorts
  Exp
context-free syntax
  Exp.Num = NAT
  Exp.List = <[<elems:{Exp ", "}*>]>
    {layout(indent "[" elems && offside "[" elems)}

lexical sorts NAT
lexical syntax
  NAT = [0-9]+
lexical restrictions
  NAT -/- [0-9]
lexical syntax
  LAYOUT = [\ \n\t\v\f\r]
context-free restrictions
  LAYOUT? -/- [\ \n\t\v\f\r]

File:

[
 1,
2,
3
]

What you expected to happen

Parses successfully

What actually happened

Parsing fails with error: java.lang.RuntimeException: BUG: parser returned null output even though parsing did not fail

Context

  • Spoofax version: Spoofax-pie 0.19.2
  • Operating system & version: MacOS Mojave, 10.14.6 (18G9323)
  • Java version (if applicable): 11 (bundled with Spoofax)
  • Eclipse version (if applicable): 4.23.0.20220310-1200
  • Gradle version (if applicable): N.A.

Additional information

Error log:

java.lang.RuntimeException: BUG: parser returned null output even though parsing did not fail
	at mb.jsglr1.common.JSGLR1Parser.parse(JSGLR1Parser.java:52)
	at mb.rpgdsl.RpgdslParser.parse(%2Frpgdsl%2Fbuild%2Fgenerated%2Fsources%2Flanguage%2Fmb%2Frpgdsl%2FRpgdslParser.java:19)
	at mb.rpgdsl.task.RpgdslParse.parse(%2Frpgdsl%2Fbuild%2Fgenerated%2Fsources%2Fadapter%2Fmb%2Frpgdsl%2Ftask%2FRpgdslParse.java:50)
	at mb.jsglr.pie.JsglrParseTaskDef.exec(JsglrParseTaskDef.java:102)
	at mb.jsglr.pie.JsglrParseTaskDef.exec(JsglrParseTaskDef.java:22)
	at mb.pie.api.Task.exec(Task.java:56)
	at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:130)
	at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:87)
	at mb.pie.runtime.exec.BottomUpRunner.exec(BottomUpRunner.java:419)
	at mb.pie.runtime.exec.BottomUpRunner.execAndSchedule(BottomUpRunner.java:132)
	at mb.pie.runtime.exec.BottomUpRunner.execScheduled(BottomUpRunner.java:119)
	at mb.pie.runtime.exec.BottomUpRunner.requireInitial(BottomUpRunner.java:82)
	at mb.pie.runtime.MixedSessionImpl.lambda$updateAffectedBy$0(MixedSessionImpl.java:72)
	at mb.pie.runtime.SessionImpl.handleException(SessionImpl.java:233)
	at mb.pie.runtime.MixedSessionImpl.updateAffectedBy(MixedSessionImpl.java:72)
	at mb.spoofax.eclipse.pie.PieRunner.updateAffectedBy(PieRunner.java:509)
	at mb.spoofax.eclipse.pie.PieRunner.addOrUpdateEditor(PieRunner.java:144)
	at mb.spoofax.eclipse.editor.EditorUpdateJob.update(EditorUpdateJob.java:112)
	at mb.spoofax.eclipse.editor.EditorUpdateJob.run(EditorUpdateJob.java:79)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
@MeAmAnUsername MeAmAnUsername added the C-Bug Category: bug. Not working as expected label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug Category: bug. Not working as expected
Projects
None yet
Development

No branches or pull requests

1 participant