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

NullPointerException on parse error #14

Open
lukaseder opened this issue Jun 9, 2017 · 0 comments
Open

NullPointerException on parse error #14

lukaseder opened this issue Jun 9, 2017 · 0 comments

Comments

@lukaseder
Copy link
Collaborator

On certain parse errors, there is a null pointer exception being thrown. For instance, when parsing this:

abc = x [

The following exception is thrown:

java.lang.NullPointerException
	at chrriis.grammar.model.BNFToGrammar$Chunk.prune(BNFToGrammar.java:70)
	at chrriis.grammar.model.BNFToGrammar$Chunk.prune(BNFToGrammar.java:147)
	at chrriis.grammar.model.BNFToGrammar$Chunk.access$1(BNFToGrammar.java:68)
	at chrriis.grammar.model.BNFToGrammar.createRule(BNFToGrammar.java:330)
	at chrriis.grammar.model.BNFToGrammar.convert(BNFToGrammar.java:300)
	at chrriis.grammar.rrdiagram.RRDiagramTests.grammar(RRDiagramTests.java:95)
	at chrriis.grammar.rrdiagram.RRDiagramTests.testParseError(RRDiagramTests.java:78)

This can be rather cumbersome if the grammar is large, as there is no indication whatsoever about what went wrong.

@lukaseder lukaseder added this to the 0.9.4 milestone Jun 9, 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