Jlang
A small programming language built to learn what happens between source text and execution.
Jlang is my toy programming language. “Toy” is important: the goal is not to compete with established languages, but to understand lexical analysis, syntax trees, parsing, and eventually evaluation by building each layer myself.
That kind of learning suits me. I can read an explanation of a parser, but it becomes real when a slightly ambiguous grammar turns into the wrong tree and I have to discover why.
Starting with a language, not a parser
I began by sketching the language I wanted to write. It has typed values, global and local scopes, functions, classes with public and private members, ranges with steps, formatted strings, and a NoVal value for missing data. The intended grammar lives alongside the implementation in EBNF.
The syntax deliberately reflects my own preferences rather than inheriting one language wholesale. Functions can use their last expression as a result, guarded returns can stop early, and declarations aim to remain compact and readable.
What exists today
The project is written in Rust. The lexer recognizes keywords, operators, literals, comments, and punctuation, with tests around the cases that initially went wrong. The parser is now taking those tokens into the first abstract syntax tree structures.
There is a long way from a parser to a useful language: semantic analysis, scopes, types, evaluation, diagnostics, and tooling all remain future territory. That is the point. Jlang is not a product roadmap; it is a route through a subject I want to understand from first principles.