Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matheusamazonas/cc_project
Compiler Construction Project
https://github.com/matheusamazonas/cc_project
compiler compiler-construction haskell
Last synced: 2 days ago
JSON representation
Compiler Construction Project
- Host: GitHub
- URL: https://github.com/matheusamazonas/cc_project
- Owner: matheusamazonas
- Created: 2017-02-12T15:35:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-21T14:09:56.000Z (over 7 years ago)
- Last Synced: 2024-12-17T06:46:30.525Z (6 days ago)
- Topics: compiler, compiler-construction, haskell
- Language: Haskell
- Size: 831 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Compiler Construction project
This is our project for the 2017 Compiler Construction course.
We developed a compiler for the Simple Programming Language (SPL) given in the course, and extended it with higher-order functions, higher-rank type inference/checking, and nested functions with variable capture, as well as more minor changes.Our code can be run either from the command line or from within WinGHCi using ":set args". Through either mechanism, main.lhs's main method is invoked with one of the execution modes (**c**ompile to standard output, **m**ake file, e**x**ecute after make, or **d**ebug by showing both code and execution) as first argument, and a file name as second argument. For example, `./main x ../examples/test.spl` in a terminal or equivalently `:set args "x" "..\\examples\\test.spl"` in WinGHCi executes a file `test.spl` in the specified directory path. Note: Showing the entire code is no longer recommended due to the size of the standard library, so execution modes `c` and `d` are not recommended.
**Important:** because of the size of the standard library (owing mainly to runtime exception messages), the original ssm.jar file no longer offers enough space for the code and stack segment. As a result, it quickly overflows into the heap. Thus, we use a different version of ssm.jar included in the repository, which has (much) more stack and heap space, and which lacks bugs in integer printing code and GUI updates present in the original file. This version has been provided to us by Thomas Churchman (also in the course).