Stratego Pretty Printer

Stratego -- Strategies for Program Transformation
The definition of the Stratego syntax in StrategoXT 0.9 provides a pretty-print table for Stratego programs. It does not yet support layout preservation and is not always very pretty. It should be adequate for pretty-printing generated Stratego code.

You can pretty print Stratego abstract syntax with the StrategoXT XTC tools library. The module stratego-xt-xtc-tools contains a strategy xtc-pp-astratego, which is defined as

  xtc-pp-astratego =
      xtc-stratego-ensugar
    ; xtc-ast2abox(!["Stratego-pretty.pp"])
    ; xtc-abox2text
You should prefer this strategy over your own composition because in the future this strategy will solve priority and associativity problems.


CategoryPrettyPrint? | MetaStratego