This repository contains a C implementation of the early stages of a Python 2.7 assembler pipeline. The project reads Python assembly source files (.pys) and is intended to build a Python bytecode-related object (.pyc workflow target).
The coursework was split into four deliverables:
- Deliverable 1: Regular-expression engine.
- Deliverable 2: Lexical analysis (lexeme extraction).
- Deliverable 3: Syntax analysis (parser and Python object scaffolding).
- Deliverable 4: Bytecode generation and serialization (not completed in this version).
.
|- .gitignore
|- README.md
|- Makefile
|- include/
| |- pyas/ # Public headers
| |- unitest/ # Unit test framework headers
|- src/ # Library implementation files
|- prog/ # Main programs
|- tests/ # Unit tests
|- test-data/ # Test fixtures and expected data
|- image/ # Non-code images
Build all programs and tests:
makeRun lexer example:
./prog/lexer.exe test-data/lex/regexp_file.txt test-data/lex/source/totor_1.pysRun parser entrypoint:
./prog/parser.exe test-data/lex/regexp_file.txt test-data/lex/source/totor_1.pysRun all test executables:
make runtests