Skip to content

Latest commit

 

History

History
73 lines (56 loc) · 1.96 KB

File metadata and controls

73 lines (56 loc) · 1.96 KB

Py2Cpp

Py2Cpp is a python compiler developed using C++. It focuses on implementing the lexical analysis and syntax analysis phases of a compiler. This project includes a fully functional GUI, a symbol table, error handling mechanisms, and parse tree generation.

This project was created as part of the Design of Compilers course at Ain Shams University, Spring 2025.

Features

  • Lexical analysis with token generation
  • Syntax analysis using recursive descent parser
  • Symbol table with GUI view
  • Error handling (lexical and syntactic)
  • Parse tree visualization (Graphviz integration)
  • Modern C++ with Qt-based GUI

Prerequisites

Ensure the following dependencies are installed on your system:

  • C++ Compiler supporting C++20
  • CMake version 3.16 or higher
  • Qt 5 or 6 development libraries
  • Graphviz (for parse tree visualization)

🛠️ On Debian-based systems:

sudo apt install build-essential cmake qtbase5-dev graphviz

🛠️ On Windows:

  • Install Qt
  • Install CMake
  • Install Graphviz
  • Use MSYS2/MinGW or integrate CMake with your IDE (e.g., CLion or Visual Studio)

Installation

Clone the repository

git clone https://github.com/ysif9/Python-Compiler.git
cd Python-Compiler

Create a build directory

mkdir build && cd build

Configure the project

cmake ..

Build the executable

make

Run the application

./Python-Compiler

Screenshots

  • Add Screenshots

Authors