yeslogic / fathom

🚧 (Alpha stage software) A declarative data definition language for formally specifying binary data formats. 🚧
Apache License 2.0
258 stars 14 forks source link

Rewrite pretty printer #477

Closed Kmeakin closed 1 year ago

Kmeakin commented 1 year ago

Rewrote the surface pretty printer using the algorithm from A New Language-Independent Prettyprinting Algorithm. The resulting code is a little imperative compared to the old functional style, but I think it should be possible to write a functional wrapper around the imperative algorithm.

TODO:

Kmeakin commented 1 year ago

Benchmark results

Kmeakin commented 1 year ago

Abandoned in favour of https://github.com/yeslogic/fathom/pull/483