Skip to content

FrozenWolf-Cyber/YA-Python-Compiler

Repository files navigation

compiler

To run the code

make clean
make && ./Test.out < TestInput1.txt

Tech Stack

Programming Language: Python
Tools: YACC (Yet Another Compiler Compiler), Lex (for lexical analysis)
Data Structures: Symbol tables, parse trees, abstract syntax trees (ASTs)

Features implemented

Lexical analysis

Token identification
Lexical error detection
Symbol Table

Parser

Syntax declaration
Indentation and syntactic error detection
Parse Tree
Abstract Syntax Tree

Semantic Analysis

SDD + SDT
Annotated Parse Tree
Semantic Error detection

ICG

3 address code - Quadruples
Backpatching

Code Optimization

Basic blocks
DAG, CFG
Induction Variable elimination
Constant Folding + Copy Propagation
Dead Code Elimination
Peephole Optimization

About

Yet Another Python Compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published