A simple, yet aHmazing arabic programming language meant to light up your day
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
grammar
lib removes hand-written recursive descent parser Jun 26, 2015
static update css May 8, 2018
test
.gitignore
.travis.yml
README.md
index.html
main.js
package-lock.json
package.json

README.md

Build Status

Noor-lang

Noor is a simple, yet aHmazing arabic programming language. It it is currently in development mode and is being further defined and refined. It is implemented in Javascript.

Noor comes with an IDE built to make it easy to write code in an arabic environment.

Imgur

TODO

  • Variable bindings, strings and integers
  • Function invocation
  • Built in print statement
  • Conditionals
  • Function declaration
  • Iteration
  • Booleans
  • Arrays and hashmaps
  • Standard library with trigonemtric key words

Status

Noor is still in development. The purpose of this project is to demonstrate a beginner friendly programming language that uses a non-latin alphabet based language, hence Arabic. Noor is implemented in JS so that it can run natively in the browser.

In prior commits, Noor used a hand written lexer and parser but now uses PEGJS, a Parser Expression Grammar that combiles the lexing and parsing phases into one step. There are some grievances I have with PEGJS, one is you cannot get the line number or information which caused a syntax error when building the abstract syntax tree for a program. Returning to a hand-written lexer and parser is still a possibility in my mind.

Goals

  • Complete test coverage
  • Enough language features and concepts to solve basic programming exercies
  • More to come soon...

FizzBuzz in Noor:

Imgur

Fibonacci: Imgur

FizzBuzz source:

امر عامل قاسمــمع٣ (ن) ليسوي
   د = ن ٪ ٣
   د
بس

امر عامل قاسمــمع٥ (ن) ليسوي
   د = ن ٪ ٥
   د
بس

لكل شي في [١..١٠٠] سوي
  د = قاسمــمع٣ (شي)
  ن = قاسمــمع٥(شي)

  اطبع شي

  لو  د == ٠ سوي
     اطبع "Fizz"
  بس

  لو ن == ٠ سوي
     اطبع "Buzz"
  بس

بس

Fibonacci source:

امر عامل فب (ن) ليسوي
    د = ٠
    لو ن < ٢ سوي
      د = ن
    والا
      ش = ن - ١
      س = ن - ٢
      م = فب(ش)
      ك = فب(س)
      د = م + ك
    بس
    د
بس

اطبع (فب(٥))

اطبع (فب(١٠))

اطبع (فب(١٥))