Skip to content

Commit 6a03d2e

Browse files
committed
A few proposed tweaks to syntax.md.
This assumes that PR unicode-org#731 is applied. In detail: * Since the reserved keywords start with a `.`, we need to talk about the keyword `.match`, not `match`. * Saying that "A _reserved annotation_ starts with a reserved character" and "A _reserved annotation_ MAY be empty" is a contradiction. Therefore, we need to distinguish a _reserved annotation_ from a _reserved body_. This distinction is also useful because the _reserved body_ occurs in two other places as well. * The statement that a _reserved body_ contains "arbitrary text" is not true, since we have now decided that (unless empty) it must start and end with a non-whitespace character. * A nonterminal `reserved-start` does not exist. What is meant is `reserved-annotation-start`. * The statement "Implementations MUST NOT remove or alter the contents of a _reserved annotation_." needs to be constrained, because now implementations are SUPPOSED to trim whitespace around the _reserved body_.
1 parent 6d7b4ba commit 6a03d2e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

spec/syntax.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ of the _pattern_ to use for formatting.
347347
This allows the form or content of a _message_ to vary based on values
348348
determined at runtime.
349349

350-
A _matcher_ consists of the keyword `match` followed by at least one _selector_
350+
A _matcher_ consists of the keyword `.match` followed by at least one _selector_
351351
and at least one _variant_.
352352

353353
When the _matcher_ is processed, the result will be a single _pattern_ that serves
@@ -637,17 +637,19 @@ A **_<dfn>reserved annotation</dfn>_** is an _annotation_ whose syntax is reserv
637637
for future standardization.
638638
639639
A _reserved annotation_ starts with a reserved character.
640-
A _reserved annotation_ MAY be empty or contain arbitrary text after its first character.
640+
The remaining part of a _reserved annotation_, called a _reserved body_,
641+
MAY be empty or contain arbitrary text that starts and ends with
642+
a non-whitespace character.
641643
642644
This allows maximum flexibility in future standardization,
643645
as future definitions MAY define additional semantics and constraints
644646
on the contents of these _annotations_.
645-
A _reserved annotation_ does not include trailing whitespace.
646647
647648
Implementations MUST NOT assign meaning or semantics to
648-
an _annotation_ starting with `reserved-start`:
649+
an _annotation_ starting with `reserved-annotation-start`:
649650
these are reserved for future standardization.
650-
Implementations MUST NOT remove or alter the contents of a _reserved annotation_.
651+
Implementations MUST trim whitespace around a _reserved body_,
652+
but MUST NOT remove or alter the contents of a _reserved body_.
651653
652654
While a reserved sequence is technically "well-formed",
653655
unrecognized _reserved-annotations_ or _private-use-annotations_ have no meaning.

0 commit comments

Comments
 (0)