antlr / antlr/antlr3

NullPointerException in generated parser

Open
#22 1 comment 0 reactions 1 assignee Claimed by @parrt View on GitHub
comp:runtime target:java
Dominant language
Java
Stars
253
Forks
178
PR merge metrics
No merged PRs in 30d

Description

Generated parser throws `NullPointerException` on some syntactically incorrect inputs. Only some syntactically incorrect inputs cause an exception, others work fine. For example, attached grammar throws null pointer exception on `p:not*()` but not on `p:not(()`.

The issue is reproducible on both ANTLR3.3 and ANTLR3.4.

The linked gist contains:
- Smallest ANTLR grammer I was able to create that has the issue.
- Unit test with two failing and two passing methods.
- Exception thrown by ANTLR v3.4.
- Exception thrown by ANTLR v3.3.

Gist: https://gist.github.com/2952908

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.