E@SY is a small beginner-friendly programming language for learning scripting,
compiler design, and simple game-language ideas. Source files use .easy;
compiled bytecode files use .easyc.
E@SY is experimental alpha software. Syntax and project files may change before v1.0.
The internal Python package is named easylang because E@SY is not a valid
Python import name. User-facing text should use E@SY.
E@SY no longer uses a C backend. The compiler now writes E@SY bytecode:
.easy source
-> lexer
-> parser
-> AST
-> type checker
-> bytecode compiler
-> .easyc bytecode
-> bytecode VM
The tree-walking interpreter is still available for quick script runs.
Game blocks compile into the same .easyc bytecode. When you execute game
bytecode, E@SY starts an experimental Python window runtime that calls
init(), update(dt), and draw() from the VM.
Run a script directly:
python -m easylang run examples/hello.easyCompile to bytecode:
python -m easylang compile examples/hello.easyRun compiled bytecode:
python -m easylang exec examples/hello.easycThe packaged GUI and installer register .easy and .easyc file associations
automatically where supported. To repair them manually from a terminal:
python -m easylang register-file-typesDisassemble bytecode:
python -m easylang dis examples/hello.easycOpen the GUI:
python -m easylang guiIf you are using the packaged Windows release, run the same commands with
easy.exe instead of python -m easylang.
Create a starter project:
python -m easylang new MyGame --template spriteCompile the configured project entry:
python -m easylang compile MyGamePackage a bytecode release folder:
python -m easylang dist MyGame
python -m easylang dist MyGame --zipExample easyconfig.json:
{
"name": "MyGame",
"entry": "main.easy",
"output": "dist/MyGame.easyc",
"assets": "assets",
"build": "build"
}Relative paths are resolved from the folder containing easyconfig.json.
Launch:
python -m easylang guiThe GUI is a wrapper over the same compiler functions as the CLI. It can:
- create and open projects
- edit
.easyfiles - open
.easycfiles through the bytecode runtime after validation - run scripts with the interpreter
- compile
.easyto.easyc - run compiled bytecode
- preview bytecode JSON
- run doctor/setup/examples/release checks
- package a bytecode release
python -m easylang doctor
python -m easylang setup-check
python -m easylang templates
python -m easylang examples-check
python -m easylang release-check
python -m unittest discover tests.easy: E@SY source code, UTF-8 text,text/vnd.easylang.source; charset=utf-8.easyc: compiled E@SY bytecode/package, JSON with magic"EASYBC",application/vnd.easylang.bytecode+json
The media type requests have been submitted and are pending IANA registration.
See docs/file-types.md for details, and docs/iana-media-type-registration.md for the IANA-style media type registration specification.
Current script features include:
- comments with
// - numbers, strings, booleans, and
null letandconst- arithmetic, comparisons, and boolean operators
if,else,while, andfor- functions and return values
- arrays and structs
- imports
- built-ins such as
print,input,len,range,str,num,type, and small save/load helpers
easylang/
lexer.py tokenizes source
parser.py builds the AST
ast_nodes.py dataclass AST definitions
type_checker.py checks names and types
interpreter.py tree-walking interpreter
compiler.py AST -> bytecode compiler
bytecode.py bytecode model and JSON serialization
vm.py stack-based bytecode virtual machine
game_runtime.py bytecode game loop, drawing, input, and assets
disassembler.py readable bytecode output
gui_app.py CustomTkinter GUI wrapper
examples/
tests/
docs/
To add syntax, usually edit:
easylang/token.pyeasylang/ast_nodes.pyeasylang/parser.pyeasylang/type_checker.pyeasylang/interpreter.pyeasylang/compiler.pyeasylang/vm.py- tests
To add a built-in function, edit easylang/stdlib.py. If the built-in needs
special bytecode behavior, also update easylang/compiler.py and
easylang/vm.py.
- improve the bytecode game runtime
- add richer bytecode debugging tools
- improve GUI bytecode debugging tools
- add richer beginner docs and tutorials
- consider native targets later from the bytecode layer