Start
How it runs
Alana does not compile down to machine code and pretend to be serious.
She reads your .alana file as text and interprets it through five layers.
1. Lexer
Character by character, like someone reading a letter too carefully.
Keywords (define, sameas), literals (10, "Hello"),
names, and that little ; that ends every thought.
2. Tokens
Classified scraps of source. The parser never sees the raw text again. It only gets the tidy version. You deserve that.
3. Parser
Tokens become statements: definitions, calls, loops, conditions. A syntax mistake shows up here as an Alana error — out loud.
4. AST
The abstract syntax tree: expressions, blocks, function bodies.
Nested if / func / end; pairs become nested nodes.
It is a family tree, but for code.
5. Interpreter
Walks the tree, keeps scopes, evaluates expressions, and talks to the console
for show, readln, and readk.
This is where your program actually happens.
Implementation
C#, .NET 8. The runtime lives in a DLL. The executable is a thin Main
that introduces everyone — see Command line.