Eymenium Logo
Eymenium Execution Preview
Download Setup (.exe) Download VS Code Extension
or code --install-extension eymenium-0.1.0.vsix
or code --install-extension eymenium-0.2.0.vsix

About Eymenium Language

Eymenium (.eym)

Eymenium is an independent programming language that features a custom keyword set and clean lexical structure inspired by indentation-based syntaxes. It includes a built-in standard library with functions for formatted output, input handling, system command execution, and object introspection.


Key Features


Language Architecture

The reference runtime processes Eymenium source through a four-stage pipeline:

  1. Lexical Analysis: Scans .eym source into token streams while maintaining indentation contexts.
  2. Grammar Translation: Maps Eymenium grammar tokens and operators into internal representations.
  3. Compilation: Compiles token structures into executable bytecode objects.
  4. Virtual Machine Execution: Executes bytecode inside an environment pre-bound with Eymenium runtime functions.

Language Reference

Control Flow & Definitions

Eymenium Keyword Purpose Example
expDefine a functionexp greet():
blueprintDefine a class/structureblueprint Person:
chkConditional check (if)chk x > 0:
orchkSecondary check (else if)orchk x < 0:
nahFallback branch (else)nah:
loopIterate over collectionsloop i within items:
spinLoop while condition holdsspin active:
backReturn value from functionback result
stopTerminate loopstop
skipMove to next loop iterationskip
nopNo-operation placeholdernop

Operations & Constants

Eymenium Keyword Purpose Equivalent Concept
yesBoolean truetrue
noBoolean falsefalse
nullAbsence of valuenull / nil
alsoLogical AND&&
eitherLogical OR||
denyLogical NOT!
withinMembership checkin
sameReference equality===

Exception Handling & Modules

Eymenium Keyword Purpose
attemptBegin protected block (try)
catchHandle raised error (catch / except)
atlastAlways execute after attempt block (finally)
throwRaise an exception
usingScope context resource manager
calledBind alias name
fnAnonymous / lambda function
addImport module
outofImport specific symbols from module

Asynchronous Operations

Eymenium Keyword Purpose
keepMark function as asynchronous (async)
holdPause execution until async operation resolves (await)

Built-in Functions

Eymenium includes a core runtime library loaded globally into every execution context:

Function Description
out(...)Print output to standard output
getuser(prompt)Read input from standard input
cmd(command)Execute system command directly in shell context
sizeof(item)Return length/element count of collection
kind(item)Return system type of an object
grab(obj, attr)Read object attribute dynamically
put(obj, attr, val)Set object attribute dynamically
has(obj, attr)Check if attribute exists on object
nums(start, stop)Generate numeric sequence

Usage Guide

Installation & Setup

  1. Clone or download the eymenium executable toolchain (eym) onto your system path.
  2. Mark the toolchain as executable:
chmod +x eym

Script Execution

Execute .eym files using the Eymenium runner:

eym script.eym

Pass command line parameters into the program:

eym script.eym --mode=production --verbose

Interactive REPL

Launch the interactive REPL shell by invoking the engine without parameters:

eym
Eymenium REPL (.eym) -- type 'exit' or Ctrl-D to quit
eym> exp greet(name):
...>     out("Hello, " + name)
...> 
eym> greet("World")
'Hello, World'
eym> exit

Syntax Examples

1. Basic Input/Output & Control Flow

exp main():
    name = getuser("Enter name: ")
    chk sizeof(name) > 0:
        out("Hello,", name)
    nah:
        out("No name provided!")

chk __name__ same "__main__":
    main()

2. Iteration and Conditions

count = 3

spin count > 0:
    out("Countdown:", count)
    count -= 1

loop i within nums(1, 5):
    chk i % 2 == 0:
        out(i, "is even")
    nah:
        out(i, "is odd")

3. Object-Oriented Blueprint & System Shell Invocation

blueprint Device:
    exp __init__(self, label):
        self.label = label

    exp run_diagnostics(self):
        out("Testing device:", self.label)
        cmd("echo Diagnostic task complete")

dev = Device("Primary Server")
dev.run_diagnostics()

4. Exception Handling

attempt:
    result = 100 / 0
catch ZeroDivisionError called err:
    out("Error caught successfully:", err)
atlast:
    out("Finished attempt block execution.")