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

Revision: r1.4 - 28 Apr 2005 - 22:24 - Main.wiki
Stratego > MetaStratego > StrategoPrettyPrinter
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback