Skip to content

mayanks5034/Mini-Compiler-Python-Interpreter

Repository files navigation

🔥 PyCodeCraft: A Mini Python IDE for Learning, Testing & Optimizing

PyCodeCraft is an interactive mini Python IDE that lets you learn, test, and optimize Python code in a user-friendly GUI. Designed using Tkinter and built with custom Lexical Analyzer, Parser, and Interpreter, this tool is perfect for Python learners and enthusiasts.


✨ Features

🔹 Welcome Dashboard

  • Easy navigation between modules: Learn, Test, and Optimize.

🔹 Learn Python Module

  • Interactive learning cards for core Python concepts:
    Variables, Loops, Functions, File Handling, Exception Handling, and more.

🔹 Test Module (Python Editor)

  • Built-in syntax-highlighted code editor.
  • Real-time code execution with output panel.
  • Supports custom Python logic including loops, functions, lists, and try-except.

🔹 Code Optimizer

  • Beautify and auto-format your Python code using the black library.
  • Supports Copy to Clipboard and Save as File options.

🔹 Interpreter Core

  • Built with PLY (Python Lex-Yacc) and custom AST nodes.
  • Handles variables, expressions, conditionals, loops, user-defined functions, and error handling.

🛠 Technologies Used

  • Python 3
  • Tkinter for GUI
  • PLY (lex & yacc) for lexical analysis and parsing
  • black for code optimization
  • OOP-based AST and Interpreter structure

🧠 Team Members

  • Mayank Singh
  • Piyush Kumar
  • Kartik Kapri
  • Kumkum Pandey

🖼 Screenshots

🔹 Welcome Screen

📘 Learn Python

🧪 Testing Module

🚀 Code Optimizer

All the above named Screenshot files are attached.

▶ How to Run

  1. Make sure Python 3 is installed.
  2. Install required libraries:
    pip install ply black

About

This project, “Mini Compiler – Python Interpreter”, is a simplified compiler that compiles and interprets a subset of the Python programming language. It includes core components like a lexer, parser, AST nodes, and an interpreter. A GUI is also developed to allow users to write and run Python code interactively.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages