Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/gcattt/front-end-kaleidoscope
- Owner: gCattt
- Created: 2024-02-26T23:06:55.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-05T15:50:06.000Z (7 months ago)
- Last Synced: 2024-07-06T00:34:57.561Z (4 months ago)
- Topics: compiler, cpp, llvm-frontend, llvm-tutorial
- Language: C++
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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