teragrep / pth_10

Data Processing Language (DPL) translator for Apache Spark
GNU Affero General Public License v3.0
0 stars 6 forks source link

EmptyStackException on somewhat invalid input #204

Closed StrongestNumber9 closed 9 months ago

StrongestNumber9 commented 9 months ago

Describe the bug

%dpl
]

causes

java.util.EmptyStackException
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.Lexer.popMode(Lexer.java:192)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.atn.LexerPopModeAction.execute(LexerPopModeAction.java:58)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.atn.LexerActionExecutor.execute(LexerActionExecutor.java:168)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.atn.LexerATNSimulator.accept(LexerATNSimulator.java:366)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.atn.LexerATNSimulator.failOrAccept(LexerATNSimulator.java:299)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.atn.LexerATNSimulator.execATN(LexerATNSimulator.java:230)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.atn.LexerATNSimulator.match(LexerATNSimulator.java:114)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.Lexer.nextToken(Lexer.java:141)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.BufferedTokenStream.fetch(BufferedTokenStream.java:169)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.BufferedTokenStream.sync(BufferedTokenStream.java:152)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.BufferedTokenStream.consume(BufferedTokenStream.java:136)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:537)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)
    at com.teragrep.pth_03.antlr.DPLParser.searchTransformationRoot(DPLParser.java:3168)
    at com.teragrep.pth_03.antlr.DPLParser.root(DPLParser.java:3097)
    at com.teragrep.pth_07.DPLExecutor.interpret(DPLExecutor.java:165)
    at com.teragrep.pth_07.DPLInterpreter.internalInterpret(DPLInterpreter.java:159)
    at org.apache.zeppelin.interpreter.AbstractInterpreter.interpret(AbstractInterpreter.java:47)
    at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:110)
    at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:860)
    at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:752)
    at org.apache.zeppelin.scheduler.Job.run(Job.java:172)
    at org.apache.zeppelin.scheduler.AbstractScheduler.runJob(AbstractScheduler.java:132)
    at org.apache.zeppelin.scheduler.FIFOScheduler.lambda$runJobInScheduler$0(FIFOScheduler.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)

Expected behavior

Error message about input not being able to be parsed

How to reproduce

%dpl
]

Screenshots

Software version

Desktop (please complete the following information if relevant):

Additional context

StrongestNumber9 commented 9 months ago

Actually pth_03 issue, internal issue 107