Minimal C subset → VHDL translator
git clone https://github.com/cmelnulabs/compi.git
cd compi && mkdir build && cd build
cmake .. && make
./compi input.c output.vhdl- Recursive-descent parser with full operator precedence
- Control flow:
if/else,while,for,break,continue - Functions, structs, and arrays
- VHDL entity/architecture generation
- Multi-level error diagnostics
- 35 unit tests (GoogleTest)
./run_tests.sh # Build and run all tests
./build_docs.sh # Build documentationsrc/ — Parser, lexer, codegen, error handler
tests/ — GoogleTest unit tests
docs/ — Sphinx documentation
examples/ — Sample C files
- No global variables
- No nested structs or arrays of structs
- Basic VHDL output (no optimization)
See ROADMAP.md for planned features and docs/ for full documentation.