ENG Documentation
ENG (the executable is eng) is a small programming language whose syntax is written as structured English.
Programming in plain English — with a fixed grammar that the interpreter can parse deterministically.
This documentation describes the syntax implemented by the current Engling v0.1.0 interpreter.
Quick start
Run a source file:
cargo run -- run examples/01_hello.eng
Or, after building the binary:
eng run program.eng
Start the REPL by running eng without a subcommand:
eng
A minimal program:
eng
Let greeting be "Hello, world.".
Print greeting.
Every statement ends with a period (.). Blocks such as If, Repeat, While, and function bodies end with End..
What ENG supports
- Variables and assignment
- Numbers, strings, booleans, lists, functions, and
nothing - Arithmetic and comparisons
- Boolean
and/or If/OtherwiseRepeatandWhile- Functions with parameters and return expressions
- Lists with ordinal indexing
- Modules and selective imports
- An optional GUI feature using
egui/eframe - A bytecode compiler and stack-based virtual machine
Documentation map
- Getting Started
- CLI
- Syntax
- Variables
- Data Types
- Operators
- Conditions
- Loops
- Functions
- Lists
- Strings
- Modules and Imports
- REPL
- Errors and Debugging
- GUI
- Project Structure
- Architecture
- Grammar Reference
- Examples
- FAQ
Version note
The syntax documented here is based on the source tree supplied with this documentation. ENG is intentionally strict: it accepts known sentence templates rather than arbitrary English prose.