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

Check source files

The manifold-dsl binary checks one source file. Run it through Cargo from the repository root:

cargo run -p manifold-dsl -- check path/to/model.dsl

A valid file produces no output and exits successfully. A lexer, parser, or resolver error produces a source diagnostic on standard error and exits with a failure status.

Standard input

Pass - to read the source from standard input:

printf 'entity "vehicle-1" {}' | cargo run -p manifold-dsl -- check -

Base context

Use --base to resolve a source file against declarations from another DSL file:

cargo run -p manifold-dsl -- check task.dsl --base current-state.dsl

The command parses and resolves the base file first. References in task.dsl can then use entities declared by current-state.dsl. Base declarations do not become part of the result for the checked file. A checked file cannot redeclare an identity that exists in the base context.

Standard input cannot be both the checked source and the base source.

Color

Use the global --color option with auto, always, or never:

cargo run -p manifold-dsl -- --color never check model.dsl

Diagnostic families

Diagnostic codes identify the stage that rejected the source:

PrefixStage
MDSL-LLexer
MDSL-PParser
MDSL-RResolver and semantic validation

Diagnostics include the source path, one or more labeled spans, and help text when the resolver can suggest a concrete correction.