Skip to content

lucivpav/mila

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mila

Build Status

A simple procedural and imperative language.

Features

Integers (decimal, hexadecimal, octal form), arrays, variables (local, global), constants, input/output, control flow, loops, blocks, procedures, functions, exit, recursion.

Syntax

Mila aims to be compatible with Pascal syntax. Due to a few extensions however, a program written in Mila is not guaranteed to be compatible with Pascal syntax. When unsure about syntax of some construct in Mila, searching the same for Pascal will be helpful enough most of the time.

Example

$ cat factorial.mila
var
  n, f: integer;
begin
  n := 5;
  f := 1;
  while n >= 2 do
  begin
    f := f * n;
    dec(n);
  end;
  writeln(f);
end.
$ mila factorial.mila # create executable program
$ ./a.out
120

More sample programs

Precompiled binaries

Releases

Building from source

sh build.sh

Mila binary can be found in

llvm-obj/Release+Asserts/examples

Runnings tests

cd tests
./run.py

License

MIT

About

A simple procedural and imperative language.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages