Skip to content

NullPointerException in generated parser #22

@SomMeri

Description

@SomMeri

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions