Merkompiler
is a JavaSST compiler written in Java (and pieces of Kotlin) as a study project.
It is not meant to be used in production, but rather as a template and inspiration for others
that need to solve similar tasks.
I also don't claim that this is the best or even a good implementation of a compiler.
Please note that Merkompiler is not able to output .class
files.
At this point, it can tokenize input files, parse them into an abstract syntax tree, and make it visible.
These instructions will help you compiling and running Merkompiler on your system.
JavaSST is a (pretty) small subset of Java's language features. A complete description for it can be found in this project's wiki pages.
This program is developed under and tested with
Apache maven 3.6.0
(you'll only need that if you plan to test and build Merkompiler yourself)Java 1.8
In order to compile this project yourself, you simply need to run the following commands. If you just want to use it, skip to installing.
$ git clone https://github.com/merkrafter/Merkompiler.git
$ mvn package
Merkompiler comes as a standalone jar, hence you don't need to do anything other than building or downloading it from the github repository's releases tab.
Merkompiler can be run with:
java -jar path/to/Merkompiler.jar
An overview over all available options of your version can be obtained with:
java -jar path/to/Merkompiler.jar --help
The --graphical
argument outputs a .dot
file that can be translated to a .png
file via the command
dot -Tpng path/to/file.dot > output.png
Assuming you downloaded the sources via git clone or equivalent, you only have to run:
$ mvn test
- Technologies
- Apache Maven by Apache Software Foundation
- Kotlin by JetBrains s.r.o and respective authors and developers
- Libraries
- openJDK
- argparse4j by Tatsuhiro Tsujikawa under the MIT license
- junit5
- mockito by Mockito contributors under the MIT license
See Contributing file.
This project uses Semantic Versioning.
This project is released under the MIT license.
This README was created from this template.