Syntax diagrams

A syntax diagram describes the context-free, abstract grammar of a product function.

A syntax diagram for example describes a language instruction, the structure of a configuration file, or the options of command-line tool.

The following rules are used in a syntax diagram:

  • Invariable syntax elements (keywords) are written in fixed font.
  • Language keywords are in uppercase, like INPUT BY NAME.
  • Variable syntax elements are written in italics.
  • Wildcard characters are underlined and used to indicate syntax elements that can either repeat, be mandatory or optional.
Table 1. Wildcard characters
Wildcard characters notation Description
[ element ] Square brakets indicate an optional element in the syntax.
[ element-1 | element-2 ... ] Square brakets with pipe separator indicate an optional element to be selected from the list.
{ element-1 | element-2 ... } Curly brakets with pipe separator indicate a mandatory element to be selected from the list.
[...] A sign made of square brakets with three dots indicate that the previous element can appear more than once.
[,...] A sign made of square brakets with a comma followed by three dots indicate that the previous element can appear more than once, and must be separated by a comma.

The following syntax diagram defines the CALL instruction of Genero BDL:

CALL function-name ( [ parameter-name [,...] ]  )
   [ RETURNS variable-name [,...] ]