Minimal c-like language built using java, ANTLR4, and jasmin
compiler | ||
lib/net/jasmin/jasmin | ||
parser | ||
.gitignore | ||
Demo.g4 | ||
mvn-deploy-jasmin.sh | ||
pom.xml | ||
Readme.md |
Let's build a compiler !
Minimal c-like language built using java, ANTLR4, and jasmin
Summary of tools used :
- Jasmin : an assembler for the Java Virtual Machine.
- ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
- TestNG a java unit-testing framework
Test cases are available here
From this playlist.
Installing third-party jars in maven
Define a local maven repository in folder lib/
in pom.xml :
<repositories>
<repository>
<id>local-maven-repo</id>
<url>file:./lib</url>
</repository>
</repositories>
For each external jar you want to install run :
mvn deploy:deploy-file \
-DgroupId=com.example \
-DartifactId=example \
-Dversion=1.0 \
-Durl=file:./lib/ \
-DrepositoryId=local-maven-repo \
-DupdateReleaseInfo=true \
-Dfile=/path/to/file.jar