How to read syntax diagrams

This section describes how to read syntax diagrams. It defines syntax diagram symbols, items that may be contained within the diagrams (keywords, variables, delimiters, operators, fragment references, operands) and provides syntax examples that contain these items.

Syntax diagrams pictorially display the order and parts (options and arguments) that comprise a command statement. They are read from left to right and from top to bottom, following the main path of the horizontal line.

Symbols

The following symbols may be displayed in syntax diagrams:

>>---
Indicates the beginning of the syntax diagram.
--->
Indicates that the syntax diagram is continued to the next line.
>---
Indicates that the syntax is continued from the previous line.
---><
Indicates the end of the syntax diagram.

Syntax items

Syntax diagrams contain many different items. Syntax items include:

Note: If a syntax diagram shows a character that is not alphanumeric (for example, parentheses, periods, commas, equal signs, a blank space), enter the character as part of the syntax.

Keywords, variables, and operators may be displayed as required, optional, or default. Fragments, separators, and delimiters may be displayed as required or optional.

Required
Required items are displayed on the main path of the horizontal line.
Optional
Optional items are displayed below the main path of the horizontal line.
Default
Default items are displayed above the main path of the horizontal line.

Syntax examples

The following table provides syntax examples.

Table 1. Syntax examples
Item Syntax example
Required item.

Required items appear on the main path of the horizontal line. You must specify these items.

Read syntax diagramSkip visual syntax diagram>>-KEYWORD--required_item--------------------------------------><
 
Required choice.

A required choice (two or more items) appears in a vertical stack on the main path of the horizontal line. You must choose one of the items in the stack.

Read syntax diagramSkip visual syntax diagram>>-KEYWORD--+-required_choice1-+-------------------------------><
            '-required_choice2-'
 
Optional item.

Optional items appear below the main path of the horizontal line.

Read syntax diagramSkip visual syntax diagram>>-KEYWORD--+---------------+----------------------------------><
            '-optional_item-'
 
Optional choice.

An optional choice (two or more items) appears in a vertical stack below the main path of the horizontal line. You may choose one of the items in the stack.

Read syntax diagramSkip visual syntax diagram>>-KEYWORD--+------------------+-------------------------------><
            +-optional_choice1-+
            '-optional_choice2-'
 
Default.

Default items appear above the main path of the horizontal line. The remaining items (required or optional) appear on (required) or below (optional) the main path of the horizontal line. The following example displays a default with optional items.

Read syntax diagramSkip visual syntax diagram            .-default_choice1--.
>>-KEYWORD--+------------------+-------------------------------><
            +-optional_choice2-+
            '-optional_choice3-'
 
Variable.

Variables appear in lowercase italics. They represent names or values.

Read syntax diagramSkip visual syntax diagram>>-KEYWORD--variable-------------------------------------------><
 
Repeatable item.

An arrow returning to the left above the main path of the horizontal line indicates an item that can be repeated.

A character within the arrow means you must separate repeated items with that character.

An arrow returning to the left above a group of repeatable items indicates that one of the items can be selected,or a single item can be repeated.

Read syntax diagramSkip visual syntax diagram            .-----------------.
            V                 |
>>-KEYWORD----repeatable_item-+--------------------------------><
 
Read syntax diagramSkip visual syntax diagram            .-,---------------.
            V                 |
>>-KEYWORD----repeatable_item-+--------------------------------><
 
Fragment.

The fragment symbol indicates that a labelled group is described below the main syntax diagram. Syntax is occasionally broken into fragments if the inclusion of the fragment would overly complicate the main syntax diagram.

Read syntax diagramSkip visual syntax diagram>>-KEYWORD--| fragment |---------------------------------------><
 
fragment:
 
|--+-,required_choice1----------------------+-------------------|
   |                   .-,default_choice--. |
   '-,required_choice2-+------------------+-'
                       '-,optional_choice-'