Installing and Building Lumi

Syntax Highlighting

For Lumi syntax highlighting it’s recommended to use one of:

Installing Lumi

Note

In all shell examples below $CC assumed to hold the C compiler, and the current directory assumed to be on Lumi repository root directory

  1. clone or download Lumi repository: git clone https://github.com/meircif/lumi-lang.git

  2. run make install

or install manually:

  1. build the latest Lumi compiler with a C compiler: $CC TL5/tl5-compiler.c TL4/lumi.4.c -ITL4 -o tl5-compiler

  2. build the “lumi” command with a C compiler: $CC lumi-command/lumi.c TL4/lumi.4.c -ITL4 -o lumi

  3. add the Lumi compiler and the lumi command to the system path (for example: sudo install lumi tl5-compiler /usr/local/bin/)

Building the Lumi Compiler

A Lumi compiler must first be built using a C compiler. That Lumi compiler can then be used to generate C code from Lumi code.

It is recommended to add the compiler executable to the system path, for example, in Linux move it to /usr/local/bin/.

Latest Version - TL5 Compiler

make tl5-compiler
# or
$CC TL5/tl5-compiler.c TL4/lumi.4.c -ITL4 -o tl5-compiler

Old Versions

## TL4 compiler
make tl4-compiler
# or
$CC TL4/tl4-compiler.c TL3/lumi.3.c -ITL3 -ITL4 -I. -o tl4-compiler

## TL3 compiler
make tl3-compiler
# or
$CC TL3/tl3-compiler.c TL2/lumi.2.c -ITL2 -o tl3-compiler

## TL2 compiler
make tl2-compiler
# or
$CC TL2/tl2-compiler.c TL1/lumi.1.c -ITL1 -o tl2-compiler

## TL1 compiler
make tl1-compiler
# or
$CC TL1/tl1-compiler.c TL0/tl0-file.c TL0/tl0-string.c -ITL0 -o tl1-compiler

## TL0 compiler
make tl0-compiler
# or
$CC TL0/tl0-compiler.c TL0/tl0-file.c TL0/tl0-string.c -o tl0-compiler

Building the lumi Command

The lumi command must first be built using a C compiler. lumi command can then be used to compile an executable directly from Lumi code by running Lumi compiler and C compiler one after another.

make lumi
# or
$CC lumi-command/lumi.c TL4/lumi.4.c -ITL4 -o lumi

It is recommended to add the compiler executable to the system path, for example, in Linux move it to /usr/local/bin/.