I am looking for ideas on how we could provide some debug functionality on parsers. I believe that it would help the design experience to have some kind of interactive visualization of an input and output. There are many ways this could look like:
- a simple one would be to at least provide a textual representation of all the parsers that were tried and the position in the source string, using the
EnterParser event. Ideally using logging such that this could be added to any existing application/parser.
- Some kind of LinqPad integration to interactively change the parser and see the output for a specific input string. Or a VS Code integration using a C# language server and two other windows for input/output.
Diagnostics could also be used to output a custom set of events that happen and could then be read with a custom app to go back and forth the parsing.
I am looking for ideas on how we could provide some debug functionality on parsers. I believe that it would help the design experience to have some kind of interactive visualization of an input and output. There are many ways this could look like:
EnterParserevent. Ideally using logging such that this could be added to any existing application/parser.Diagnostics could also be used to output a custom set of events that happen and could then be read with a custom app to go back and forth the parsing.