https://github.com/yashrajgithub/mathlang-compiler
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.
https://github.com/yashrajgithub/mathlang-compiler
compiler compiler-design grammar-parser react tokenization typescript vite
Last synced: 23 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/yashrajgithub/mathlang-compiler
- Owner: Yashrajgithub
- License: mit
- Created: 2025-05-01T06:08:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-01T13:49:54.000Z (about 1 year ago)
- Last Synced: 2025-05-11T14:48:12.336Z (about 1 year ago)
- Topics: compiler, compiler-design, grammar-parser, react, tokenization, typescript, vite
- Language: TypeScript
- Homepage: https://math-lang-compiler.vercel.app
- Size: 731 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ป 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](https://math-lang-compiler.vercel.app/)
---
## ๐ 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

*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
```bash
# Clone the repo
git clone https://github.com/Yashrajgithub/MathLang-Compiler.git
cd mathlang-compiler
# Install dependencies
npm install
# Run locally
npm run dev