Thomas-Langlais / t-lang

Creating a programming language using Rust
1 stars 0 forks source link

T-Lang

I wanted to challenge myself into deepening my understanding on how high-level languages like: Ruby, Python, and Java interpret source code; as well as, the mechanisms to run the code or compile the code into an executable file.

For now, I will learn to create an interpreter as it's a good starting point. I would like to learn how to convert the AST into an executable file.

Goals

Components

Every programming language has the following components:

Lexer

The component that breaks down an input string into smaller units (aka tokens) that the language understands

Parser

The component that analyzes the lexeme tokens generated and forms a syntax that conforms to the language grammar and creates the AST.

Interpreter/Assembler

Uses the AST from the parser to run the program that uses the language or generate machine code that is equivalent to the source code.