Link Search Menu Expand Document (external link)

How to read the syntax diagrams

TABLE OF CONTENTS

  1. Syntax structures
  2. Required items
  3. Optional items
  4. Must choose one item
  5. Choice is optional
  6. Default items
  7. Repeated items
  8. Fragments in syntax diagrams
  9. Keywords
  10. Variables
  11. Punctuation etc.

Syntax structures

The following structures are used in describing the syntax of GenevaERS program control statements and the GenevaERS logic text language.

  • Read the syntax diagrams from left to right, from top to bottom, following the path of the line.
    • The ►►── symbol indicates the beginning of a command.
    • The ───► symbol indicates that the command syntax is continued on the next line.
    • The ◄─── symbol indicates that a command is continued from the preceding line.
    • The ──►◄ symbol indicates the end of a command.

Required items

  • Required items appear on the horizontal line (main path).
    ►►──required_item──────────────────────────────────────────────►◄

Optional items

  • Optional items appear below the main path.
    ►►──required_item──┬───────────────┬───────────────────────────►◄
                       └─optional_item─┘
  • If an optional item appears above the main path, that item has no effect on the execution of the statement and is used only for readability.
                       ┌─optional_item─┐
    ►►──required_item──┴───────────────┴───────────────────────────►◄
  • If you can choose from two or more items, they appear in a vertical stack.

Must choose one item

  • If you must choose one of the items, one item of the stack appears on the main path.
    ►►──required_item──┬─required_choice2─┬────────────────────────►◄
                       └─required_choice2─┘

Choice is optional

  • If choosing one of the items is optional, the entire stack appears below the main path.
    ►►──required_item──┬──────────────────┬────────────────────────►◄
                       ├─optional_choice1─┤
                       └─optional_choice2─┘

Default items

  • If one of the optional items is the default, it appears above the main path and the remaining choices are shown below.
                       ┌─default_choice1──┐
    ►►──required_item──┼──────────────────┼────────────────────────►◄
                       ├─optional_choice2─┤
                       └─optional_choice3─┘

Repeated items

  • An arrow returning to the left, above the main line, indicates an item that can be repeated.
                       ┌─────────────────┐
                       ▼                 │
    ►►──required_item────repeatable_item─┴─────────────────────────►◄
  • If the repeat arrow contains a comma, you must separate repeated items with a comma.
                       ┌─,───────────────┐
                       ▼                 │
    ►►──required_item────repeatable_item─┴─────────────────────────►◄
  • A repeat arrow above a stack indicates that you can repeat the items in the stack.

Fragments in syntax diagrams

  • Sometimes, for readability, a diagram must be split into fragments. The syntax fragment is shown separately from the main syntax diagram, but the contents of the fragment should be read as if they are on the main path of the diagram.
    ►►──required_item──┤ fragment-name ├───────────────────────────►◄

    fragment-name:

    ├───required_item──┬───────────────┬────────────────────────────┤
                       └─optional_item─┘

Keywords

  • Keywords appear in uppercase (for example, FILE). Keywords must be spelled exactly as shown.

Variables

  • Variables appear in all lowercase letters (for example, field-name). They represent user-supplied names or values.

Punctuation etc.

  • If punctuation marks, parentheses, arithmetic operators, or other such symbols are shown, you must enter them as part of the syntax.