The xtc (eXTensible Compiler) project is exploring novel programming languages and tools to improve the expressiveness, safety, and efficiency of complex systems.

These components are still accessible through version 1.15.0 of the source release (see below).

Additionally, xtc has support for common tool tasks, such as processing command line flags, managing file search paths, setting character encodings, and reporting program errors.

See Robert Grimm’s publications for a complete list of papers and talks on xtc.

Distribution

xtc is released mostly under the GNU GPL version 2. The main exception is the Rats! runtime, which is released under the GNU LGPL version 2.1. See xtc’s sources and Javadoc documentation for a detailed list of these classes.

xtc’s current distribution is version 2.4.0, which was released 8/17/14. It includes the following files:

xtc-core.zip: The source distribution.

xtc-testsuite.zip: The test suite.

xtc.jar: The binary distribution.

rats.jar: The Rats! stand-alone binary (including runtime).

rats-runtime.jar: The runtime for parsers generated by Rats! with the -lgpl command line option.

command line option. history.html: The release history and notes.

Note that the binary distribution's xtc.jar contains all classes contained in the parser binary rats.jar and the parser runtime rats-runtime.jar.

Version 1.8.0 of the source distribution is still available to ensure the repeatability of the experimental results reported in the PLDI ’06 paper “Better Extensibility through Modular Syntax.” Version 1.15.0 is the last version to contain several discontinued tools. We preserve both source code and test suite.

The source distribution comes with extensive documentation, including installation instructions (step-by-step.html in xtc’s root directory), an overview of our setup (development.html), and Javadoc-generated class documentation (execute “ make doc ”).

This page provides an introduction to Rats!, our parser generator. It is part of xtc’s Javadoc documentation (hence the @link mark-up) and uses examples from Rats!’ own grammar as well as from our Java and C grammars (look in the src/xtc/parser and src/xtc/lang directories in the source distribution).

The binary distribution is invoked from the command line by typing:

java -cp xtc.jar tool-class-name

Valid tool class names include:

xtc.parser.Rats for the Rats! parser generator.

for the Rats! parser generator. xtc.lang.FactoryFactory for the concrete syntax tool.

for the concrete syntax tool. xtc.lang.cpp.SuperC for the SuperC tool.

for the SuperC tool. xtc.lang.jeannie.Jeannie for the Jeannie compiler.

When invoked without additional arguments, each tool prints usage instructions including recognized command line arguments.

xtc’s dependencies include the following Java packages:

JUnit for performing unit tests (junit.jar).

JavaNCSS for collecting source statistics (ccl.jar, javacc.jar, javancss.jar, and jhbasic.jar).

JFlex for building the SuperC scanner (JFlex.jar).

JavaBDD for reasoning about conditionals in SuperC (javabdd.jar).

For the source release, the corresponding jar files should be placed into the bin directory of the distribution. The JUnit and JavaBDD jar files should also be added to the class path.

For your convenience, dependencies.zip contains the jar files for JUnit 4.8.2, JavaNCSS 32.53, JFlex 1.4.3, and JavaBDD 1.0b2.

The source distribution of the Marco macro processor is available as a separate download.