Python-like syntax transpiler generating optimized, modular C code.
# Build
make
# Transpile
./core_c examples/fibonacci.corc
# Compile & run
gcc -o prog output/fibonacci.c output/main.c && ./prog- LANGUAGE_REFERENCE.md - Syntax and examples
- ARCHITECTURE.md - Technical implementation
- MVP_FINAL_REPORT.md - Project status
make # Linux/macOS
gcc -o core_c src/*.c # Manual build./core_c file.corc # Basic transpilation
./core_c file.corc -o dir/ # Custom output
./core_c file.corc -v # Verbose (show AST)See examples/ directory for sample .corc files:
fibonacci.corc- Recursive algorithmscalculator.corc- Function compositioncontrol_flow.corc- Conditional logicgcd.corc- Iterative algorithms
python tests/run_tests.py # Run all tests
./test.sh # Linux/macOS wrapper
test.bat # Windows wrapperSupported: Functions, if/else, while loops, expressions, print statements, recursion Limitations: Integer types only, no arrays, no for loops, basic error handling
See LANGUAGE_REFERENCE.md for complete syntax documentation.
- Module system with imports
- Standard library functions
- Memory management helpers
- Code optimization passes
- IDE integration
- Debugging support
The transpiler follows a clean 4-stage pipeline:
- Lexer - Tokenizes source code
- Parser - Builds Abstract Syntax Tree
- Code Generator - Produces modular C code
- Output - Three separate files for clean organization
See ARCHITECTURE.md for detailed technical information.
LANGUAGE_REFERENCE.md- Complete language syntax and featuresARCHITECTURE.md- Technical design and implementation detailsexamples/- Working code samples- Inline code comments for implementation details
This MVP demonstrates the core concept. Future contributions could include:
- Additional language features
- Optimization improvements
- Better error handling
- IDE/editor integration
- Performance benchmarks
MIT License - Feel free to use, modify, and distribute.
Core C MVP - Bringing Python's expressiveness to C's performance through intelligent transpilation.