As seen above, diagnostic lines assign values (integers or strings) to a sequence of labeled subscripts, separated by ‘.’. Some subscripts have integer indices associated with them. The subscript indices are not necessarily contiguous or small, so an associative array should be used to store them. Currently, all integers fit into the 64-bit unsigned integer range. Every access path to a value has a fixed type (string or integer) independent of subscript index values. Likewise, whether a subscript is indexed does not depend on previous indices (but may depend on previous subscript labels).
A syntax description in ABNF (RFC 5234) follows. Note that
%x30-39
denotes the range of decimal digits. Diagnostic output
lines are expected to match the line
production.
HEXDIG = %x30-39 / %x61-6f ; lowercase a-f only ALPHA = %x41-5a / %x61-7a / %x7f ; letters and underscore ALPHA-NUMERIC = ALPHA / %x30-39 / "_" DQUOTE = %x22 ; " ; Numbers are always hexadecimal and use a 0x prefix. hex-value-prefix = %x30 %x78 hex-value = hex-value-prefix 1*HEXDIG ; Strings use octal escape sequences and \\, \". string-char = %x20-21 / %x23-5c / %x5d-7e ; printable but not "\ string-quoted-octal = %x30-33 2*2%x30-37 string-quoted = "\" ("\" / DQUOTE / string-quoted-octal) string-value = DQUOTE *(string-char / string-quoted) DQUOTE value = hex-value / string-value label = ALPHA *ALPHA-NUMERIC index = "[" hex-value "]" subscript = label [index] line = subscript *("." subscript) "=" value