Compilers¶
IR¶
- MIR: https://github.com/vnmakarov/mir
- LLVM:
- https://github.com/numba/llvmlite Python wrapper used by Numba
- PPCI: https://pypi.org/project/ppci/
- QBE: https://c9x.me/compile/
Code generation¶
See: Code generation
Type checking¶
https://mukulrathi.com/create-your-own-programming-language/intro-to-type-checking/
Learn¶
Basic¶
- https://chocopy.org/ : ChocoPy is a programming language designed for classroom use in undergraduate compilers courses. ChocoPy is a restricted subset of Python 3, which can easily be compiled to a target such as RISC-V. Tooling is in Java.
Advanced¶
- https://www.cs.cornell.edu/courses/cs6120/2020fa/ : CS 6120: Advanced Compilers
Program transformation¶
- For Python: look at Bowler, Fissix.
- Example use: https://github.com/craigds/decrapify
Examples compilers¶
Simple C compilers¶
More interesting projects¶
- https://github.com/adamsol/Pyxell “Multi-paradigm programming language compiled to C++, written in Python.” (3000 LOC of Python + 3000 LOC of C++)
- See also: https://www.pyxell.org/docs/
- https://github.com/xdslproject “A Python Compiler Design Toolkit”
- https://github.com/ShivamSarodia/ShivyC “C compiler created in Python.”
Books¶
Resources¶
META II & OMeta¶
- http://www.chilton-computing.org.uk/acl/literature/reports/p025.htm
- https://www.bayfronttechnologies.com/mc_tutorial.html
- https://en.wikipedia.org/wiki/META_II
- https://en.wikipedia.org/wiki/OMeta
- https://github.com/vkazanov/pymetaii (Python implementation)
Page last modified: 2024-09-25 08:35:47