Dialect files#
The file#
Dialect YAML#
name: <NAME>
settings:
<capability>: <true or false>
A YAML file that defines a dialect. Its fields are name and settings, and no other.
settings holds exactly these keys, each true or false: the capabilities of Capability table, and realtime, constspace, sampled_slots, persist_on_series, storage_hydrate_facts and storage_hydrate_samples, which are false.
(Spec: [NDLC.2.1], [NDLC.2.2], [LDIA.3.3.5], [LDIA.4.1])
Read-only dialect#
A dialect that sets call, publish, cache, cache_delete and nocooldown false is valid. cached(...) reads still work.
(Spec: [NDLC.2.4])
Compiling with a dialect file#
-d#
dialect_file = ( "-d" | "--dialect-file" ) , dialect_path ;
Registers the dialect for one compile, and one pass may register any number. The subcommands that take it are at Options. A file that declares use <name> is validated against the dialect of that name.
With no dialect file, the compiler knows the built-in dialects.
(Spec: [NDLC.1.4], [NDLC.4.2], [NDLC.4.3], Source: compiler/dsc_cli.ebnf)
Registration errors#
File refusals#
The compiler validates a dialect file at load, before it reads any source file. It exits with status 2, and the message names the file.
Condition |
Message prefix |
|---|---|
a |
|
a capability absent from |
|
settings that violate a fundamental constraint |
|
|
|
a storage capability set |
|
|
|
a dialect name already registered |
|
a YAML syntax error |
file path and |
a top-level key other than |
file path, the line and the key |
|
file path and |