[Haskell-cafe] How to do reversible parsing?

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Sun Jan 3 14:15:19 UTC 2021


Perhaps you don't even need to pretty-print?

If you're just echoing parts of the input,
then have the parser add source range annotations to the AST.
(Example: see Section A.2 of https://arxiv.org/abs/2009.01326)

Of course, if you are generating code, then this does not work.

- J.



More information about the Haskell-Cafe mailing list