This project is developed as part of a University subject on "Program Compilers" and takes inspiration from the magical world of Harry Potter. Enchanto is a programming language designed to pay homage to the iconic franchise.
Enchanto uses a set of naming conventions inspired by the enchanting world of Harry Potter. Here is a table summarizing the mappings:
Rules:
- the arithmetic operations must have a space on eiher side of them
- all lines must end with a semicolon
- when declaring multiple variables it is done with a space, not a comma
- when declaring an array, size must be given
- all string must be one word (no spaces allowed)
Normal | Enchanto |
---|---|
int | incantum |
double | dublatum |
char | charmax |
string | stringo |
array | arraygo |
main | enchanto |
(declare) | declaro |
input | scriptum |
revelio | |
Assignment (=) | = |
+ - * / % | + - * / % |
== < > ≤ ≥ ≠ | == < > ≤ ≥ ≠ |
&& | andus |
|| | orus |
! | notus |
ternary | tribus |
if | mystime |
else if | turntime |
else | returntime |
for | forculus |
while | whilegardium |
The examples can be found in examples folder.