- A string, an integer, a floating point value, a complex number
value or one of the special values
- list body¶
- An ordered sequence of values, separated by commas and/or newlines.
- A list body enclosed within
- mapping body¶
- A mapping of strings to values, consisting of key-value pairs separated by commas and/or newlines. Each key value pair consists of a key, a key-value separator and a value.
- A mapping body enclosed within
- One of a list, a mapping or a mapping body - which are the only possible contents of a valid CFG configuration file.
- A string which describes how to navigate to a part of the configuration, starting from its root.
- A string delimited by backtick characters, like
`this`. It can’t contain internal backticks and can’t contain non-printable characters, and so can’t span multiple lines. Such a string is converted by the implementation to a native object appropriate to that implementation. For example, date-time values can be obtained from ISO formatted backtick-strings.
- A description of all or part of a list. It consists of three elements: start, stop and step, all of which are integers. Up to any two of these three elements can be omitted, with sensible defaults applied if so. See the documentation on slices for more information.
- Abstract Syntax Tree (AST)¶
- CFG source is processed by the CFG parser into an Abstract Syntax Tree (AST). A configuration is held in this form until parts of it are evaluated (through the configuration being queried, for example). Keeping things in an AST avoids unnecessary computation and facilitates better error reporting.