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] antlrv4 plugin v1.8.3 fails to generate parse tree visitor for spark sql (SqlBase.g4) #292

Closed
debugger87 opened this issue Dec 28, 2016 · 4 comments

Comments

@debugger87
Copy link

  • Intellij Idea Env
IntelliJ IDEA 2016.3.1
Build #IU-163.9166.29, built on December 9, 2016
JRE: 1.8.0_112-release-408-b2 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • SqlBase.g4

antlrv4 plugin v1.8.2 works well for SqlBase.g4, but v1.8.3 fails.

@debugger87 debugger87 changed the title [Bug] antlrv4 plugin v1.8.3 plugin fail to generate parse tree visitor for spark sql (SqlBase.g4) [Bug] antlrv4 plugin v1.8.3 fails to generate parse tree visitor for spark sql (SqlBase.g4) Dec 28, 2016
@parrt
Copy link
Member

parrt commented Mar 31, 2017

Any hints about error messages etc...?

@parrt
Copy link
Member

parrt commented Mar 31, 2017

Ah. No input even. I get an exception.

antlr can't process SqlBase.g4
java.lang.NullPointerException
	at org.antlr.v4.automata.ParserATNFactory.elemList(ParserATNFactory.java:468)
	at org.antlr.v4.automata.ParserATNFactory.alt(ParserATNFactory.java:455)
	at org.antlr.v4.parse.ATNBuilder.alternative(ATNBuilder.java:559)
	at org.antlr.v4.parse.ATNBuilder.ruleBlock(ATNBuilder.java:293)
	at org.antlr.v4.automata.ParserATNFactory._createATN(ParserATNFactory.java:161)
	at org.antlr.v4.automata.LexerATNFactory.createATN(LexerATNFactory.java:120)
	at org.antlr.v4.Tool.processNonCombinedGrammar(Tool.java:389)
	at org.antlr.v4.Tool.process(Tool.java:354)
	at org.antlr.intellij.plugin.ANTLRv4ExternalAnnotator.doAnnotate(ANTLRv4ExternalAnnotator.java:112)
	at org.antlr.intellij.plugin.ANTLRv4ExternalAnnotator.doAnnotate(ANTLRv4ExternalAnnotator.java:44)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:184)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:46)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:126)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327)
	at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:271)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:286)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:244)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
	at com.intellij.util.Alarm$Request$1.run(Alarm.java:352)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:298)
	at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:295)
	at com.intellij.util.concurrency.QueueProcessor$2$1.run(QueueProcessor.java:110)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
	at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:107)
	at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:104)
	at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:215)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
	at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:212)
	at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:365)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
	at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)

@parrt
Copy link
Member

parrt commented Apr 5, 2017

Rats. this is really an antlr bug. Filed antlr/antlr4#1815

@parrt parrt added this to the 1.8.4 milestone Apr 6, 2017
@parrt
Copy link
Member

parrt commented Apr 6, 2017

Fixed by pulling in a preview of ANTLR 4.7.1

@parrt parrt closed this as completed Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants