Project

ql

0.0
No commit activity in last 3 years
No release in over 3 years
Q is a simple programming language implemented on top of Ruby with Treetop.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
>= 0

Runtime

~> 1.4
 Project Readme
  Q - a simple programming language

      / Q Q Q Q
        Q     Q
        Q Q Q Q Q
                Q
                Q

  Install the gem from RubyGems:

    $ gem install ql

  Then you can use the small `q' runner to run your .q files:

    $ q examples/factorial.q

  Example syntax:

    # assignment

    a <: 10;
    b <: 11;

    # operations

    a <: 3 + 5;
    a <: a = b;
    a <: a < b;
    a <: b > a;

    # functions

    # @ refers to the current function
    # every function returns @ by default
    # unless you assign @ another value

    factorial <: (n){
      if [n < 2] then [@ <: 1] else [@ <: n * @(n - 1)];
    };

    tenth_factorial <: factorial(10);



  This language is an experiment and parts of it were presented at
  MKRUG (http://ruby.mk).

  This software is licensed under the MIT/X11 license and is
  Copyright (C) 2014 Stojan Dimitrovski. See LICENSE for more details.