The Open Transport Language Deluxe is a compiler construction project by two students of the University of Twente, The Netherlands.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Code
Report
.gitignore
LICENSE
README.md

README.md

Open Transport Language Deluxe

The Open Transport Language Deluxe is a compiler construction project by two students of the University of Twente, The Netherlands.

Installation

OTLD requires Maven 3 to be installed. Other dependencies will be installed by Maven.

OTLD works best from a JAR. When working from source code you first package the application. Packaging can be done by running mvn package from the root directory (Code with pom.xml) will create a usable JAR in the target directory. Rename the 'with-dependencies' JAR to otld.jar and place the JAR in a easy to find directory.

Usage

For instructions run java -jar otld.jar help.

Files in the language should have the tldr extension. The file name should equal the name of the program in it.

Compiling an tldr file can be done with the following command run from the directory containing the program file: java -jar otld.jar compile <program_name> [<program_name> [<program_name> [...]]] where <program_name> should be the name of the program to compile (and of the file in the current directory). Multiple programs can be compiled at the same time. Make sure that otld.jar points to the correct location where you placed the JAR.

The compiler compiles the OTLD program into a single Java class file, which is placed in the same directory as the source. The program can be run with java <program_name>.

Layout

Folders

  • Code: contains all source code of the project.
    • src/main: contains all published code and resources.
      • antlr4: contains the Antlr grammar(s).
      • java: contains the published Java code.
      • resources: contains the resources needed for the code (currently not used).
    • src/test: contains all test code and resources.
      • java: contains the test Java code.
      • resources: contains the resources for the test code, including example programs.
  • Report: contains the LaTeX sources of the report.

Packages

  • otld.otld: root package.
    • intermediate: intermediate representation.
    • jvm: back end compiler to Java bytecode.
    • parsing: front end compiler from OTLD.

Generated Antlr sources

By default the generated Antlr sources are not provided since they will be generated by Maven when compiling the program. The Antlr sources can be generated by running mvn clean && mvn compile from the main code directory (containing pom.xml). The generated sources will become available in target/generated-sources/antlr4.

License

Open Transport Language Deluxe is licensed under the MIT license. The original authors like to hear where (part of) this software is used. Let us know by contacting us on GitHub.

Copyright (c) 2015 Martijn Bruning (@TheMSB) and Jan-Jelle Kester (@jjkester).