All Projects → eugmes → imp

eugmes / imp

Licence: other
Compiler for IMP programming language implemented in Haskell

Programming Languages

haskell
3896 projects
c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to imp

alon
Remix for Solana.
Stars: ✭ 87 (+443.75%)
Mutual labels:  llvm
mollusc
Pure-Rust libraries for parsing, interpreting, and analyzing LLVM
Stars: ✭ 49 (+206.25%)
Mutual labels:  llvm
YuLang
The Yu (羽) programming language.
Stars: ✭ 46 (+187.5%)
Mutual labels:  llvm
los
Los是一个c/c++语言编译型的虚拟机。它使用llvm/clang作为其前端,losld做后端对源代码进行编译,生成los指令文件。Los is a c/c++-compiled virtual machine. It uses llvm/clang as its front end, losld does the backend to compile the source code, and generates the los directive file.
Stars: ✭ 46 (+187.5%)
Mutual labels:  llvm
Star-lang-specification
Work in progress specs for the Star programming language
Stars: ✭ 26 (+62.5%)
Mutual labels:  llvm
OS-CFI
Origin-sensitive Control Flow Integrity (OS-CFI) - USENIX Security 2019
Stars: ✭ 27 (+68.75%)
Mutual labels:  llvm
lhc
The LLVM LHC Haskell Optimization System
Stars: ✭ 194 (+1112.5%)
Mutual labels:  llvm
llvm-semantics
Formal semantics of LLVM IR in K
Stars: ✭ 42 (+162.5%)
Mutual labels:  llvm
Chromium Clang
Chromium browser compiled with the Clang/LLVM compiler.
Stars: ✭ 77 (+381.25%)
Mutual labels:  llvm
mlir-hs
Haskell bindings for MLIR
Stars: ✭ 53 (+231.25%)
Mutual labels:  llvm
movForth
LLVM frontend for the Forth Language
Stars: ✭ 71 (+343.75%)
Mutual labels:  llvm
LLVM-Obfuscator
LLVM Obfuscator
Stars: ✭ 44 (+175%)
Mutual labels:  llvm
systemc-compiler
This tool translates synthesizable SystemC code to synthesizable SystemVerilog.
Stars: ✭ 128 (+700%)
Mutual labels:  llvm
compiler lab
Some toy labs for compiler course
Stars: ✭ 49 (+206.25%)
Mutual labels:  llvm
llvm-package-windows
Provides LLVM binary packages for an (almost) complete Windows build matrix. Built and packaged by GitHub Actions.
Stars: ✭ 77 (+381.25%)
Mutual labels:  llvm
Grimheart
Torture your LLVM Obfuscation
Stars: ✭ 29 (+81.25%)
Mutual labels:  llvm
CMLFS
Clang-Built Musl Linux From Scratch
Stars: ✭ 51 (+218.75%)
Mutual labels:  llvm
Batch-First
A JIT compiled chess engine which traverses the search tree in batches in a best-first manner, allowing for neural network batching, asynchronous GPU use, and vectorized CPU computations.
Stars: ✭ 27 (+68.75%)
Mutual labels:  llvm
open-ops
Open Optimizing Parallelizing System
Stars: ✭ 21 (+31.25%)
Mutual labels:  llvm
llvm-compile-time-data
LLVM compile-time performance data over time.
Stars: ✭ 16 (+0%)
Mutual labels:  llvm

IMP Compiler Implemented in Haskell

Build Status

This is an implementation of IMP compiler in Haskell programming language. It uses LLVM as compiler backend. Megaparsec is used for parsing.

The programming language is specified in this document http://gcmuganda.faculty.noctrl.edu/classes/Spring12/306/Imp.pdf.

This work is inspired by Hakell LLVM Tutorial by Stephen Diehl.

Building

It is recommended to use stack to build the program:

% stack build

After this IMP programs can be compiled by running:

% stack exec -- impc test/examples/hello.imp
% ./hello
Hello World!

This runs cc. To specify a different compiler, use --cc command line option or CC environment variable.

Extensions

The language has several extensions compared to the original specification. All of the extensions are taken from Ada:

  • String literals can have embedded quotation marks by repeating them twice.

  • If expressions can have additional elsif parts.

  • Function and procedure arguments can have in, out, and in out modes.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].