Giter Site home page Giter Site logo

noor's Introduction

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:

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

اطبع (فب(٥))

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.