Subject: RE: [Ltru] [psg.com #1097] ABNF cleanup in matching draft

From: "Addison Phillips" <[email-masked]>
Date: Fri, 12 Aug 2005 17:17:47 -0700

Extension matching is a separate issue and may have arcane rules. Draft-registry and draft-matching both say that. We can, of course, including singletons into the ABNF, if anyone feels strongly about it.

Modifying the matching ABNF requires adding wildcards in just the right way. Here is what I have so far:

<artwork>extended-language-range  = range ; a range
              / privateuse              ; private use tag
              / grandfathered           ; grandfathered registrations

range         = (language
                 ["-" script]
                 ["-" region]
                 *("-" variant)
                 *("-" extension)
                 ["-" privateuse])

language      = "*"                    ; wildcard or...
              / (2*3ALPHA [ extlang ]) ; shortest ISO 639 code
              / 4ALPHA                 ; reserved for future use
              / 5*8ALPHA               ; registered language subtag

extlang       = *2("-" 3ALPHA) ("-" ( 3ALPHA / "*"))
                                       ; reserved for future use
                                       ; wildcard can only appear
                                       ;   at the end

script        = "*"                    ; wildcard or...
              / 4ALPHA                 ; ISO 15924 code

region        = "*"                    ; wildcard or...
              / 2ALPHA                 ; ISO 3166 code
              / 3DIGIT                 ; UN M.49 code

variant       = "*"                    ; wildcard or...
              / 5*8alphanum            ; registered variants
              / (DIGIT 3alphanum)

privateuse    = ("x"/"X") 1*("-" (1*8alphanum))

grandfathered = 1*3ALPHA 1*2("-" (2*8alphanum))
                ; grandfathered registration
                ; Note: i is the only singleton
                ; that starts a grandfathered tag

alphanum      = (ALPHA / DIGIT)       ; letters and numbers</artwork>

Addison P. Phillips
Globalization Architect, Quest Software
Chair, W3C Internationalization Core Working Group

Internationalization is not a feature.
It is an architecture. 

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On
> Behalf Of Randy Presuhn
> Sent: 2005?8?12? 16:47
> To: LTRU Working Group
> Subject: [Ltru] [psg.com #1097] ABNF cleanup in matching draft
> 
> Hi -
> 
> I've added this as issue #1097 to the issue tracker at
> https://rt.psg.com/ (user and password "ietf")
> 
> Randy, ltru co-chair
> 
> ----- Original Message -----
> From: "Kent Karlsson" <[email-masked]>
> To: "Addison Phillips" <[email-masked]>
> Cc: "LTRU Working Group" <[email-masked]>
> Sent: Tuesday, August 02, 2005 8:23 AM
> Subject: Re: [Ltru] ABNF beautification...
> ...
> 
> I guess that means that the -matching ABNF should look like
> (I don't see how it is sensible to just delete the "extension" part):
> 
> Language-Tag  = langtag
>               / privateuse             ; private use tag
>               / grandfathered          ; grandfathered registrations
> 
> langtag       = (language
>                  ["-" script]
>                  ["-" region]
>                  *("-" variant)
>                  *("-" extension)
>                  ["-" privateuse])
> 
> language      = (2*3ALPHA extlang)     ; shortest ISO 639 code
>               / 4ALPHA                 ; reserved for future use
>               / 5*8ALPHA               ; registered language subtag
>               / "*"
> 
> extlang       = *3("-" 3ALPHA)         ; reserved for future use
>               / *2("-" 3ALPHA) "-*"
> 
> script        = 4ALPHA                 ; ISO 15924 code
>               / "*"
> 
> region        = 2ALPHA                 ; ISO 3166 code
>               / 3DIGIT                 ; UN M.49 code
>               / "*"
> 
> variant       = 5*8alphanum            ; registered variants
>               / (DIGIT 3alphanum)
>               / "*"
> 
> extension     = singleton 1*("-" (2*8alphanum))
>               / "*"
> 
> singleton     = %x41-57 / %x59-5A / %x61-77 / %x79-7A / DIGIT
>               ; "a"-"w" / "y"-"z" / "A"-"W" / "Y"-"Z" / "0"-"9"
>               ; Single letters: x/X is reserved for private use
> 
> privateuse    = ("x"/"X") 1*("-" (1*8alphanum))
> 
> grandfathered = 1*3ALPHA 1*2("-" (2*8alphanum))
>                 ; grandfathered registration
>                 ; Note: i is the only singleton
>                 ; that starts a grandfathered tag
> 
> alphanum      = (ALPHA / DIGIT)       ; letters and numbers
> 
>  Figure 3: Language Tag Pattern ABNF
> 
> 
> 
> 
> 
> _______________________________________________
> Ltru mailing list
> [email-masked]
> https://www1.ietf.org/mailman/listinfo/ltru

_______________________________________________
Ltru mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ltru

---

From: "Kent Karlsson" <[email-masked]>
Date: Tue, 16 Aug 2005 13:52:02 +0200 (CEST)

> Extension matching is a separate issue and may have arcane rules.
> Draft-registry and draft-matching both say that. We can, of course,
> including singletons into the ABNF, if anyone feels strongly about it.
>

:: Note that one comment below also refers to the -registry draft.

> extended-language-range  = range ; a range
:: Oddly this one got a strange name change for the lhs nonterminal.
:: If we are to change the names of nonterminals whose formal language
:: is changed, I'd suggest doing so more systematically (P for Pattern):
::Language-TagP = langtag-p
::              / privateuse             ; private use tag
::              / grandfathered          ; grandfathered registrations

>                  ["-" privateuse])
:: This one too got a strange name change for the lhs nonterminal.
:: If we are to change the names of nonterminals whose formal language
:: is changed, I'd suggest doing so more systematically. It also has
:: "*("-" extension)" though Addison has removed the productions for
:: the nonterminal "extension". Though still odd to me, if "extension"
:: is not to be covered in any way, it must also be removed here.
::langtag-p     = (language-p
::                 ["-" script-p]
::                 ["-" region-p]
::                 *("-" variant-p)
::                 ["-" privateuse])

>               / 5*8ALPHA               ; registered language subtag
:: This one did not get a name change for the lhs nonterminal.
:: But if we are to change the names of nonterminals whose formal language
:: is changed, I'd suggest doing so systematically, also for this one.
:: Further, I like to have the wildcard as the last alternative (like it
was).
:: AND, the [] around extlang are superfluous, as I think Frank already
:: pointed out FOR THE -REGISTRY DRAFT, with an "of course" from Addison.
::language-p    = (2*3ALPHA extlang-p)   ; shortest ISO 639 code
::              / 4ALPHA                 ; reserved for future use
::              / 5*8ALPHA               ; registered language subtag
::              / "*"                    ; wildcard

>                                        ; wildcard can only appear
:: This one did not get a name change for the lhs nonterminal.
:: But if we are to change the names of nonterminals whose formal language
:: is changed, I'd suggest doing so systematically, also for this one.
:: Further, I like to have the wildcard as a separate last alternative.
::extlang-p     = *3("-" 3ALPHA)         ; reserved for future use
::              / *2("-" 3ALPHA) "-*"    ; wildcard, can only appear
::                                       ;   at the end

>               / 4ALPHA                 ; ISO 15924 code
:: This one did not get a name change for the lhs nonterminal.
:: But if we are to change the names of nonterminals whose formal language
:: is changed, I'd suggest doing so systematically, also for this one.
:: Further, I like to have the wildcard as the last alternative (as it was).
::script-p      = 4ALPHA                 ; ISO 15924 code
::              / "*"                    ; wildcard

> region        = "*"                    ; wildcard or...
:: This one did not get a name change for the lhs nonterminal.
:: But if we are to change the names of nonterminals whose formal language
:: is changed, I'd suggest doing so systematically, also for this one.
:: Further, I like to have the wildcard as the last alternative (as it was).
::region-p      = 2ALPHA                 ; ISO 3166 code
::              / 3DIGIT                 ; UN M.49 code
::              / "*"                    ; wildcard

>               / 5*8alphanum            ; registered variants
:: This one did not get a name change for the lhs nonterminal.
:: But if we are to change the names of nonterminals whose formal language
:: is changed, I'd suggest doing so systematically, also for this one.
:: Further, I like to have the wildcard as the last alternative (as it was).
::variant-p     = 5*8alphanum            ; registered variants
::              / (DIGIT 3alphanum)
::              / "*"                    ; wildcard

> alphanum      = (ALPHA / DIGIT)       ; letters and numbers

		/kent k