SSH into hackclub.app
ssh hackclub.app -p 2121
Or try Eia-Playground — eia.themelon.space
- Supports
String
,Int
,Bool
,Float
,Array
,List
- Functions, Variables, Lambdas ✌️
- Object-oriented: Creating Classes and Objects ☕
- Automatic type resolution — who specifies variable types nowadays? (maybe Java does)
- Comes with a Standard Library 📚
- Debug your code with Live Tracer 💪
Eia64 is an interpreted language ✨
There are 3 main stages
-
Lexing — first level of syntax breakdown
A common process among all the languages.
It splits the code, identifies and marks each token into categories such as Operators, Literals (Int/String value), Function Calls, etc. This metadata produced helps in the next stage i.e. parsing. -
Parsing
In computer systems, parsing refers to organizing data into a structured way in which it can be operated further.
The parser receives an array of Lexed tokens with metadata and loops over it to form Abstract Syntax Trees (AST). Just like how we can choose many paths in life, the tree guides the execution flow of a program.
An example for lexing, parsing and execution of code print(1 + 2 * 3)
In the above demonstration, after taking in the code input, lexer emits a stream or an array of tokens. After the Parser receives it, it converts it into a Tree.
An expression can contain many sub expressions, for e.g. +{Int{2}, Int{3}}
.
- Execution
In interpreters, execution is the last step. If it was for compilers, this step would be compilation, where bytecodes or machine codes are emitted.
Consider there is an expressionX
and it contains sub-expressionsY
andZ
. Here,X
's value is dependent on sub-expressionsY
andZ
. SoY
andZ
should be first fully evaluated beforeX
is evaluated.
This is repeated until the final node gets evaluated.
Thank You