rfc9165v1.txt | rfc9165.txt | |||
---|---|---|---|---|
skipping to change at line 174 ¶ | skipping to change at line 174 ¶ | |||
1, and 2 as labels) and one for the Y dimension (using 3, 4, and 5 as | 1, and 2 as labels) and one for the Y dimension (using 3, 4, and 5 as | |||
labels). | labels). | |||
2.2. String Concatenation | 2.2. String Concatenation | |||
It is often useful to be able to compose string literals out of | It is often useful to be able to compose string literals out of | |||
component literals defined in different places in the specification. | component literals defined in different places in the specification. | |||
The .cat control identifies a string that is built from a | The .cat control identifies a string that is built from a | |||
concatenation of the target and the controller. The target and | concatenation of the target and the controller. The target and | |||
controller MUST be strings. The result of the operation has the type | controller MUST be strings. The result of the operation has the same | |||
of the target. The concatenation is performed on the bytes in both | type as the target. The concatenation is performed on the bytes in | |||
strings. If the target is a text string, the result of that | both strings. If the target is a text string, the result of that | |||
concatenation MUST be valid UTF-8. | concatenation MUST be valid UTF-8. | |||
a = "foo" .cat ' | a = "foo" .cat ' | |||
bar | bar | |||
baz | baz | |||
' | ' | |||
; on a system where the newline is \n, is the same string as: | ; on a system where the newline is \n, is the same string as: | |||
b = "foo\n bar\n baz\n" | b = "foo\n bar\n baz\n" | |||
Figure 2: An Example of Concatenation of Text and Byte Strings | Figure 2: An Example of Concatenation of Text and Byte Strings | |||
skipping to change at line 272 ¶ | skipping to change at line 272 ¶ | |||
There are several small issues, with the solutions given here: | There are several small issues, with the solutions given here: | |||
* ABNF can be used to define byte sequences as well as UTF-8 text | * ABNF can be used to define byte sequences as well as UTF-8 text | |||
strings interpreted as Unicode scalar sequences. This means this | strings interpreted as Unicode scalar sequences. This means this | |||
specification defines two control operators: .abnfb for ABNF | specification defines two control operators: .abnfb for ABNF | |||
denoting byte sequences and .abnf for denoting sequences of | denoting byte sequences and .abnf for denoting sequences of | |||
Unicode scalar values (code point) represented as UTF-8 text | Unicode scalar values (code point) represented as UTF-8 text | |||
strings. Both control operators can be applied to targets of | strings. Both control operators can be applied to targets of | |||
either string type; the ABNF is applied to the sequence of bytes | either string type; the ABNF is applied to the sequence of bytes | |||
in the string interpreting that as a sequence of bytes (.abnfb) or | in the string and interprets it as a sequence of bytes (.abnfb) or | |||
as a sequence of code points represented as an UTF-8 text string | as a sequence of code points represented as an UTF-8 text string | |||
(.abnf). The controller string MUST be a text string. | (.abnf). The controller string MUST be a text string. | |||
* ABNF defines a list of rules, not a single expression (called | * ABNF defines a list of rules, not a single expression (called | |||
"elements" in [RFC5234]). This is resolved by requiring the | "elements" in [RFC5234]). This is resolved by requiring the | |||
controller string to be one valid "element", followed by zero or | controller string to be one valid "element", followed by zero or | |||
more valid "rules" separated from the element by a newline; thus, | more valid "rules" separated from the element by a newline; thus, | |||
the controller string can be built by preceding a piece of valid | the controller string can be built by preceding a piece of valid | |||
ABNF by an "element" that selects from that ABNF and a newline. | ABNF by an "element" that selects from that ABNF and a newline. | |||
skipping to change at line 353 ¶ | skipping to change at line 353 ¶ | |||
4. Features | 4. Features | |||
Commonly, the kind of validation enabled by languages such as CDDL | Commonly, the kind of validation enabled by languages such as CDDL | |||
provides a Boolean result: valid or invalid. | provides a Boolean result: valid or invalid. | |||
In rapidly evolving environments, this is too simplistic. The data | In rapidly evolving environments, this is too simplistic. The data | |||
models described by a CDDL specification may continually be enhanced | models described by a CDDL specification may continually be enhanced | |||
by additional features, and it would be useful even for a | by additional features, and it would be useful even for a | |||
specification that does not yet describe a specific future feature to | specification that does not yet describe a specific future feature to | |||
identify the extension point the feature can use, accepting such | identify the extension point the feature can use and accept such | |||
extensions while marking them as such. | extensions while marking them as such. | |||
The .feature control annotates the target as making use of the | The .feature control annotates the target as making use of the | |||
feature named by the controller. The latter will usually be a | feature named by the controller. The latter will usually be a | |||
string. A tool that validates an instance against that specification | string. A tool that validates an instance against that specification | |||
may mark the instance as using a feature that is annotated by the | may mark the instance as using a feature that is annotated by the | |||
specification. | specification. | |||
More specifically, the tool's diagnostic output might contain the | More specifically, the tool's diagnostic output might contain the | |||
controller (right-hand side) as a feature name and the target (left- | controller (right-hand side) as a feature name and the target (left- | |||
End of changes. 3 change blocks. | ||||
5 lines changed or deleted | 5 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |