Skip to content

irinatomic/Enchanto_programming_lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enchanto Programming Language

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.

Naming Conventions

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
print 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.

About

Custom language - including lexer, LR tables, parser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages