; SPDX-License-Identifier: Apache-2.0 ; OSTF 0.3 working draft, Annex B: trace.lock grammar (OSTF-142). ; RFC 5234 ABNF with RFC 7405 case-sensitive literals. The file is a ; sequence of octets. Semantic constraints that the grammar does not ; express: a percent-decoded value is valid UTF-8; the names source, ; source.sig, source.body and target are fingerprint keys, never ; attribute names; a key occurs at most once per entry; a canonical ; writer sorts attribute pairs by name before the fingerprint pairs, ; orders fingerprint pairs source, source.sig, source.body, target, ; sorts lines by their bytes, ends every line with LF and writes no ; empty line. Readers accept CRLF, unsorted input and lowercase hex. lock-file = header *( newline [ entry ] ) header = %s"trace.lock 1" entry = source SP link-name SP target *( SP pair ) source = 1*( safe-octet / escape ) target = 1*( safe-octet / escape ) pair = key "=" value key = fp-key / attr-name fp-key = %s"source.sig" / %s"source.body" / %s"source" / %s"target" value = *( safe-octet / escape ) escape = "%" HEXDIG HEXDIG safe-octet = %x21-24 / %x26-3C / %x3E-7E / %x80-FF ; every octet except controls, SP, "%", "=" and DEL link-name = LOALPHA *47( LOALPHA / DIGIT / "_" ) attr-name = ALPHA *47( ALPHA / DIGIT ) newline = CRLF / LF LOALPHA = %x61-7A