The definition of the StrategoSyntax in XT release 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 StrategoAbstractSyntax 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.

-- EelcoVisser - 09 Dec 2001


CategoryToDo? | ToDo | MetaStratego

Revision: r1.2 - 09 Feb 2003 - 09:59 - MartinBravenboer
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