Njord0 / Arobase

Arobase is a simple programming language with a c-like syntax.
GNU General Public License v3.0
19 stars 0 forks source link
arobase assembly c compiler programming-language

Arobase


Arobase is a simple programming language with a c-like syntax.

Archived !

About

Arobase is a simple programming language, current implementation is a compiler written in C

The language is meant to be easy to use and easy to learn!

Requirements

Installation

$ git clone https://github.com/njord0/Arobase
$ cd Arobase/arobase
$ make
$ make install

Example

Here a sample code which prints fibonacci(10), copy/paste it to a file named source.aro

fn fibonacci(a: integer) : integer
{
    if (a == 0)
    {
        return 0;
    }
               @ this is a comment
    if (a <= 2) @ 1 or 2
    {
        return 1;
    }

    return fibonacci(a-2) + fibonacci(a-1);
}
@@  This is a comment on multiple lines
    'main' function is needed in any program.
@@
fn main() : void
{
    print fibonacci(10);
}

Compilation :

$ arobase -s source.aro -o out

For more details see the --help option:

$ arobase --help
Usage: ./arobase -s source_file [options]
Options:
  -o            Output file name, default is 'out'
  --no-start    Tell the compiler to not add a '_start' function
  --assembly    Output assembly instead of executable

Documentation / Tutorial

You can find documentation and tutorial here