Skip to content

Yashrajgithub/MathLang-Compiler

Repository files navigation

💻 MathLang Compiler

Transform plain English math into executable code. An advanced AI-powered tool that parses natural language math expressions and generates real JavaScript code.

🌐 Live Demo


🚀 Overview

MathLang Compiler is a cutting-edge web application designed to convert simple natural language math expressions into executable JavaScript code. With a focus on intuitive input, real-time generation, and execution, this tool bridges the gap between human-readable language and computational logic.

Ideal for:

  • Demonstrating NLP + code execution synergy
  • Educational purposes
  • Rapid prototyping of logic from descriptive inputs

✨ Features

  • 🧠 AI-inspired rule-based parser for natural language math
  • 🧾 Auto-generates clean, executable JavaScript code
  • ▶️ Run code directly in-browser with output display
  • 💬 Built-in expression examples for quick testing
  • 🎥 Lightweight animation/WebM to enhance UI
  • 🎨 Clean and responsive interface using Tailwind CSS

📸 Preview

screenshot Live preview: 👉 https://math-lang-compiler.vercel.app/


🛠️ Tech Stack

Tech Description
⚛️ React Frontend framework
🧑‍💻 TypeScript Static typing for JavaScript
⚡ Vite Fast build tool
🧩 PrismJS Syntax highlighting for code editor
💅 Tailwind CSS Utility-first CSS framework
📦 React Simple Code Editor Embedded code editor

💡 Example Inputs
Try any of the following in the input box:

sum of 10 and 20
difference of 50 and 15
square of 9
product of x and y where x is 5 and y is 4
sum of a and b where a is 4 and b is 8


🧑‍💻 Getting Started

🔧 Prerequisites

  • Node.js ≥ 18
  • npm or yarn

📦 Installation

# Clone the repo
git clone https://github.com/Yashrajgithub/MathLang-Compiler.git
cd mathlang-compiler

# Install dependencies
npm install

# Run locally
npm run dev

About

MathLang Compiler is an AI-powered web application that translates natural language mathematical expressions into executable JavaScript code. Built with React, TypeScript, and Vite, it enables seamless code generation and execution from plain English inputs, showcasing the power of language processing in computational logic.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages