Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions spec/message.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ reserved-statement = reserved-keyword [s reserved-body] 1*([s] expression)
reserved-keyword = "." name

; Reserve additional sigils for use by future versions of this specification.
reserved-annotation = reserved-annotation-start reserved-body
reserved-annotation = reserved-annotation-start [[s] reserved-body]
reserved-annotation-start = "!" / "%" / "*" / "+" / "<" / ">" / "?" / "~"

; Reserve sigils for private-use by implementations.
private-use-annotation = private-start reserved-body
private-use-annotation = private-start [[s] reserved-body]
private-start = "^" / "&"
reserved-body = *([s] 1*(reserved-char / reserved-escape / quoted))
reserved-body = reserved-body-part *([s] reserved-body-part)
reserved-body-part = reserved-char / reserved-escape / quoted

; Names and identifiers
; identifier matches https://www.w3.org/TR/REC-xml-names/#NT-QName
Expand Down
7 changes: 4 additions & 3 deletions spec/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ wish to use a syntax exactly like other functions. Specifically:
A _private-use annotation_ MAY be empty after its introducing sigil.

```abnf
private-use-annotation = private-start reserved-body
private-use-annotation = private-start [[s] reserved-body]
private-start = "^" / "&"
```

Expand Down Expand Up @@ -653,10 +653,11 @@ While a reserved sequence is technically "well-formed",
unrecognized _reserved-annotations_ or _private-use-annotations_ have no meaning.

```abnf
reserved-annotation = reserved-annotation-start reserved-body
reserved-annotation = reserved-annotation-start [[s] reserved-body]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth adding some prose here explaining why the grammar is structured this way. It wasn't obvious immediately that it had to be, so it won't be obvious to the reader either. Including the example would be good.

I also think a note should be added to the "Reserved Statements" section of the same doc that explains what the limitations are of reserved-statement that arise because of this change. You could use your example from #721.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use a separate PR to do any text changes.

reserved-annotation-start = "!" / "%" / "*" / "+" / "<" / ">" / "?" / "~"

reserved-body = *([s] 1*(reserved-char / reserved-escape / quoted))
reserved-body = reserved-body-part *([s] reserved-body-part)
reserved-body-part = reserved-char / reserved-escape / quoted
```

## Markup
Expand Down