Transform plain English math into executable code. An advanced AI-powered tool that parses natural language math expressions and generates real JavaScript code.
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
- 🧠 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
Live preview: 👉 https://math-lang-compiler.vercel.app/
| 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
- Node.js ≥ 18
- npm or yarn
# Clone the repo
git clone https://github.com/Yashrajgithub/MathLang-Compiler.git
cd mathlang-compiler
# Install dependencies
npm install
# Run locally
npm run dev