Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🦖| Mini Java Compiler.

NotificationsYou must be signed in to change notification settings

Sitaras/miniJava-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a MiniJava-to-LLVM-IR compiler project, written in Java (with the help of JFlex, JavaCUP and JTB), originallyintroduced as an assignment for thecompilers course (NKUA). Details about the projectcan be foundhere (sections homework 2 & 3). I thankStefanos Baziotis for hisMiniJava testsuitecontribution!


Parts

Part 1: MiniJava Static Checking (Semantic Analysis)
Part 2: Generating intermediate code (MiniJava -> LLVM)

Getting Started

In order to see that the output of the produced LLVM IR files is the same as compiling the input java file with javac and executing it with java, you will need Clang with version >=4.0.0.

In Ubuntu Trusty

sudo apt update && sudo apt install clang-4.0

Compilation command

make

Execution

To perform semantic analysis on all files given as arguments:

java [MainClassName] [file1] [file2] ... [fileN]

To execute .ll files:

clang-4.0 -o out1 ex.ll./out1

[8]ページ先頭

©2009-2025 Movatter.jp