cbor-wg / cddl-more-control

Second extension pack of CDDL control operators after RFC 9165
Other
0 stars 1 forks source link

Clarification on example in 3.1 #1

Closed mguetschow closed 8 months ago

mguetschow commented 8 months ago

In the current version, it reads

legacy-ip-address = text .join [digits<1>, ".", digits<2>,
                           ".", digits<3>, ".", digits<4>]
digits<N> = text .decimal byte<n>

How is this to be understood? I don't understand why generics are used here. If this is supposed to represent IPv4 adresses, I would have expected the following:

legacy-ip-address = text .join [bytetext, ".", bytetext,
                           ".", bytetext, ".", bytetext]
bytetext = text .decimal byte
byte = 0..255

In particular, I couldn't find any definition of byte<N>.