Wyrm Programming Resources #

Wyrm Language Grammar #

This grammar file is generated directly from the packrate/PEG style parser and lexxer included in the wyrm source tree. As wyrm is still at prototype stage, the grammar is expected to drift. However, at this point, the majority of primitives with basic execution should be considered stable.

Lexical Conventions #

Basics #

Wyrm files shall be encoded in UTF-8.

Keywords #

Keywords are considered own tokens: and, break, catch, class, co, continue, defer, do, elif, else, emit, false, fn, for, from, if, import, in, is, nil, not, or, pass, return, signal, slot static, task, thread, true, try, var, while, with, yield

Read more →

Semantic Explanation of Grammar #

The full grammar is formally defined in grammar.md. This section defines informal details.

Top-Level #

A wyrm module is a list of statements. Every statement produces a result. Any standalone expression is the value of the expression.

Statements and Blocks #

Wyrm follows Python’s general offside rules with an additional allowance for brace style code. The preferred style is that of Python, braces are intended to allow one-liners and compressed scripts.

Read more →