Programming Language & Compiler

YaarScript

YaarScript is an industrial-grade compiler with Urdu-inspired syntax that makes programming accessible and intuitive. It is a slang-infused, Urdu-styled programming language built with Rust and compiled to WebAssembly, offering blazing-fast performance with culturally-resonant syntax. It runs entirely in the browser with zero dependencies and no server required.

Type

Programming Language & Compiler

Stack

5 Technologies

Features

7 Key Features

Status

Live

YaarScript preview
01. Overview

YaarScript is an industrial-grade compiler with Urdu-inspired syntax that makes programming accessible and intuitive. It is a slang-infused, Urdu-styled programming language built with Rust and compiled to WebAssembly, offering blazing-fast performance with culturally-resonant syntax. It runs entirely in the browser with zero dependencies and no server required.

Built with Rust, WebAssembly, Pratt Parser, Three-Address Code, React. This project showcases end-to-end development from architecture to deployment, demonstrating expertise in modern web technologies and production-grade engineering.

02. Features

Cultural Accessibility

Keywords inspired by Urdu/Hindi make programming intuitive for South Asian developers.

Industrial Strength

Multi-pass compiler with optimization, type safety, and production-ready features.

Modern Tooling

Web-based IDE with syntax highlighting, instant compilation, and zero setup required.

Zero Dependencies

Runs entirely in the browser via WebAssembly — no server required.

Exponentiation Power

Native support for the ** operator with high binding precedence (Level 9).

System Intrinsics

First-class support for suno() (input), waqt() (time), and ittifaq() (randomness).

Standard Library

Built-in functions for console I/O, system time, and mathematical operations.

03. Functionalities

Lexical Analysis (Scanner)

Tokenizes source code with full Unicode support, handling Urdu keywords and special characters.

Syntax Analysis (Parser)

Top-Down Operator Precedence (Pratt) parser builds an Abstract Syntax Tree (AST) with proper operator precedence.

Semantic Analysis

Comprehensive scope management, symbol table construction, and type checking with detailed error reporting.

IR Generation

Generates Three-Address Code (TAC), a low-level intermediate representation optimized for analysis.

Optimization Passes

Fixed-point optimization including constant folding, common subexpression elimination, and dead code removal.

Execution Engine

High-performance virtual machine executes optimized TAC with runtime type safety.

Language Syntax

Supports lafz (string), number, faisla (boolean), agar/warna (if/else), dohrao (loops), yaar blocks, and bolo() output.

Playground

Online playground lets users write and compile YaarScript directly in the browser with instant feedback.

04. Tech Stack
Rust
WebAssembly
Pratt Parser
Three-Address Code
React

YaarScript by Bazil Suhail

YaarScript is an industrial-grade compiler with Urdu-inspired syntax that makes programming accessible and intuitive. It is a slang-infused, Urdu-styled programming language built with Rust and compiled to WebAssembly, offering blazing-fast performance with culturally-resonant syntax. It runs entirely in the browser with zero dependencies and no server required.

Built with Rust, WebAssembly, Pratt Parser, Three-Address Code, React by Bazil Suhail, a Computer Scientist, AI Engineer, and Cross-Platform Developer based in Lahore, Pakistan.

Key Features