Skip to content

ubermenchh/pycc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pycc

A Tiny C Compiler written in Python

Based on Nora Sandler's blog

  • It can handle basic C code, like functions (recursive functions need a little tweaking)

Usage:

python main.py <input_file.c>
  • For running each stage separately use the following flags
options:
  -h, --help      show this help message and exit
  -l, --lex       Print tokens from lexical analysis
  -p, --parse     Show parsing completion status
  -cg, --codegen  Print generated assembly code
  --all           Enable all output phases

References:

  • Blog Post
  • pylox - language i wrote based on the book Crafting Interpreters

About

a c compiler written in python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages