Skip to content

avoid java.lang.StackOverflowError #1105

@WolfgangFahl

Description

@WolfgangFahl

see http://stackoverflow.com/questions/31193527/stackoverflowerror-in-antlr4

The LexerATNSimulator should IMHO give up after a certain number of recursions before the StackOverflowError happens and spit out some information what is going on to help debug the grammer that causes the problem.

java.lang.StackOverflowError
    at org.antlr.v4.runtime.atn.LexerATNSimulator.getEpsilonTarget(LexerATNSimulator.java:499)
    at org.antlr.v4.runtime.atn.LexerATNSimulator.closure(LexerATNSimulator.java:480)
    at org.antlr.v4.runtime.atn.LexerATNSimulator.closure(LexerATNSimulator.java:482)
    at org.antlr.v4.runtime.atn.LexerATNSimulator.closure(LexerATNSimulator.java:482)
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions