Skip to main content

What is Backus-Naur formalism?

The Qlik Sense command line syntax and script syntax are described in a notation called Backus-Naur formalism, or BNF code. Here follows a short description of the BNF code:

The following symbols should be interpreted like this:

| Logical or: the symbol on either side can be used.
( ) Brackets defining precedence: used for structuring the BNF syntax.
[ ] Square brackets: enclosed items are optional.
{ } Braces: enclosed items may be repeated zero or more times.
Symbol A non-terminal syntactic category: can be divided further into other symbols, e.g. compounds of the above, other non-terminal symbols, text strings, etc.
::= Marks the beginning of a block that defines a symbol.
LOAD A terminal symbol consisting of a text string. Should be written as it is into the script.

All terminal symbols are printed in a bold face font. E.g. "(" should be interpreted as a bracket defining precedence, whereas "(" should be interpreted as a character that should be printed in the script.

Example:  

The description of the alias statement is:

alias fieldname as aliasname { , fieldname as aliasname}

This should be interpreted as the text string "alias", followed by an arbitrary field name, followed by the text string "as", followed by an arbitrary alias name. Any number of additional combinations of "fieldname as alias" may be given, separated by commas.

The following statements are correct:

alias a as first;

alias a as first, b as second;

alias a as first, b as second, c as third;

 

The following statements are not correct:

alias a as first b as second;

alias a as first { , b as second };

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!