No description
Find a file
2024-04-04 09:56:28 +03:00
.gitignore gitignore 2024-03-26 21:02:54 +02:00
cpq.py i think its ready 2024-04-04 09:56:28 +03:00
helper.py i think its ready 2024-04-04 09:56:28 +03:00
items.py gitignore 2024-03-26 21:02:54 +02:00
lexer.py i think its ready 2024-04-04 09:56:28 +03:00
parser.py i think its ready 2024-04-04 09:56:28 +03:00
README.md i think its ready 2024-04-04 09:56:28 +03:00
test.ou some error stuff 2024-04-01 19:55:27 +03:00

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