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
When execDFA fails to find a cached edge for an input, it falls back to execATN. The fallback is enclosed in a try/catch block, and if execATN throws a RecognitionException an ERROR edge is added to the cached DFA. When the erroneous symbol that resulted in execATN throwing an exception is not the first symbol checked by execATN, the update to the cached DFA blocks the entire input sequence leading to the erroneous symbol starting with the first uncached (yet possibly valid) symbol. This is fixed in sharwell/antlr4@cd3adb1, and included in pull request parrt#15.
The text was updated successfully, but these errors were encountered:
I don't have a unit test for this issue currently. It arose periodically when I was doing permutation testing on the input by injecting thousands of different errors at different locations.
parrt
added a commit
to parrt/antlr4
that referenced
this issue
Feb 20, 2012
When
execDFA
fails to find a cached edge for an input, it falls back toexecATN
. The fallback is enclosed in atry
/catch
block, and ifexecATN
throws aRecognitionException
anERROR
edge is added to the cached DFA. When the erroneous symbol that resulted inexecATN
throwing an exception is not the first symbol checked byexecATN
, the update to the cached DFA blocks the entire input sequence leading to the erroneous symbol starting with the first uncached (yet possibly valid) symbol. This is fixed in sharwell/antlr4@cd3adb1, and included in pull request parrt#15.The text was updated successfully, but these errors were encountered: