Skip to content

Implemented as thesis project in java with sub feature of python.

Notifications You must be signed in to change notification settings

patelalay231/Python-x86

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Python-x86 Compiler

A Java-based Python to x86 assembly compiler, following the implementation approach from "Crafting Interpreters". Currently in active development with new features being added regularly.

Current Version Features

Implemented

  • arithmetic expression evaluation
  • Variable, Local scoping

Project Structure

Python-x86/
β”œβ”€β”€ interpreter/
β”‚   β”œβ”€β”€ Documents/
β”‚   β”‚   β”œβ”€β”€ Grammar/         # Parser grammar documentation
β”‚   β”‚   └── command_to_run/  # Execution commands
β”‚   └── src/                 # Source code
β”œβ”€β”€ tests/
β”‚   └── arithmetic/          # Test cases
└── README.md

πŸƒβ€β™‚οΈ Getting Started

Prerequisites

  • Java Development Kit (JDK) 8+
  • Java compiler in PATH

Quick Start

# Clone repository
git clone https://github.com/patelalay231/Python-x86.git
cd Python-x86


## πŸ“– Current Grammar

```ebnf
expression β†’ equality ;
equality   β†’ comparison ( ( "!=" | "==" ) comparison )* ;
comparison β†’ term ( ( ">" | ">=" | "<" | "<=" ) term )* ;
term       β†’ factor ( ( "-" | "+" ) factor )* ;
factor     β†’ unary ( ( "/" | "*" ) unary )* ;
unary      β†’ ( "!" | "-" ) unary | power ;
pow      β†’ primary ( "^" pow )* ;
primary    β†’ NUMBER | STRING | "true" | "false" | "none" | "(" expression ")" ;

πŸ‘₯ Contact

Your Name - alay.patel@iitgn.ac.in Project Link: https://github.com/patelalay231/Python-x86.git

About

Implemented as thesis project in java with sub feature of python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published