Skip to content

DescribeGrammar directives

Viktor Chernev edited this page Nov 11, 2024 · 7 revisions

Directives are commands for the preprocessor that affect the preprocessing or the compilation process for the given source file. In Describe, directives are written as a regular list, titled "directives". Each directive is an entry in the list. The text of the entry is the name of the directive, and the tag of the entry is the value. The directives list, if present, must be the first list in the source file.

A list of directives and instructions for their use follows:

  • language-version language-version <1.0>
    The language-version directive is used to set, well, the language version for the current file. It overrides the Command line flag, in the CLI App.

  • namespace namespace <name.ofNamespace>
    The namespace directive is related to the dot notation addressing scheme. It is used to set the current namespace for the file, which is then added as a prefix to tag ids (for more info see "Addressing schemes").

  • verbosity verbosity <high>
    The verbosity directive is used to set the parser verbosity for the file. The values are high or h, medium or m and low or l.

In the example below, we have a source file utilizing the verbosity directive to set parser log verbosity to high, and the namespace directive, indicating the current namespace under the dot notation addressing scheme:

directives

Links

Next
Prev

Clone this wiki locally