https://github.com/jferard/selfhosted
A self hosted compiler project
https://github.com/jferard/selfhosted
llvm python toy-compiler toy-language toy-project
Last synced: 9 months ago
JSON representation
A self hosted compiler project
- Host: GitHub
- URL: https://github.com/jferard/selfhosted
- Owner: jferard
- License: other
- Created: 2017-05-12T19:51:45.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T11:39:05.000Z (about 8 years ago)
- Last Synced: 2025-03-10T12:56:24.093Z (about 1 year ago)
- Topics: llvm, python, toy-compiler, toy-language, toy-project
- Language: Python
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# Self Hosted - A Self Hosted compiler project
Copyright (C) 2017 J. Férard
This is an experimental project, and a work in progress.
**Do not rely on it.**
## The project
I will try to make a tiny self hosted compiler, one part after another.
The goal is to create in Python a compiler based on LLVM.
This compiler should be able to compile itself.
The only requirements will be:
- LLVM
- a python 3 interpreteter
- python llvmlite module
## Roadmap
There are two main steps : the bootstrap in Python, and the self hosted compiler.
### The bootstrap
1. Create a tiny regex library in Python
2. Create a lexer on tiny regexes
3. Create a parser on BNF & lexer
4. Use the previous steps to output an executable build on LLVM
### The self hosted compiler
1. Translate Python sources to self hosted syntax.
2. Tie this to LLVM
See https://github.com/jferard/selfhosted/ROADMAP.md