You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to parse this file with a C# parser generated off this grammar causes ANTLR to hang in what appears to be an infinite loop. The debugger says there's some very deep recursion going on deep within the bowels of ParserATNSimulator.AdaptivePredict. Memory usage remains constant during the hang.
It looks like the source file includes some extremely deep parse trees, such as the code following line 2400. This might be part of what's giving the parser trouble. Are there any known workaround for dealing with such issues?
The text was updated successfully, but these errors were encountered:
After further investigation, this isn't an infinite loop afterall; it completed parsing the file in question after approximately four and a half minutes. (Where similar-sized files are usually finished in a matter of seconds.)
Any idea what's causing the parser's performance to degenerate so severely on this file?
I left this building for over a day on my M1 Pro MacBook Pro and it never finished. I plan on attempting to use the original C# target soon to see if it finishes in a reasonable amount of time.
Grammar file: https://github.com/uwol/proleap-vb6-parser/blob/master/src/main/antlr4/io/proleap/vb6/VisualBasic6.g4
Source file: https://github.com/smbx/smbx-legacy-source/blob/master/modNPC.bas
Attempting to parse this file with a C# parser generated off this grammar causes ANTLR to hang in what appears to be an infinite loop. The debugger says there's some very deep recursion going on deep within the bowels of
ParserATNSimulator.AdaptivePredict
. Memory usage remains constant during the hang.It looks like the source file includes some extremely deep parse trees, such as the code following line 2400. This might be part of what's giving the parser trouble. Are there any known workaround for dealing with such issues?
The text was updated successfully, but these errors were encountered: