ilusm.dev

lex

lexer for Ilusm (simplified for minimal runtime)

Load with: use lex

Quick example

use lex

result = toknw("value", "hello", 10)
prn(result)

Functions

Functions

toknw(type, text, line)

Performs the operation. Takes type, text, line.

tktyp(t)

Performs the operation. Takes t.

tktxt(t)

Performs the operation. Takes t.

tklne(t)

Creates a new instance. Takes t.

isws(c)

Performs the operation. Takes c.

isdgt(c)

Performs the operation. Takes c.

islph(c)

Performs the operation. Takes c.

islnm(c)

Performs the operation. Takes c.

chart(s, i)

Performs the operation. Takes s, i.

lexnm(src, pos, line)

Performs the operation. Takes src, pos, line.

lxstr(src, pos, line)

Performs the operation. Takes src, pos, line.

lexid(src, pos, line)

Performs the operation. Takes src, pos, line.

lex(src)

Executes. Takes src.

Notes

  • Lexer / tokeniser framework - define token rules, scan input.