The first Arabic-syntax compiled systems programming language
Write native Windows applications using Arabic keywords, numerals, and punctuation
| Feature | Description |
|---|---|
| 🖥️ Native Compilation | Compiles to x86-64 Assembly → Native Windows Executables |
| 🌍 Full Arabic Syntax | Arabic keywords, numerals (٠-٩), and punctuation (. ؛) |
| 🧩 Modular Code | #تضمين (Include), multi-file compilation, .baahd headers |
| 🔧 Preprocessor | #تعريف (Define), #إذا_عرف (Ifdef), #الغاء_تعريف (Undefine) |
| ⚡ Functions | Define and call functions with parameters and return values |
| 📦 Arrays | Fixed-size stack arrays (صحيح قائمة[١٠]) |
| 🔄 Control Flow | إذا/وإلا (If/Else), طالما (While), لكل (For) |
| 🎯 Advanced Control | اختر (Switch), حالة (Case), افتراضي (Default), توقف (Break), استمر (Continue) |
| ➕ Full Operators | Arithmetic, comparison, and logical operators with short-circuit evaluation |
| 📝 Text Support | String ("...") and character ('...') literals |
| ❓ Boolean Logic | منطقي type with صواب (True) and خطأ (False) |
| ⌨️ User Input | اقرأ (Read) statement for integer input |
| ✅ Type Safety | Static type checking (v0.2.4+) with semantic analysis |
| 🔄 Self-Updating | Built-in updater (baa update) |
| Item | Supported | Notes |
|---|---|---|
| OS | Windows (x86-64) | Toolchain expects MinGW-w64 GCC |
| Toolchain | CMake 3.10+, MinGW-w64 GCC | gcc must be available in PATH |
| Source encoding | UTF-8 | Arabic text requires UTF-8 files |
| Terminal | Windows Terminal / PowerShell | Enable UTF-8 if output looks garbled |
Prerequisites: Windows, PowerShell, CMake 3.10+, MinGW-w64 with GCC
git clone https://github.com/OmarAglan/Baa.git
cd Baa
mkdir build && cd build
cmake ..
cmake --build .Create hello.baa (
صحيح الرئيسية() {
اطبع "مرحباً بالعالم!".
إرجع ٠.
}
# Compile
.\baa.exe ..\hello.baa
# Run
.\out.exeOutput: مرحباً بالعالم!
// حساب مجموع مصفوفة
صحيح الرئيسية() {
// Declare array of 5 integers
صحيح قائمة[٥].
صحيح مجموع = ٠.
// Fill array with values 0, 10, 20, 30, 40
لكل (صحيح س = ٠؛ س < ٥؛ س++) {
قائمة[س] = س * ١٠.
}
// Sum all values
لكل (صحيح س = ٠؛ س < ٥؛ س++) {
مجموع = مجموع + قائمة[س].
}
اطبع "المجموع هو: ".
اطبع مجموع.
إرجع ٠.
}
Output: المجموع هو: 100 (0 + 10 + 20 + 30 + 40)
| Document | Description |
|---|---|
| User Guide | Getting started and basic usage |
| Arabic Book | Definitive Arabic learning + reference (draft) |
| Language Specification | Complete syntax and features reference |
| Compiler Internals | Architecture and implementation details |
| API Reference | Internal C API documentation |
| Roadmap | Future development plans |
| Changelog | Version history |
- CMake 3.10+
- MinGW-w64 with GCC
- PowerShell (Windows)
- Git (for cloning)
# Clone the repository
git clone https://github.com/OmarAglan/Baa.git
cd Baa
# Create build directory
mkdir build
cd build
# Generate and build
cmake ..
cmake --build .
# The compiler is now at: build/baa.exe# Generate test.baa
gcc ..\make_test.c -o make_test.exe
.\make_test.exe
# Compile and run
.\baa.exe .\test.baa -o test.exe
.\test.exeExpected Output:
1
0
0
To verify documentation examples against the implementation:
cmake -S . -B build
cmake --build build
.\build\baa.exe --help
.\build\baa.exe --versionFor a quick end-to-end sanity check:
gcc .\make_test.c -o .\build\make_test.exe
.\build\make_test.exe
.\build\baa.exe .\build\test.baa -o .\build\test_suite.exe
.\build\test_suite.exe