Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix A: Language Reference

1. Top-Level Structure & Definitions

Definition Declarations

Definitions are declared using a name followed immediately by square brackets [...]. The brackets enclose the definition’s body, including its sources, destinations, field of resolution, domain specifier, and transform rules.

  • Syntax: NAME[(sources)(destinations) domain_specifier : body]
  • Identifier Identifier: Any standard alphanumeric identifier preceding [ is classified as a definition name (entity.name.type.definition).

Domain Specifier

The resolution/domain specifier section defines the operational domain or spatial context of the definition.

  • Domain Keywords: Currently, the set includes:
  • spatial3d

2. Invocations & Place References

Invocations

Invocations execute/instantiate named relationships or functions.

  • Syntax: NAME($dest1 $dest2)(source1<> source2<>)
  • Identifier: Any identifier preceding ( is classified as an invocation (entity.name.function.invocation).

Destination Places

Destination places or dynamic name compositions are prefixed with a dollar sign $.

  • Syntax: $identifier
  • Token Classification: variable.parameter.destination
  • Pattern: \$[A-Za-z_][A-Za-z0-9_]*

Source Places

Source places represent incoming causal signals or inputs and are denoted by trailing angle brackets that enclose the content or reference to connect to that signal <>.

  • Syntax: name<> or name<content>
  • Token Classification: entity.name.function.place
  • Pattern: NAME(?=\s*<)

3. Control Keywords & Built-in Functions

Procedural / Code Generation Keywords

  • generate: Declares code-generation blocks (keyword.control).

Structure Field Labels

Key-value declarations preceding a colon ::

  • inputs:
  • output:
  • const:

Built-in Support Functions

Functions expecting argument lists in parentheses:

  • clamp(...)
  • avg(...)

4. Lexical Tokens & Punctuation

Comments

  • Line Comment: Double slashes // ignore all remaining text on the line.

Literals & Arithmetic

  • Numeric Constants: Unsigned integer literals (\b[0-9]+\b).
  • Arithmetic Operators: Standard mathematical operations: +, -, *, /.

Structural Delimiters & Delimiting Groups

DelimiterToken NameStructural Purpose
{ }punctuation.definition.group.mutexEncloses mutex or conditional completeness groups.
[ ]punctuation.definition.bracketEncloses bundle brackets or definition outer bodies.
( )punctuation.definition.parenEncloses parameter lists and source/destination bindings.
< >punctuation.definition.placeEnclose source place boundaries.
:punctuation.separator.colonSeparates domain specifiers from bodies, or key-value entries.
,punctuation.separator.commaSeparates itemized arguments or entries.

Drafting in progress…