Multi-line Value Lists

Multi-line value lists are supported and follow a specific structure. Each list must begin on the line immediately following the value separator, and each entry in the list is prefixed by an asterisk (*). The list ends when a line without an asterisk or indentation is encountered.

ml_value_list       ::= (indentation_pattern ASTERISK spacing sl_value_or_list end_of_line)+
name :
    * value
    * value
    * value
  • In the EBNF syntax above, the symbol end_of_line is defined in Comments.

  • The symbol spacing is described in Spacing.

  • The symbol indentation_pattern is explained in Spacing.

  • The symbol sl_value_or_list is described in Single-Line Value Lists.

Multi-line Value List Rules

  1. Asterisk Prefix: Each entry in a multi-line list must be prefixed with an asterisk (*).

    [main]
    value:
        * "one"
        * "two"
        * "three"
    
  2. Must Start on the Next Line: A multi-line list must start on the line immediately following the value separator; it cannot begin on the same line as the separator.

    [main]
    value: * "one"     # ERROR! The list must start on the next line.
        * "two"
        * "three"
    
  3. Indentation Required: Each entry in the list must be indented by at least one space or tab character before the asterisk.

    [main]
    value:
    * "one"     # ERROR! The list entry must be indented.
    * "two"
    * "three"
    
  4. Consistent Indentation Pattern: The indentation pattern, including the exact combination of spaces and tabs, must be consistent across all list entries. For more details, refer to Strict Indentation Patterns Explained.

    [main]
    value:
    ⎵⎵⎵⎵* "one"
    →    * "two"      # ERROR! Inconsistent indentation pattern.
    ⎵⎵⎵⎵* "three"
    
  5. No Multi-line Values Allowed: Multi-line values are not allowed in multi-line value lists. Each value must be on a single line.

    [main]
    value:
        * """    # ERROR! Multi-line values are not allowed.
        Text
        """
    
  6. A Value is Required: Each entry must have a value after the asterisk. Empty list entries are not allowed.

    [main]
    value:
        * 105
        *         # ERROR! A value is required.
        * 254
    
  7. No Empty Lines: There must be no empty lines between the name and the first entry, or between two entries. Lines containing only spaces, tabs, and/or comments are treated as empty lines.

    [main]
    value:
                   # ERROR! Empty lines are not allowed.
        * 105
                   # ERROR! Empty lines are not allowed.
        * 254
    

Example

[main]
first list:               # Multi-line lists must start on the next line after the separator.
    * "one"               # Each list entry starts with an indented asterisk.
    * "two"               # The indentation pattern must be consistent for all entries.
    * "three"             # No empty lines are allowed between entries.
second list:
    *   1,   2,   3       # Single-line values can also be part of a multi-line list.
    *   4,   5,   6
    *   7,   8,   9

Features

Feature

Coverage

value-list

The syntax outlined in this chapter is part of the standard feature value lists.

Errors

Error Code

Causes

Syntax

No value follows the asterisk in a multi-line list.
A multi-line value list contains a multi-line value, such as multi-line text.
The multi-line value list is interrupted by an empty line.
The multi-line value list starts on the same line as the value separator.

Indentation

No space or tab character is present before the asterisk.
The indentation pattern does not match the first entry in the multi-line value list.