Star on GitHub ⭐ Home Install Documentation & Book Playground IDE Tutorials & Learn Standard Library & Python Interop Community & Roadmap About & Governance Engineering Blog Brand Identity Kit Direct .exe Download
Canonical Reference Manual

Enlangg Documentation & Specification

The formal language specification, architectural invariants, syntax grammar, memory slot mechanics, CLI toolchain, and standard runtime reference for Enlangg.

Chapter 1: Sovereign Grammar & Spoken Syntax

Enlangg is engineered upon the fundamental premise that computation should be expressible in natural, phonological English without relying on 1960s mechanical teletype symbols (semicolons, braces, arrow operators, or bitwise glyphs).

The Sovereign Grammar Invariant

Every spoken keyword in Enlangg resolves to an unambiguous lexical token. Punctuation is never mandatory for statement termination; whitespace and line indentation form the clause hierarchy.

Spoken Arithmetic & Variable Declaration

Variables are declared and assigned using the idiomatic set <identifier> to <expression> syntax. Mathematical operators are expressed as natural English phrases:

basic_math.enlng
type enlng set principal to 5000 set rate to 0.05 set years to 3 set interest to principal multiplied by rate multiplied by years set total to principal plus interest display "Calculated Total Balance:" display total

Arithmetic & Assignment Operators

Spoken English Syntax Traditional Equivalent Example Expression Output Result
plus + set sum to 10 plus 25 35
minus - set diff to 100 minus 42 58
multiplied by * set area to width multiplied by height Area value
divided by / set avg to total divided by count Floating-point quotient
modulo % set rem to count modulo 2 Remainder
set ... to ... = set count to count plus 1 Mutates variable slot

Natural English Synonyms & Keyword Flexibility

Because English is a living, spoken human language, people naturally express ideas in synonyms. Enlangg embraces this fluidity: while set <id> to <val> is our primary idiomatic standard, the compiler natively accepts equivalent spoken alternatives with zero performance cost:

Operation / Intent Canonical Standard (Recommended) Spoken Synonyms (Permitted) Compiler Action
Variable Declaration set x to 10 let x = 10 · create x as 10 · declare x to 10 · initialize x to 10 Allocates stack slot & binds value
Variable Mutation set x to 20 update x to 20 · assign x to 20 · change x to 20 Overwrites slot in-place
Increment / Decrement increase x by 1 decrease x by 1 · set x to x plus 1 In-place arithmetic register update
Standard Output display "Hello" show "Hello" · output "Hello" · print "Hello" Flushes tokens to stdout
User Input ask "Enter name: " input "..." · read from user with "..." Stdin capture with type coercion
Collection Loops for each item in items: for every item in items: · for all item in items: Zero-allocation iterator traversal
Conditional Branching if x is greater than 10: if x > 10: · otherwise if ... · otherwise: Deterministic jump branch

Chapter 2: The 6 Sovereign Domains

Modern software engineering suffers from fragmentation across disparate languages: HTML for structure, CSS for styling, JavaScript for client logic, SQL for storage, and C/Python for systems. Enlangg unifies full-stack engineering under a single unified grammar with strict formal file extensions:

Extension Domain Tier Target Representation Compilation Target
.enlng Core Logic & Systems Spoken Algorithms, Mathematical Slots Native ISO C99 / Machine Binary
.enlngf Frontend & DOM Hierarchical Spoken Components WebAssembly / Virtual DOM AST
.enlngs Server & Microservices Route Handlers, Async Socket Listeners Multi-Threaded C99 Micro-daemon
.enlngd Design & Layout Geometric Spoken Design Tokens Optimized CSS3 Engine AST
.enlngm Mobile & Touch Gesture Bindings, Mobile Views Android NDK / iOS Objective-C Bridge
.enlngdb Database & Storage Sovereign Relational & Vector Schemas SQLite3 / LMDB / In-Memory B-Tree
service_endpoint.enlngs
type enlngs listen on port 8080: on get request to "/api/v1/health": respond with json: status: "active" uptime_ms: get_system_uptime() compiler: "Enlangg Native" gc_overhead: 0

Chapter 3: Inferred Memory Slots (Zero Garbage Collection)

Traditional languages choose between manual memory management (C/C++), borrow checking complexity (Rust), or heavy runtime garbage collection (Java/Go/Node/Python). Enlangg introduces Deterministic Compile-Time Slot Allocation:

How Memory Slots Work Under the Hood

During the lexical clause analysis phase, the Enlangg compiler builds a directed acyclic graph (DAG) of variable lifetimes. It maps every variable to a fixed static stack memory slot with zero dynamic allocation overhead. When an execution scope ends, memory is reclaimed automatically by stack pointer reset without running a background collector thread.

slot_memory_allocation.txt
[Compile-Time Parse Phase] |-- Clause: set user_id to 10042 -> Stack Slot #0 (Offset +0x00, 8 bytes) |-- Clause: set account_bal to 950.50 -> Stack Slot #1 (Offset +0x08, 8 bytes) |-- Scope Close: Procedure Return -> SP reset by 16 bytes (Zero GC latency)

Chapter 4: Spoken Control Flow

Branching and loops in Enlangg replace cryptic operators like ===, !=, &&, and || with spoken comparison clauses:

Spoken English Clause Equivalent Symbol Description
is equal to == Evaluates if operands have identical slot values
is not equal to != Evaluates if operands differ
is greater than > Strict greater-than numerical comparison
is less than or equal to <= Lower-bound comparison
otherwise / else else Fallback branch when condition evaluates false
while ... : while () {} Executes block as long as condition holds true
repeat N times: for (int i=0; i<N; i++) Bounded loop with zero loop counter overhead
control_flow.enlng
type enlng set score to 94 if score is greater than or equal to 90: display "Grade: Sovereign Tier A" otherwise if score is greater than or equal to 75: display "Grade: Tier B" otherwise: display "Grade: Tier C" set counter to 1 while counter is less than or equal to 5: display "Iteration: ", counter set counter to counter plus 1

Chapter 5: Procedures, Functions & Error Safety

Reusable logic is encapsulated in procedures. Procedures can declare parameters, specify return types, and safely trap runtime errors with catch failure:

procedures_and_errors.enlng
type enlng procedure calculate_mortgage with principal, rate, term_years returns number: if principal is less than or equal to 0: signal failure "Principal must be strictly positive" set monthly_rate to rate divided by 12 set months to term_years multiplied by 12 set payment to principal multiplied by monthly_rate return payment attempt: set monthly to calculate_mortgage(250000, 0.045, 30) display "Monthly Payment: ", monthly catch failure with error_message: display "Calculation Error: ", error_message

Chapter 6: Foreign Function Interface & C-ABI Emission

Every Enlangg program compiles directly to clean, standard ISO C99 code. You can call any existing C library (such as OpenSSL, SQLite, or raylib) directly without overhead:

c_foreign_bridge.enlng
type enlng external c function puts with text returns number external c function sqrt with value returns number set root to sqrt(144.0) display "Square root calculated via C-ABI: ", root

Chapter 7: Python Interop & The God Call

Enlangg programs can directly invoke installed Python packages (NumPy, PyTorch, Pandas, Scikit-Learn) with zero JSON or IPC serialization overhead. The CPython runtime is linked into the address space via the virtual memory bridge:

numpy_god_call.enlng
type enlng import python module "numpy" as np set matrix_a to np.array([[1, 2], [3, 4]]) set matrix_b to np.array([[5, 6], [7, 8]]) set product to np.dot(matrix_a, matrix_b) display "Matrix multiplication computed via CPython C-ABI:" display product

Compiler Command Line Reference

The sovereign compiler binary (enlng or enlangg) supports comprehensive flags for compilation, execution, syntax auditing, and C99 source emission:

Command / Flag Arguments Description
enlng compile <file> -o <output> [-O2|-O3] Compiles an Enlangg file down to native standalone machine binary
enlng run <file> [args...] Compiles in-memory and immediately executes the binary
enlng emit-c <file> -o <file.c> Emits clean ISO C99 source code without invoking GCC/Clang
enlng check <file> --strict Validates grammar, types, and slot allocations without binary output
enlng --version - Displays compiler version and build architecture

Compiler Diagnostic Error Codes

Enlangg diagnostics deliver clear, actionable natural English error messages with exact line and token coordinates:

Code Error Name Root Cause Resolution
E001 UnresolvedSlotIdentifier Variable referenced before create instantiation Declare with create <id> of ...
E002 ClauseGrammarMismatch Invalid spoken phrasing or unrecognized operator clause Use standard tokens like plus, is equal to
E003 TypeCoercionFault Illegal operation between incompatible slot data types Ensure numerical or string parity before arithmetic
E004 DomainExtensionViolation Using UI DOM clauses in a backend .enlng file Move UI code into dedicated .enlngf domain
E005 ForeignABISymbolNotFound C library function not found in dynamic linker path Ensure shared library is installed in system PATH