TXL, a Tree-Based Rapid Prototyping Tool for Computer Languages

cordy@qucis.queensu.ca (Jim Cordy)
Tue, 7 May 91 04:12:29 EDT

          From comp.compilers

Related articles
TXL, a Tree-Based Rapid Prototyping Tool for Computer Languages cordy@qucis.queensu.ca (1991-05-07)
| List of all articles for this month |

Newsgroups: comp.compilers
From: cordy@qucis.queensu.ca (Jim Cordy)
Keywords: tools, code, translator
Organization: Compilers Central
Date: Tue, 7 May 91 04:12:29 EDT

TXL: Tree Transformation Language is now available via anonymous FTP from
qusuna.qucis.queensu.ca (

TXL 5.2, (c) 1988-1991 Queen's University at Kingston
Here's the language prototyping tool you've been waiting for! TXL is a
generalized source-to-source translation system suitable for rapidly
prototyping computer languages and langauge processors of any kind. It
has been used to prototype several new programming languages as well as
specification languages, command languages, and more traditional program
transformation tasks such as constant folding, type inference and source

TXL is NOT a compiler technology tool, rather it is a tool for use by
average programmers in quickly prototyping languages and linguistic tasks.
TXL takes as input an arbitrary context-free grammar in extended BNF-like
notation, and a set of show-by-example transformation rules to be applied
to inputs parsed using the grammar. TXL will automatically parse inputs
in the language described by the grammar, no matter if ambiguous or
recursive, and then successively apply the transformation rules to the
parsed input until they fail, producing as output a formatted transformed

TXL is particularly well suited to the rapid prototyping of parsers (e.g.,
producing a Modula 2 parser took only the half hour to type in the Modula
2 reference grammar directly from the back of Wirth's book), pretty
printers (e.g., a Modula 2 paragrapher took another ten minutes to insert
output formatting clues in the grammar), and custom or experimental
dialects of existing programming languages (e.g., Objective Turing was
prototyped by transforming to pure Turing and using the standard Turing
compiler to compile the result).

TXL comes with source (sorry, it's written in Turing Plus, so not many of
you will be able to modify it), binaries to run on both Sun/3 and Sun/4
architectures under Sun OS 4.x, self-instruction scripts and a pile of
examples of its use in various applications. Sources in C, and binary
versions for other machines may become available if there is enough

Jim Cordy
Queen's University, Kingston, Canada

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.