No description
.gitignore | ||
cpq.py | ||
helper.py | ||
items.py | ||
lexer.py | ||
parser.py | ||
README.md | ||
test.ou |
CPQ
cpq.py compiles a cpl source file (.ou) into a quad ir file (.qud) using sly as the lexer and parser.
Usage
python cpq.py source_file.ou
Structure
The compiler is seperated into multiple files:
- helper.py: contains a helper function (print_err)
- items.py: contains data structs for the parser
- lexer.py: lexer class
- parser.py: parser class
- cpq.py: main program and cmd handling logic