Universal Natural English Language
UNEL
A complete language stack designed around one idea: code should read the way people think.
Built from scratch in Python with a hand-written lexer, three dialect parsers, a unified AST, static analysis, a three-pass optimizer, dual execution engines, and a browser playground.
- Tree-walking interpreter for REPL and debugging
- Stack-based bytecode VM with call frames and jump patching
- 150+ native functions and actor-style tasks and channels
- 01Natural-English sourceNarrative · Executive · Math
- 02Lexer + 3 parsersMulti-word token matching
- 03Unified ASTOne common representation
- 04Analyze + optimizeTypes · scopes · three passes
- 05Interpreter or VMTree-walking or stack-based execution
Inside UNELThe language, the architecture, the tradeoff.
Readable code. Explicit rules.
UNEL explores English-like programming with a defined grammar. The goal is to make control flow readable while retaining the structure a compiler needs—not to guess the intent of any English sentence.
Three dialects. One core.
Narrative, Executive, and Mathematical syntax converge on a shared abstract syntax tree. Analysis and optimization work on that common representation, keeping surface syntax separate from execution.
Two ways to run a program.
A tree-walking interpreter supports inspectable execution; a stack-based virtual machine executes compiled bytecode. Maintaining both paths means keeping their language behavior consistent.
One program. Both engines.
A loop that adds 1 through 5 returned The sum is 15 in both the Tree-Walker and Bytecode VM. This is a reproducible example, not a full language-conformance or speed benchmark.
Set total to 0.
Repeat from 1 to 5 as step:
Set total to total plus step.
End repeat.
Display "The sum is " plus total.
