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

Null ptr exception in SqlBase.g4 #1815

Closed
parrt opened this issue Apr 5, 2017 · 1 comment
Closed

Null ptr exception in SqlBase.g4 #1815

parrt opened this issue Apr 5, 2017 · 1 comment

Comments

@parrt
Copy link
Member

parrt commented Apr 5, 2017

SqlBase.g4 gives

$ a4.7 SqlBase.g4 
warning(156): SqlBase.g4:951:7: invalid escape sequence
warning(156): SqlBase.g4:951:16: invalid escape sequence
warning(156): SqlBase.g4:951:41: invalid escape sequence
error(144): SqlBase.g4:951:15: multi-character literals are not allowed in lexer sets: '
Exception in thread "main" java.lang.NullPointerException
	at org.antlr.v4.automata.ParserATNFactory.elemList(ParserATNFactory.java:469)
	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.v4.Tool.processGrammarsOnCommandLine(Tool.java:321)
	at org.antlr.v4.Tool.main(Tool.java:168)

The '\" give that "multi-character literals are not ..." error. Should be better as that will be common.

@parrt parrt closed this as completed in 80aa790 Apr 6, 2017
parrt added a commit that referenced this issue Apr 6, 2017
Fixes #1815. Invalid escape error msgs kinda sucked. Prevent null ptr later in pipeline.
@parrt parrt reopened this Apr 6, 2017
@parrt
Copy link
Member Author

parrt commented Apr 6, 2017

Crap. Got too focused on error messages and antlr tests. forgot to test on SqlBase.g4! Now I get:

warning(156): SqlBase.g4:951:7: invalid escape sequence \"
warning(156): SqlBase.g4:951:16: invalid escape sequence \"
warning(156): SqlBase.g4:951:41: invalid escape sequence \"
error(144): SqlBase.g4:951:15: multi-character literals are not allowed in lexer sets: '\
Exception in thread "main" java.lang.NullPointerException
	at org.antlr.v4.automata.ParserATNFactory.elemList(ParserATNFactory.java:469)
...

@parrt parrt closed this as completed in f858cd5 Apr 6, 2017
parrt added a commit that referenced this issue 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

1 participant