The Icaro Programming Language


The following specification is intended as the first prototype of Icaro, not the final goal


Icaro features at a high level

  1. dynamic typing
  2. no scope exists
  3. imperative paradigm
  4. only stack allocation
  5. prints things at the screen
  6. define a variable in the same way of reassign a value to it
  7. could be an AOT (llvm IR), JIT or tree-walk interpreted programming language
  8. supports only a single type: number (which wraps the 32 bit floating point type)
  9. solves only arithmetic expressions with number literal, variables and round parentheses

Math operators supported

  1. equal
  2. star
  3. minus
  4. plus
  5. slash

Tokens supported

  1. equal
  2. star
  3. minus
  4. plus
  5. slash
  6. left round bracket
  7. right round bracket
  8. semicolon
  9. identifier (regex definition of word)
  10. number (regex definition of digit)

As a practical example, the goal of this language is to execute a program like

sum = 1 + 2

subtraction = sum - 3

multiplication = subtraction * 3

division = multiplication / 3

result = -1 * (sum + subtraction - multiplication * division)

print result

GitHub

View Github