Aladino Syntax

The syntax of Aladino is quite simple. Here’s the BNF grammar representation:

prog := stat_list
stat := expr
expr := expr BINOP expr
      | UNARYOP expr
      | NUMBER
      | STRING
      | BOOLEAN
      | '[' expr_list ']'
      | '$' IDENTIFIER '(' expr_list ')'

BINOP := 
      '==' | '>=' | '>' | '<' | '<=' 
   | '&&' | '||' 

UNARYOP := '!'

This allows us to specify:

  1. Logical expressions: e.g. "a" == "a" or $fun() == 1;
  2. Function calls: e.g. $label("bug")

Did this page help you?