mathieudelehaye / JavaToLLVMIRCompiler

A simple compiler front-end for the Java language, which generates an LLVM-IR bitcode output and developed in C++.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JavaToLLVMIRCompiler

A compiler front-end for the Java language.

It compiles a simple Java program, as an input, and generate an intermediate representation in LLVM-IR bitcodes (rather than the usual JVM bytecodes).

The compiler has been developed in C++.

It uses the following components:

Use:

cd /project/root

# Build the tools
./run_build.sh

# Run the lexer (standalone mode)
./build/bin/lexer test_data/hello.java > lexer_output.txt

# Run the parser
./build/bin/parser test_data/hello.java > parser_output.txt 2> parser_error.txt 

# Build the output
clang output.ll -o output-j -Wno-override-module

About

A simple compiler front-end for the Java language, which generates an LLVM-IR bitcode output and developed in C++.

License:GNU Affero General Public License v3.0


Languages

Language:C++ 70.1%Language:Yacc 18.6%Language:Makefile 6.2%Language:Lex 4.0%Language:Shell 0.7%Language:Java 0.4%