Skip to content

kronosmichall/latte_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latte Compiler

This repository contains a compiler for the Latte programming language. The compiler performs strict type checking and generates LLVM IR code as output.


Features

  • Strict type checking Support for:
  1. Functions
  2. Local variables and shadowing
  3. Heap allocated arrays and strings
  4. Simple reference counting

The compiler generated LLVM IR code. All helper LLVM functions are defined manually in lib/functions.ll.

Usage

You can run the compiler using either cabal or make:

cabal run file.lat

or

make && ./latc file.lat

The compiler outputs:

  • file.ll: LLVM IR code
  • file.bc: binary LLVM bitcode generated via llvm-as

Notes

The bnfc/ folder contains files generated by BNFC (Backus–Naur Form Converter). The compiler is written in Haskell and uses the following libraries:

  • mtl
  • array
  • containers
  • process
  • filepath

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages