https://github.com/victorvianna/mini-gcc
(Old college project) Compiler of a subset of the C language
https://github.com/victorvianna/mini-gcc
c-language compilation
Last synced: about 1 year ago
JSON representation
(Old college project) Compiler of a subset of the C language
- Host: GitHub
- URL: https://github.com/victorvianna/mini-gcc
- Owner: victorvianna
- License: gpl-2.0
- Created: 2019-02-02T15:12:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-19T09:49:47.000Z (about 7 years ago)
- Last Synced: 2025-02-10T11:11:17.307Z (over 1 year ago)
- Topics: c-language, compilation
- Language: OCaml
- Homepage:
- Size: 161 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mini-gcc
Compiler of mini-c language, a subset of C language.
## Authors
Cauim de Souza Lima
Victor Hugo Vianna
## Requirements
ocamlbuild
## Instructions
To compile:
```
make
```
To run:
```
./mini-c
```
An output assembly file will be generated with the same name and in the same directory as the input.
To run the tests:
```
cd tests
./run -all ../mini-c
```
## Language
- All declarations must be done in the beggining of each function (first declare, then assign).
- Variables can be either ints or pointers to structs.
- More information can be found [here](https://www.enseignement.polytechnique.fr/informatique/INF564/projet/sujet-v1.pdf).