From feae990fe86d0318561c0d8e49c6c86e6612069e Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Sat, 29 Jul 2023 12:56:31 +0300 Subject: [PATCH 1/5] Clarify that Reserved may also represent private-use in data model --- spec/data-model.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/spec/data-model.md b/spec/data-model.md index 19f4ba71db..acfa6f5745 100644 --- a/spec/data-model.md +++ b/spec/data-model.md @@ -145,10 +145,10 @@ interface Option { } ``` -A `Reserved` represents an _expression_ with a _reserved_ _annotation_. -The `sigil` corresponds to the starting sigil of the _reserved_. +A `Reserved` represents an _expression_ with a _reserved_ or _private-use_ _annotation_. +The `sigil` corresponds to the starting sigil of the _annotation_. The `source` is the "raw" value (i.e. escape sequences are not processed) -and includes the starting `sigil`. +and does not include the starting `sigil`. Implementations MUST NOT rely on the set of `sigil` values remaining constant, as future versions of this specification MAY assign other meanings to such sigils. @@ -156,6 +156,11 @@ as future versions of this specification MAY assign other meanings to such sigil If the _expression_ includes a _literal_ or _variable_ before the _annotation_, it is included as the `operand`. +When parsing the syntax of a _message_ that includes a _private-use_ _annotation_ +supported by the implementation, +the implemenation MAY represent it in the data model using a different interface +as appropriate for the semantics and meaning that it attaches to that _annotation_. + ```ts interface Reserved { type: 'reserved' From 6a7317a69cb523969f38678960a0451196f9445e Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Mon, 31 Jul 2023 11:36:53 +0300 Subject: [PATCH 2/5] Update spec/data-model.md --- spec/data-model.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/data-model.md b/spec/data-model.md index acfa6f5745..ff0fca0909 100644 --- a/spec/data-model.md +++ b/spec/data-model.md @@ -150,8 +150,10 @@ The `sigil` corresponds to the starting sigil of the _annotation_. The `source` is the "raw" value (i.e. escape sequences are not processed) and does not include the starting `sigil`. -Implementations MUST NOT rely on the set of `sigil` values remaining constant, -as future versions of this specification MAY assign other meanings to such sigils. +> **Note** +> Implementers should be aware that future versions of this specification +> might assign meaning to _reserved_ `sigil` values +> and add new interfaces to this data model. If the _expression_ includes a _literal_ or _variable_ before the _annotation_, it is included as the `operand`. From d5dcc235b117928c1e4ea1a46218b9bf0f3fd948 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Tue, 8 Aug 2023 08:31:02 -0500 Subject: [PATCH 3/5] Rename Reserved as Unsupported in data model --- spec/data-model/README.md | 10 +++++----- spec/data-model/message.dtd | 6 +++--- spec/data-model/message.json | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/spec/data-model/README.md b/spec/data-model/README.md index 4196d0e7b8..ef921ee1d6 100644 --- a/spec/data-model/README.md +++ b/spec/data-model/README.md @@ -81,7 +81,7 @@ The `value` of `Text` is the "cooked" value (i.e. escape sequences are processed Implementations MUST NOT rely on the set of `Expression` `body` values being exhaustive, as future versions of this specification MAY define additional expressions. If encountering a `body` with an unrecognised value, -an implementation SHOULD treat it as it would a `Reserved` value. +an implementation SHOULD treat it as it would an `Unsupported` value. ```ts interface Pattern { @@ -95,7 +95,7 @@ interface Text { interface Expression { type: 'expression' - body: Literal | VariableRef | FunctionRef | Reserved + body: Literal | VariableRef | FunctionRef | Unsupported } ``` @@ -148,7 +148,7 @@ interface Option { } ``` -A `Reserved` represents an _expression_ with a _reserved_ or _private-use_ _annotation_. +An `Unsupported` represents an _expression_ with a _reserved_ or _private-use_ _annotation_. The `sigil` corresponds to the starting sigil of the _annotation_. The `source` is the "raw" value (i.e. escape sequences are not processed) and does not include the starting `sigil`. @@ -167,8 +167,8 @@ the implemenation MAY represent it in the data model using a different interface as appropriate for the semantics and meaning that it attaches to that _annotation_. ```ts -interface Reserved { - type: 'reserved' +interface Unsupported { + type: 'unsupported' sigil: '!' | '@' | '#' | '%' | '^' | '&' | '*' | '<' | '>' | '/' | '?' | '~' source: string operand?: Literal | VariableRef diff --git a/spec/data-model/message.dtd b/spec/data-model/message.dtd index ad3dcdbd93..5da214b44c 100644 --- a/spec/data-model/message.dtd +++ b/spec/data-model/message.dtd @@ -9,7 +9,7 @@ - + @@ -26,6 +26,6 @@ - - + + diff --git a/spec/data-model/message.json b/spec/data-model/message.json index 5d2f64920f..688c0d4a22 100644 --- a/spec/data-model/message.json +++ b/spec/data-model/message.json @@ -47,10 +47,10 @@ }, "required": ["type", "kind", "name"] }, - "reserved": { + "unsupported": { "type": "object", "properties": { - "type": { "const": "reserved" }, + "type": { "const": "unsupported" }, "sigil": { "enum": ["!", "@", "#", "%", "^", "&", "*", "<", ">", "?", "~"] }, @@ -77,7 +77,7 @@ { "$ref": "#/$defs/literal" }, { "$ref": "#/$defs/variable" }, { "$ref": "#/$defs/function" }, - { "$ref": "#/$defs/reserved" } + { "$ref": "#/$defs/unsupported" } ] } }, From 472271dd75c700bb9587963fd4cdd92fbfc0164b Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Tue, 8 Aug 2023 18:16:09 +0300 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Addison Phillips --- spec/data-model/README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/spec/data-model/README.md b/spec/data-model/README.md index ef921ee1d6..3e1dc99106 100644 --- a/spec/data-model/README.md +++ b/spec/data-model/README.md @@ -148,23 +148,27 @@ interface Option { } ``` -An `Unsupported` represents an _expression_ with a _reserved_ or _private-use_ _annotation_. +An `Unsupported` represents an _expression_ with a +_reserved_ _annotation_ or a _private-use_ _annotation_ not supported +by the implementation. The `sigil` corresponds to the starting sigil of the _annotation_. The `source` is the "raw" value (i.e. escape sequences are not processed) and does not include the starting `sigil`. > **Note** -> Implementers should be aware that future versions of this specification -> might assign meaning to _reserved_ `sigil` values -> and add new interfaces to this data model. +> Be aware that future versions of this specification +> might assign meaning to _reserved_ `sigil` values. +> This would result in new interfaces being added to +> this data model. If the _expression_ includes a _literal_ or _variable_ before the _annotation_, it is included as the `operand`. When parsing the syntax of a _message_ that includes a _private-use_ _annotation_ supported by the implementation, -the implemenation MAY represent it in the data model using a different interface -as appropriate for the semantics and meaning that it attaches to that _annotation_. +the implementation SHOULD represent it in the data model +using an interface appropriate for the semantics and meaning +that the implementation attaches to that _annotation_. ```ts interface Unsupported { From 04302bee79dc56a11534d69327713710eab4632d Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Tue, 8 Aug 2023 18:16:09 +0300 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Addison Phillips --- spec/data-model/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/data-model/README.md b/spec/data-model/README.md index 3e1dc99106..50d924c6f0 100644 --- a/spec/data-model/README.md +++ b/spec/data-model/README.md @@ -80,8 +80,7 @@ The `value` of `Text` is the "cooked" value (i.e. escape sequences are processed Implementations MUST NOT rely on the set of `Expression` `body` values being exhaustive, as future versions of this specification MAY define additional expressions. -If encountering a `body` with an unrecognised value, -an implementation SHOULD treat it as it would an `Unsupported` value. +A `body` with an unrecognized value SHOULD be treated as an `Unsupported` value. ```ts interface Pattern {