Skip to content

1yogabyte/pyas-python27-assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

145 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python 2.7 Assembler Project (C)

Project Goal

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:

  1. Deliverable 1: Regular-expression engine.
  2. Deliverable 2: Lexical analysis (lexeme extraction).
  3. Deliverable 3: Syntax analysis (parser and Python object scaffolding).
  4. Deliverable 4: Bytecode generation and serialization (not completed in this version).

Repository Structure

.
|- .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 and Run

Build all programs and tests:

make

Run lexer example:

./prog/lexer.exe test-data/lex/regexp_file.txt test-data/lex/source/totor_1.pys

Run parser entrypoint:

./prog/parser.exe test-data/lex/regexp_file.txt test-data/lex/source/totor_1.pys

Run all test executables:

make runtests

About

C implementation of a Python 2.7 assembler pipeline with regex engine, lexer, parser, and unit tests.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors