ilusm.dev

iluc

Ilusm compiler written in Ilusm. Self-hosting compiler.

Load with: use iluc

Quick example

use iluc

result = ilucl("value")
prn(result)

Functions

Lexer

ilucl(src)

Closes or clears. Takes src.

Parser (recursive descent)

ilucp(tokens)

Performs the operation. Takes tokens.

ilpee(p)

Performs the operation. Takes p.

advan(p)

Performs the operation. Takes p.

expec(p, ttype, msg)

Performs the operation. Takes p, ttype, msg.

skpnl(p)

Performs the operation. Takes p.

prstm(p)

Performs the operation. Takes p.

pruse(p)

Sets a value. Takes p.

prdef(p)

Performs the operation. Takes p.

prfun(p)

Performs the operation. Takes p.

prpar(p)

Performs the operation. Takes p.

prif(p)

Performs the operation. Takes p.

prwhl(p)

Performs the operation. Takes p.

prtry(p)

Performs the operation. Takes p.

prexp(p)

Performs the operation. Takes p.

Expression parsing (precedence climbing)

prex(p)

Executes. Takes p.

prpip(p)

Performs the operation. Takes p.

prpst(p)

Sets a value or starts a process. Takes p.

pror(p)

Performs the operation. Takes p.

prand(p)

Performs the operation. Takes p.

ilprc(p)

Performs the operation. Takes p.

prrng(p)

Performs the operation. Takes p.

pradd(p)

Performs the operation. Takes p.

prmul(p)

Performs the operation. Takes p.

prun(p)

Performs the operation. Takes p.

prpos(p)

Performs the operation. Takes p.

prpri(p)

Performs the operation. Takes p.

prlst(p)

Sets a value or starts a process. Takes p.

probj(p)

Performs the operation. Takes p.

prlam(p)

Performs the operation. Takes p.

prmat(p)

Performs the operation. Takes p.

prpat(p)

Performs the operation. Takes p.

prife(p)

Performs the operation. Takes p.

prist(s)

Sets a value or starts a process. Takes s.

Code generator (Ilusm → C)

ilucg(ast, options)

Performs the operation. Takes ast, options.

gind(cg)

Performs the operation. Takes cg.

gstmt(cg, stmt)

Performs the operation. Takes cg, stmt.

gfun(cg, fn)

Performs the operation. Takes cg, fn.

gif(cg, stmt)

Performs the operation. Takes cg, stmt.

gwhl(cg, stmt)

Performs the operation. Takes cg, stmt.

gexpr(cg, expr)

Processes or prints. Takes cg, expr.

glst(cg, expr)

Sets a value or starts a process. Takes cg, expr.

gobj(cg, expr)

Performs the operation. Takes cg, expr.

gbin(cg, expr)

Initialises. Takes cg, expr.

gcall(cg, expr)

Performs the operation. Takes cg, expr.

glam(cg, expr)

Performs the operation. Takes cg, expr.

gpipe(cg, expr)

Performs the operation. Takes cg, expr.

gmat(cg, expr)

Performs the operation. Takes cg, expr.

gpat(cg, val, pat)

Performs the operation. Takes cg, val, pat.

escst(s)

Sets a value or starts a process. Takes s.

CLI

ilucm()

Performs the operation.

Notes

  • ilusm compiler - lex, parse, compile to bytecode.