https://github.com/charlesaverill/ecco
An Educational C COmpiler written in Python, written for use in my Practical Compiler Design course
https://github.com/charlesaverill/ecco
c compiler compiler-design
Last synced: 17 days ago
JSON representation
An Educational C COmpiler written in Python, written for use in my Practical Compiler Design course
- Host: GitHub
- URL: https://github.com/charlesaverill/ecco
- Owner: CharlesAverill
- License: unlicense
- Created: 2022-11-21T03:14:18.000Z (over 2 years ago)
- Default Branch: project_base
- Last Pushed: 2023-04-26T19:06:07.000Z (about 2 years ago)
- Last Synced: 2025-03-25T09:52:57.419Z (about 1 month ago)
- Topics: c, compiler, compiler-design
- Language: Python
- Homepage: https://www.charles.systems/PCD
- Size: 330 KB
- Stars: 12
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ecco
An `Educational C COmpiler` written in Python, written for use in my Practical Compiler Design course.## Installation
A Docker image is provided for non-Linux users, although usage of Linux to proceed through this course is strongly encouraged for many unrelated reasons.
1. Download the git repository:
```bash
git clone https://github.com/CharlesAverill/ecco.git
cd ecco
```
### With Docker2. Install Docker:
- [Windows](https://docs.docker.com/docker-for-windows/install/)
- [Mac](https://docs.docker.com/docker-for-mac/install/)
- [Linux](https://docs.docker.com/install/linux/docker-ce/ubuntu/)3. Build the base image:
```bash
./scripts dbuild
```### Without Docker
2. Install [poetry](https://python-poetry.org/)
```bash
python3 -m pip install poetry
```3. Install project dependencies
```bash
poetry install
```## Development Usage
The [scripts](./scripts) file contains commands to run the `ecco` compiler inside and outside of the Docker image.
- `./scripts dbuild` - Build the Docker image
- `./scripts drun` - Run the compiler within the Docker image built with `./scripts dbuild`
- `./scripts dbuildrun` - Build and run the Docker image and compiler
- `./scripts run` - Runs the compiler with [poetry](https://python-poetry.org/)
- `./scripts install` - Installs your compiler with the default `pip`