Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gcattt/front-end-kaleidoscope

A little compiler for a non-trivial language
https://github.com/gcattt/front-end-kaleidoscope

compiler cpp llvm-frontend llvm-tutorial

Last synced: 2 days ago
JSON representation

A little compiler for a non-trivial language

Awesome Lists containing this project

README

        

# front-end-kaleidoscope

A little compiler for a non-trivial language built for the Programming Languages and Compilers course @ UniMORE.


The _test_ directory contains...
- floor → rounds down a number to the closest integer <= to that number (whole or fractional)
- rand → generate and print 10 pseudorandom numbers
- fibonacci → calculate the n-th Fibonacci number
- sqrt → calculate the (approximate) square root of an arbitrary number
- eqn2 → calculate the solutions of a quadratic equation, given the coefficients a,b and c
- sqrt2 → like sqrt but uses the logical operator 'or'
- sqrt3 → like sqrt but uses the logical operators 'and' and 'not'


### Requirements

- [![LLVM](https://img.shields.io/badge/LLVM-17.0.6-blue)](https://releases.llvm.org/)
- [![Bison](https://img.shields.io/badge/Bison-3.8.2-red)](https://www.gnu.org/software/bison/bison.html)
- [![Flex](https://img.shields.io/badge/Flex-2.6.4-green)](https://gothub.frontendfriendly.xyz/westes/flex/blob/master/README.md)


### References
- https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/index.html