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
{{ message }}
Repository navigation
[CSharp] ReportAttemptingFullContext() call passes null for config sets, thwarts attempts to debug grammars. #4386
I use CSharp as my development environment. Besides the fact that the tools in C# are much, much better than Java, all my tools in Trash are C# based.
I need the ATN config sets to get the prediction context in order to debug grammars. I can only get the value when overriding the DiagnosticErrorListener class.
For those who don't know, the ATN config set contains the prediction context, which is a collection of ordered NFA states in the entire collection of ATN for the grammar. It corresponds to the states in a derivation. The ToString() method for an ATNConfigSet prints out integer states ids, but few can read this output. And, it's terrible because one has to constantly look in the generated .dot files for states, then trace them back to a particular rule. Instead, I use the information to devise a much more "human-readable" version that uses rule names of a derivation.
I repeat myself again and again: the runtimes are not one-to-one, and contain many sutle differences, sometimes critical. Without access to the ATN config set, I cannot debug grammars--especially when they contain actions.
IDEs and plugins do not replace essential functionality that I require from the runtime.
Comparison with other runtimes
As far as I can tell, no other runtime has the same whacky API as with CSharp: configs is always passed to the DiagnosticErrorListener methods.
Activity
Fix for antlr#4386