Lx is a small, interpreted, dynamically typed scripting language with a PHP-like surface syntax.
It is a minimal runtime interpreter with no bytecode or VM layer.
Lx: Power without noise
Lx is a small interpreted language implemented in C. The front‑end is a hand‑written lexer and
recursive‑descent parser that builds an AST for expressions, statements, and control flow. The runtime
evaluates the AST directly (no bytecode), with a dynamic Value type supporting int, float, bool,
string, array, null/undefined/void. Arrays are associative (int/string keys) and use reference
counting with a periodic mark‑and‑sweep pass to break cycles. The environment model is lexical with
explicit global declarations. Built‑in functions and extensions are registered through a small C
extension API and exposed at startup.
BSD 3-Clause License. See LICENSE for details.
docs/lx_user_manual.md— Lx user manual: the language referencedocs/lx_functions_reference.md— functions referencedocs/lx_database_reference.md— PDO/SQLite quick guide and examplesdocs/lx_predefined_constants.md— predefined constants referencedocs/lx_installation.md— build, run, and test instructionsdocs/lx_adding_extensions.md— how to add your own extensionsdocs/lx_cgi.md— CGI wrapper usage (Apache/CGI setup)examples/— small scripts demonstrating typical use casesvscode-lx/— VS Code extension (syntax highlighting and completions)
cd lx
make
./lx tests/core/variables.lxmake testSee docs/lx_installation.md for more details.