logo

JastAdd2

JastAdd2 was developed at Lund University by Torbjörn Ekman, Görel Hedin, and Eva Magnusson. JastAdd2 has recieved additional contributions from Emma Söderberg, Jesper Öqvist and Niklas Fors.

For additional contributors, see the change logs.

License

Copyright (c) 2005-2016, The JastAdd Team. All rights reserved.

JastAdd2 is covered by the modified BSD License. For the full license text see the LICENSE file.

Obtaining JastAdd2

The latest version of JastAdd2 can be found at jastadd.org.

Dependencies

JastAdd2 requires a Java Runtime Environment (JRE) to run, and a JDK to build. The minimum required Java version for JastAdd2 is Java SE 6.

JastAdd2 uses JavaCC, JJTree, and Apache Ant. JavaCC and JJTree are included in the source tree of JastAdd2, so the only external tools needed are Java and Ant. See licenses/javacc-BSD for the full license text.

The context-free grammar used in JastAdd is based on an example from JavaCC.

The README file for the binary distribution (README-binary-dist.md) is written in the markup language Markdown. This file is converted to HTML using a Python script during the build script. The Python script requires the Python-Markdown package for Python. The Python-Markdown package can be installed using pip install markdown.

Building

Builds are done by using the Apache Ant script build.xml:

File Types

Directory Structure

Understanding the Implementation

Overall behavior when running JastAdd:

Parsing

JavaCC and its tree-building extension, JJTree, are used for parsing. They assume top classes called Node and SimpleNode. Normally, JJTree generates its own AST node subclasses, but we "fool" it to use the AST classes generated by JastAdd instead (by generating them before we run JavaCC/JJTree).

However, we let JJTree generate the AST classes for the Java code used inside equations in .jrag files. This is because these expressions are not analyzed by JastAdd. They are just unparsed at appropriate places in the generated Java code.