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
- dynamic typing
- no scope exists
- imperative paradigm
- only stack allocation
- prints things at the screen
- define a variable in the same way of reassign a value to it
- could be an AOT (llvm IR), JIT or tree-walk interpreted programming language
- supports only a single type: number (which wraps the 32 bit floating point type)
- solves only arithmetic expressions with number literal, variables and round parentheses
Math operators supported
- equal
- star
- minus
- plus
- slash
Tokens supported
- equal
- star
- minus
- plus
- slash
- left round bracket
- right round bracket
- semicolon
- identifier (regex definition of word)
- 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