How delfinibnkadafi/el-language works
Ellang is a C implementation of a high-level language with its own stack-based virtual machine. A user supplies an .ell source file to the CLI; the entry point loads it, initializes tokenization, compiles it to bytecode, and runs that bytecode. The parser handles syntax, type and scope checks, and emits instructions; the VM provides execution, variables, arrays, recursion, built-ins, and interactive I/O. The README documents these capabilities; sampled excerpts show representative lexer, parser, and VM behavior, but not every implementation detail.
Main entry points: elvm.c Virtual machine · main.c CLI runner · parser.c Parser and compiler · lexer.c Lexer
Components 16
CLI entry
- CLI runner
src/main.c
Compilation
- Lexer
src/lexer.c - Parser and compiler
src/parser.c - Bytecode
src/elvm.h
VM execution
- Virtual machine
src/elvm.c - Variables and arrays
src/elvm.c - Calls and recursion
src/elvm.c - Control flow
src/elvm.c
Runtime services
- Built-in functions
src/elvm.c - Strings and formatting
src/elvm.c - Console I/O
src/elvm.c
Other components
- Program author
- Ellang source
- Standard input
- Program output
- Execution result
Connections 19
- Program author → Ellang source: writes
- Ellang source → CLI runner: provides file
- CLI runner → Lexer: initializes
- Lexer → Parser and compiler: supplies tokens
- Parser and compiler → Lexer: requests tokens
- Parser and compiler → Bytecode: emits instructions
- CLI runner → Parser and compiler: compiles
- CLI runner → Virtual machine: runs bytecode
- Bytecode → Virtual machine: executes
- Virtual machine → Variables and arrays: accesses
- Virtual machine → Calls and recursion: manages calls
- Virtual machine → Control flow: dispatches jumps
- Virtual machine → Built-in functions: dispatches built-ins
- Virtual machine → Strings and formatting: executes string ops
- Virtual machine → Console I/O: executes I/O
- Console I/O → Standard input: reads
- Standard input → Console I/O: provides input
- Console I/O → Program output: writes
- Virtual machine → Execution result: produces