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
The Syn declaration seems a little heavy-weight. Ocaml also has break hints. This seems like roughly the right direction -- I'm still weighing the tradeoffs.
The three classic pretty-printer papers:
There's an adaptation of Wadler's algorithm to OCaml -- Strictly Pretty -- Christian Linding, 2000.
Wadler's algorithm is presented as a set of combinators
However, we want to specify layout as part of the concrete syntax declaration. Probably with boxes. Eg:
This example is taken with only minor modifications from Syn: a single language for specifying abstract syntax trees, lexical analysis, parsing and pretty-printing -- Richard J Boulton, 1996.
This is also quite similar to Ocaml's Format (they even have almost exactly the same types of boxes):
The Syn declaration seems a little heavy-weight. Ocaml also has break hints. This seems like roughly the right direction -- I'm still weighing the tradeoffs.
Other:
The text was updated successfully, but these errors were encountered: