Stratego/XT Reference Manual

Martin Bravenboer

Delft University of Technology

Karl Trygve Kalleberg

Universitetet i Bergen

Rob Vermaas

Eelco Visser

Delft University of Technology

Table of Contents

I. Stratego Language (*)
1. Stratego Core (*)
2. Syntactic Abstractions (*)
3. Dynamic Rules (*)
4. Programs and Tools
abox2text — formats a Box term to plain text
asfix-yield — unparses an asfix tree to flat text
ast2abox — pretty prints an abstract syntax tree to the Box layout formalism
ast2text — pretty-prints an abstract syntax tree to plain text
aterm2xml — translates an ATerm to XML
autoxt — installs autoconf/make resources for Stratego/XT packages
baffle — converts between textual and binary ATerm formats
format-check — checks whether an ATerm conforms to a given regular tree grammar (RTG)
gen-renamed-sdf-module — generates an SDF module that renames all SDF sorts in a given SDF definition.
implode-asfix — maps an asfix parse tree to an abstract syntax tree
pack-sdf — packs a set of SDF modules into a single definition
parse-box — parses a layout definition written in the Box language
parse-cs — parses meta-programs with concrete syntax
parse-c — parses a C source file
parse-pp-table — parses a pretty-print table
parse-rtg — parse a regular tree grammar (RTG) source file
parse-sdf-definition — parsers and desugars a SDF definition file.
parse-sdf-module — parses and desugars an SDF module file.
parse-stratego — parses a Stratego source file
parse-unit — performs the test cases in a testsuite for an SDF syntax definition
parse-xml-doc — parses an XML file into a xml-doc term
parse-xml-info — parses an XML file into a xml-info term
pp-aterm — pretty-prints an ATerm in text format to make it readable for humans.
pp-box — pretty-prints an abstract syntax tree containing Box code
pp-c — pretty-prints an abstract syntax tree containing C code
ppgen — generates a pretty-print table from an SDF syntax definition
pp-pp-table — pretty-prints an abstract syntax tree containing a pretty-print table
pp-rtg — pretty-prints an abstract syntax tree containing a regular tree grammar (RTG)
pp-sdf — pretty-prints an abstract syntax tree containing an SDF definition
pp-stratego — pretty-prints a Stratego program
pptable-diff — diffs and synchronizes two pretty-print tables
pp-xml-doc — pretty-prints an xml-doc term into an XML document
pp-xml-info — pretty-prints an xml-info term into an XML document
pretty-stratego — pretty-prints a Stratego program.
rtg2sig — generates a Stratego signature from a regular tree grammar (RTG)
rtg2typematch — generates a set of Stratego strategies for typechecking terms against a regular tree grammar (RTG)
rtg-script — produces a regular tree grammar (RTG) by executing an RTG script
sdf2parenthesize — generates a Stratego module that puts parenthetical constructors at the correct places.
sdf2rtg — generates a abstract regular tree grammar (RTG) from an SDF concrete syntax definition.
sdf2table — generates a parse table from an SDF syntax definition.
sglri — parse a text file using sglri and implode using implode-asfix
sglr — parses a text file and produces an parse forest conforming to a given grammar.
strc — compiles Stratego programs to C or executable code
stratego-shell — interpreters a Stratego program, from a script or interactively
unpack-sdf — splits an SDF definition into its constituent modules.
visamb — displays the ambiguities in a parse tree represented in AsFix2
xtc — registers, unregisters and queries XTC components in a repository
xml2aterm — converts an XML document to a comparable ATerm.
II. Stratego/XT Development Manual (*)
5. The Development of Stratego/XT
5.1. The Big Picture
5.2. Baseline development
5.3. Installation from Subversion
5.4. Contributing