aboutsummaryrefslogtreecommitdiff
path: root/dir-spec.txt
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2023-01-20 18:13:47 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2023-01-20 18:18:33 +0000
commit8f7f6f9e97a78f16454a155aef9dc315f608f925 (patch)
treed0382bbcb4563da1972656e70e00eef3a2481995 /dir-spec.txt
parentf16803f6f93680f41f72bae29cf9dbef3962f94d (diff)
downloadtorspec-8f7f6f9e97a78f16454a155aef9dc315f608f925.tar.gz
torspec-8f7f6f9e97a78f16454a155aef9dc315f608f925.zip
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.
Diffstat (limited to 'dir-spec.txt')
-rw-r--r--dir-spec.txt5
1 files changed, 3 insertions, 2 deletions
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