From 8f7f6f9e97a78f16454a155aef9dc315f608f925 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 20 Jan 2023 18:13:47 +0000 Subject: Clarify and tidy up KeywordLine Argument * Introduce the notion of Argument, which is relied on in the rest of the document, but not defined here formally. Spec changes implied by this diff: * Forbid the arguments from containing form feeds, carriage returns, and vertical tabs. * Forbid trailing whitespace after the last argument. I'm not sure whether this is correct, but it seems anomalous to permit it for only for keyword lines with arguments, and not anywhere else. --- dir-spec.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dir-spec.txt') diff --git a/dir-spec.txt b/dir-spec.txt index d6dae43..0ab0c98 100644 --- a/dir-spec.txt +++ b/dir-spec.txt @@ -280,11 +280,12 @@ Table of Contents NL = The ascii LF character (hex value 0x0a). Document ::= (Item | NL)+ Item ::= KeywordLine Object* - KeywordLine ::= Keyword NL | Keyword WS ArgumentChar+ NL + KeywordLine ::= Keyword (WS Argument)* NL Keyword = KeywordStart KeywordChar* KeywordStart ::= 'A' ... 'Z' | 'a' ... 'z' | '0' ... '9' KeywordChar ::= KeywordStart | '-' - ArgumentChar ::= any printing ASCII character except NL. + Argument := ArgumentChar+ + ArgumentChar ::= any graphical printing ASCII character. WS = (SP | TAB)+ Object ::= BeginLine Base64-encoded-data EndLine BeginLine ::= "-----BEGIN " Keyword (" " Keyword)* "-----" NL -- cgit v1.2.3-54-g00ecf