Overview
Aleph is an experimental programming language and a custom-built interpreter. Its primary goal is to serve as an educational tool for students and developers interested in understanding the core concepts behind language design and formal language theory.
Despite being a learning-focused project, Aleph incorporates features typical of modern programming languages. It supports lists, mathematical sets, reusable functions, and block-scoped variables. Furthermore, it includes an interactive shell (REPL) that allows users to write code and instantly see the results in the terminal, making it highly accessible for quick experimentation.
Technical details
Architecturally, the project is a Tree-walking interpreter written in standard C11. Source code processing is divided into two classical phases: lexical analysis, implemented with Flex, and parsing, generated by Bison. Together, these tools construct an Abstract Syntax Tree (AST) which is directly evaluated by the C engine.
Memory management is handled via a custom Reference Counting system that acts as a Garbage Collector. The program’s state and variables are managed using Hash-based symbol tables that fully support block-scoping. Additionally, the project features a debugging tool that exports the generated AST into a visual graph using Graphviz, and ensures reliability through a custom automated testing suite written in Python.