teragrep / pth_03

Data Processing Language (DPL) parser
GNU Affero General Public License v3.0
0 stars 5 forks source link

"||" query causes NPE #38

Closed StrongestNumber9 closed 3 months ago

StrongestNumber9 commented 3 months ago

Describe the bug

%dpl
||

Causes

java.lang.NullPointerException
    at com.teragrep.pth_07.DPLExecutor$2.syntaxError(DPLExecutor.java:161)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.DefaultErrorStrategy.reportUnwantedToken(DefaultErrorStrategy.java:377)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.DefaultErrorStrategy.singleTokenDeletion(DefaultErrorStrategy.java:548)
    at com.teragrep.pth_03.shaded.org.antlr.v4.runtime.DefaultErrorStrategy.sync(DefaultErrorStrategy.java:266)
    at com.teragrep.pth_03.antlr.DPLParser.transformStatement(DPLParser.java:6652)
    at com.teragrep.pth_03.antlr.DPLParser.root(DPLParser.java:3128)
    at com.teragrep.pth_07.DPLExecutor.interpret(DPLExecutor.java:170)
    at com.teragrep.pth_07.DPLInterpreter.internalInterpret(DPLInterpreter.java:159)

Expected behavior

Valid error

How to reproduce

Execute || query

Screenshots

Software version

Desktop (please complete the following information if relevant):

Additional context

grafour commented 3 months ago

can you specify how you performed the query?

51-code commented 3 months ago

This is an issue in PTH-07: #13.