Theory, examples of reversible parsers?

前端 未结 11 1174
滥情空心
滥情空心 2021-01-13 22:50

Does anyone out there know about examples and the theory behind parsers that will take (maybe) an abstract syntax tree and produce code, instead of vice-versa. Mathematicall

11条回答
  •  孤城傲影
    2021-01-13 23:11

    There are theory, working implementations and examples of reversible parsing in Haskell. The library is by Paweł Nowak. Please refer to https://hackage.haskell.org/package/syntax as your starting point. You can find the examples at following URLs.

    • https://hackage.haskell.org/package/syntax-example
    • https://hackage.haskell.org/package/syntax-example-json

提交回复
热议问题