CBCL / DocumentationDocs v0.3.1

CBCL language reference

CBCL has three layers. The reader converts text into values. The message parser interprets those values as acts. An installed dialect gives more verbs their meaning.

On this page

How to read a form

In the reference tables, names such as verb, role, and value identify values that you supply. A word in head position, such as define or shape, selects the operation. You can copy a complete definition into a dialect file.

The formal grammar gives the productions for tokens, messages, dialects, protocols, shapes, types, and state. Installation also checks relationships between declarations. For example, a shape must refer to a verb that the dialect defines or inherits.

How to check an input

InputCheckWhat the result tells you
Any CBCL valuecbcl-cli parse --sexprThe reader can consume the complete expression.
A messagecbcl-cli parseThe message passes the CLI parsing and validation pipeline.
A dialect filecbcl-cli verify < file.cbclThe CLI reports the checks that it performed.
A dialect for use by an applicationInstall it in the Rust registry or with the JavaScript SDK.The host has a definition for subsequent operations.
An act in a threadCheck admission against the authenticated history.The result is accepted, pending, or rejected.

For a complete trace through a receiver, see JavaScript or Rust. To study an existing definition, see Annotated dialects.