About Spectre List Input

Spectre version 7.1(15) added a new list-input option for the build. It is similar to text-input, but it must include a data block with a single string value, which is read according to the following rules:

A "line" is terminated by the end of the string literal or by a newline character which, if present, is considered part of the line. The default delimiter is a space.

  • The first character of the string literal is not allowed to be a space.

  • If the first line of the string-literal is non-empty (that is, it has a character beside just a newline), the entirety of the first line is considered as if part of the file.

  • If the first line of the string-literal is empty (that is, its only character is the newline character), the first line is NOT considered part of the file.

  • If it exists, the second line of the string-literal (that is, the line beginning immediately after the string-literal's first newline) is called the "first indented line."

  • Leading spaces on the first indented line are NOT considered to be part of the file. The number of leading spaces is called the "indent amount." The rest of the line, including the newline (if present), is considered part of the file.

  • Subsequent lines (the "last line" excepted) of the string literal are required to begin with indent amount spaces. The rest of line, including any spaces immediately following the required spaces and the newline, are considered to be part of the file.

  • If the last line has fewer than the number of leading spaces required by the indent amount, then it must consist ONLY of spaces, and none of that line is considered to be part of the file.

  • If the last line has the appropriate number of leading spaces (as suggested by the indent amount), then the rest of the last line is considered to be part of the file.

As an example, the X's represent the contents of the file that is being described inline.

Both of the following are OK.:

Sample List Input Format

The string may be terminated immediately following the data on the same line, or on the next line. The indentation may be less than or equal to the indentation of the file. All of these are OK:

Sample List Input Format

This is *not* OK, because the end of the string is not supposed to be indented more than the file:

Unacceptable List Input Format

See also Spectre Build List Input.