Njord0 / Arobase

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  • gcc
  • gas (gnu as)
  • ld
  • A 64 bits linux distribution (generated assembly is for x64 architecture)

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

About

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

License:GNU General Public License v3.0


Languages

Language:C 99.0%Language:Makefile 1.0%