Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Njord0/Arobase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

179 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors