I'm back to working on this problem. I've got 4.11.2-SNAPSHOT running on my machine, and it demostrates the issue in both the Python3 and Java runtimes. The Python version of the parser crashes with "RecursionError: maximum recursion depth exceeded", and the tracback shows the following sequence. The Java version, in debug under Eclipse, just runs forever, but any time I stop it, the stack for the TestRig thread looks the same.
Traceback (most recent call last):
File "C:\Ross\Source\antlr\pyenv\rexx\build\mockit.py", line 218, in <module>
main(sys.argv)
File "C:\Ross\Source\antlr\pyenv\rexx\build\mockit.py", line 24, in main
parse_tree = parser.file_()
File "C:\Ross\Source\antlr\pyenv\rexx\build\RexxParser.py", line 690, in file_
self.program_()
File "C:\Ross\Source\antlr\pyenv\rexx\build\RexxParser.py", line 755, in program_
self.instruction_list()
File "C:\Ross\Source\antlr\pyenv\rexx\build\RexxParser.py", line 1071, in instruction_list
self.instruction()
File "C:\Ross\Source\antlr\pyenv\rexx\build\RexxParser.py", line 1120, in instruction
la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
File "C:\Ross\Source\antlr\pyenv\lib\site-packages\antlr4\atn\ParserATNSimulator.py", line 346, in adaptivePredict
alt = self.execATN(dfa, s0, input, index, outerContext)
File "C:\Ross\Source\antlr\pyenv\lib\site-packages\antlr4\atn\ParserATNSimulator.py", line 446, in execATN
alt = self.execATNWithFullContext(dfa, D, s0_closure, input, startIndex, outerContext)
File "C:\Ross\Source\antlr\pyenv\lib\site-packages\antlr4\atn\ParserATNSimulator.py", line 575, in execATNWithFullContext
reach = self.computeReachSet(previous, t, fullCtx)
File "C:\Ross\Source\antlr\pyenv\lib\site-packages\antlr4\atn\ParserATNSimulator.py", line 734, in computeReachSet
self.closure(c, reach, closureBusy, False, fullCtx, treatEofAsEpsilon)
File "C:\Ross\Source\antlr\pyenv\lib\site-packages\antlr4\atn\ParserATNSimulator.py", line 1093, in closure
self.closureCheckingStopState(config, configs, closureBusy, collectPredicates,
File "C:\Ross\Source\antlr\pyenv\lib\site-packages\antlr4\atn\ParserATNSimulator.py", line 1136, in closureCheckingStopState
self.closure_(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEofAsEpsilon)
File "C:\Ross\Source\antlr\pyenv\lib\site-packages\antlr4\atn\ParserATNSimulator.py", line 1187, in closure_
self.closureCheckingStopState(c, configs, closureBusy, continueCollecting, fullCtx, newDepth, treatEofAsEpsilon)
File "C:\Ross\Source\antlr\pyenv\lib\site-packages\antlr4\atn\ParserATNSimulator.py", line 1136, in closureCheckingStopState
self.closure_(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEofAsEpsilon)
File "C:\Ross\Source\antlr\pyenv\lib\site-packages\antlr4\atn\ParserATNSimulator.py", line 1187, in closure_
self.closureCheckingStopState(c, configs, closureBusy, continueCollecting, fullCtx, newDepth, treatEofAsEpsilon)
...
After that, it's alternating calls to closureCheckingStopState and closure_. In Eclipse, I put a breakpoint in execATN() after the call to execATNWithFullContext(), and it never returned.
I can provide a grammar and input string, but this doesn't fail on any case I have except for a 11,702 line input file. I was trying the most complex Rexx program I know of. If you want, I'll ZIP it up with my working copy of the grammar and send it along.
Ross