Hi there,
I appreciate that this may be a bit late in the day, but I have found a
couple of issues with the YANG language pattern match when doing a check
against draft-ietf-dots-telemetry-25.txt, currently in AUTH48. What I have
reported against that draft is:-
During testing of the horrendous pattern provided for pattern matching
against description-lang, I have found an alternate branch error which needs
correcting.
OLD:
leaf description-lang {
type string {
pattern '(([A-Za-z]{2,3}(-[A-Za-z]{3}(-[A-Za-z]{3})'
+ '{0,2})?|[A-Za-z]{4}|[A-Za-z]{5,8})(-[A-Za-z]{4})?'
NEW:
leaf description-lang {
type string {
pattern '((([A-Za-z]{2,3}(-[A-Za-z]{3}(-[A-Za-z]{3})'
+ '{0,2})?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-[A-Za-z]{4})?'
I.e, additional () around A-Za-z]{2,3}(-[A-Za-z]{3}(-[A-Za-z]{3})'
+ '{0,2})?
Reasoning - RFC5646 2.1
language = 2*3ALPHA ; shortest ISO 639 code
["-" extlang] ; sometimes followed by
; extended language subtags
/ 4ALPHA ; or reserved for future use
/ 5*8ALPHA ; or registered language subtag
The additional () contain the 2*3ALPHA ["-" extlang] as a branch alternative
to 4*ALPHA or 5*ALPHA.
There also is an unneeded character range, namely
OLD:
+ '|([0-9][A-Za-z0-9]{3})))*(-[0-9A-WY-Za-wy-z]'
NEW:
+ '|([0-9][A-Za-z0-9]{3})))*(-[0-9A-WYZa-wyz]'
As y is alphabetically adjacent to z ([0-9A-WYZa-wyz] is the singleton
definition).
Regards
Jon
_______________________________________________
I2nsf mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/i2nsf