You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rascal>if (
>>>>>>> /0 := [1,2,3]
>>>>>>>// /0 !:= [1,2,3]
>>>>>>>) {
>>>>>>> println("foo");
>>>>>>>} else {
>>>>>>> println("bar");
>>>>>>>}
Unexpected failure during parsing of current command:
Ambiguous code (internal error), if (
/0 := [1,2,3]
// /0 !:= [1,2,3]
) {
println("foo");
} else {
println("bar");
}
org.rascalmpl.interpreter.asserts.Ambiguous: Ambiguous code (internal error), if (
/0 := [1,2,3]
// /0 !:= [1,2,3]
) {
println("foo");
} else {
println("bar");
}
at org.rascalmpl.parser.uptr.UPTRNodeFactory.buildAmbiguityNode(UPTRNodeFactory.java:76)
at org.rascalmpl.parser.uptr.UPTRNodeFactory.createAmbiguityNode(UPTRNodeFactory.java:85)
at org.rascalmpl.parser.uptr.UPTRNodeFactory.createAmbiguityNode(UPTRNodeFactory.java:23)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.convertToUPTR(SortContainerNodeFlattener.java:183)
at org.rascalmpl.parser.gtd.result.out.DefaultNodeFlattener.convert(DefaultNodeFlattener.java:63)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.buildAlternative(SortContainerNodeFlattener.java:90)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.gatherProduction(SortContainerNodeFlattener.java:65)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.gatherAlternatives(SortContainerNodeFlattener.java:53)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.convertToUPTR(SortContainerNodeFlattener.java:166)
at org.rascalmpl.parser.gtd.result.out.DefaultNodeFlattener.convert(DefaultNodeFlattener.java:63)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.buildAlternative(SortContainerNodeFlattener.java:90)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.gatherProduction(SortContainerNodeFlattener.java:65)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.gatherProduction(SortContainerNodeFlattener.java:71)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.gatherProduction(SortContainerNodeFlattener.java:71)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.gatherAlternatives(SortContainerNodeFlattener.java:53)
at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.convertToUPTR(SortContainerNodeFlattener.java:166)
at org.rascalmpl.parser.gtd.result.out.DefaultNodeFlattener.convert(DefaultNodeFlattener.java:63)
at org.rascalmpl.parser.gtd.result.out.DefaultNodeFlattener.convert(DefaultNodeFlattener.java:79)
at org.rascalmpl.parser.gtd.SGTDBF.buildResult(SGTDBF.java:1306)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1245)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1249)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1261)
at org.rascalmpl.interpreter.Evaluator.parseCommand(Evaluator.java:1052)
at org.rascalmpl.interpreter.Evaluator.parseCommand(Evaluator.java:1042)
at org.rascalmpl.repl.RascalInterpreterREPL.isStatementComplete(RascalInterpreterREPL.java:176)
at org.rascalmpl.repl.BaseRascalREPL.handleInput(BaseRascalREPL.java:119)
at org.rascalmpl.vscode.lsp.terminal.LSPTerminalREPL$1.handleInput(LSPTerminalREPL.java:246)
at org.rascalmpl.repl.BaseREPL.handleInput(BaseREPL.java:179)
at org.rascalmpl.repl.BaseREPL.run(BaseREPL.java:346)
at org.rascalmpl.vscode.lsp.terminal.LSPTerminalREPL.main(LSPTerminalREPL.java:333)
The text was updated successfully, but these errors were encountered:
Describe the bug
This is not ambiguous:
But, this is ambiguous:
The parser seems to be in doubt about whether:
/0 := [1,2,3]\n/
is a regular expression, or// /0 !:= [1,2,3]
is a comment.Stack traces
The text was updated successfully, but these errors were encountered: