An open API service indexing awesome lists of open source software.

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.

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

![screenshot](https://github.com/Yashrajgithub/MathLang-Compiler/blob/main/Preview.png)
*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