https://github.com/dpbm/python-c-compiler
A compiler for C using python
https://github.com/dpbm/python-c-compiler
c compiler lexer python python3 university university-project
Last synced: 6 months ago
JSON representation
A compiler for C using python
- Host: GitHub
- URL: https://github.com/dpbm/python-c-compiler
- Owner: Dpbm
- Created: 2024-02-22T13:35:38.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-13T16:31:13.000Z (almost 2 years ago)
- Last Synced: 2025-03-13T01:44:22.854Z (10 months ago)
- Topics: c, compiler, lexer, python, python3, university, university-project
- Language: Python
- Homepage: https://dpbm.github.io/python-c-compiler/
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# A simple c compiler made in python

This is a college project that I've done with some friends of mine.
Feel free to add things, messy around, and test as you want.
If you find some improvements or bugs, please, `open an Issue` and then us know what's wrong.
## Run
To run the project you'll need:
* python3 installed
* a `c` source code file
after that, just run:
```bash
python3 compiler.py your_file.c
```
## Tests
To execute the tests, you'll need:
* python3
* python unittest
* make (optional)
with all dependencies installed, run:
```
make test
or
python3 -m unittest tests/*.py
```