A compiler front realization based on Java,it can generate Java byte code and then running on JVM.The LemonC include:
- lexical analysis
- syntactic parsing
- semantic analysis
- code generation
The following steps explain how to run.
- require:
(1)jdk1.8+
(2)maven3.3+ - use mvn install command to intall jasmin.jar to your local repository
mvn install:install-file -DgroupId=com.jasmin -DartifactId=jasmin -Dversion=1.0 -Dpackaging=jar -Dfile=/Users/yanan/git/LemonC/jars/jasmin.jar
- Build executable jar
mvn assembly:assembly
- compile the lemon language with LemonC
java -jar LemonC-0.1-beta-jar-with-dependencies.jar CalHeightOfChild.lemon
- run with java
java CalHeightOfChild
please refer this link to get more informationmore information