Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/njZhuMin/SimpleC-compiler
A simple C interpreter that interpretes itself.
https://github.com/njZhuMin/SimpleC-compiler
Last synced: 2 months ago
JSON representation
A simple C interpreter that interpretes itself.
- Host: GitHub
- URL: https://github.com/njZhuMin/SimpleC-compiler
- Owner: njZhuMin
- License: lgpl-3.0
- Created: 2016-05-07T06:23:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-09T15:16:46.000Z (almost 7 years ago)
- Last Synced: 2024-04-24T16:14:49.216Z (9 months ago)
- Language: C
- Homepage:
- Size: 33.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- AwesomeInterpreter - SimpleC-compiler
README
# Simplec-compiler
A simple C interpreter that interpretes itself.## How to Run the Code
1.clone source code `SimpleC.c` to your dir.
```bash
git clone https://github.com/njZhuMin/SimpleC-compiler.git
```2.Compile
```bash
gcc -o SimpleC SimpleC.c (you may need the -m32 option on 64-bit machines)
./SimpleC hello.c
./SimpleC -s hello.c
```3.Try this out
```bash
./SimpleC SimpleC.c hello.c
./SimpleC SimpleC.c SimpleC.c hello.c
```# About
This project is inspired by [project c4](https://github.com/rswier/c4) and is mainly based on it.
However, I rewrited them all to make the code more understable.
Despite the complexity we saw in books about compiler design, writing one is not that hard. You don't need that much theory though they will help for better understanding the logic behind the code.
# Tutorial
https://zhum.in/blog/categories/project/SimpleC# Resources
Further Reading:
[Let's Build a Compiler](http://compilers.iecc.com/crenshaw/): An excellent starting material for building compiler.