Pcc is a c compiler based on ply + pycparesr + llvmlite + llvm.
We can run c program like python: pcc test.c
to run c code.
(no header file support).
Pcc was inspired by: https://github.com/eliben/pykaleidoscope.
- Some code skeleton is come from pykaleidoscope.
- ply and pycparser was Embedded into this project for debug use.
- test with llvm-13 on mac. (linux should work)
LLVM_CONFIG='/usr/local/Cellar/llvm@13/13.0.1/bin/llvm-config' pip install llvmlite==0.39.1
- py.test
- py.test -s test/test_if.py
python -m pcc clang_study/test_arrary.c
- finish the full c syntax (too much test cases).
- the libc function like
printf, memset
. - code refactor.