Subject: Re: [Ltru] ABNF beautification...

From: "Kent Karlsson" <[email-masked]>
Date: Tue, 2 Aug 2005 17:23:59 +0200 (CEST)

> I took Kent's suggestion for modifying and cleaning up the ABNF and made
> some changes to it. Mostly I removed extra rules from it, re-combining
> some things (per messages from Frank and I), and doing some gentle
> tugging.
>
> You will note that I renamed the production rule "lang" to "language". It
> puts the "extlang" production as an option on 2*3ALPHA subtags. The 4ALPHA
> production explicitly reserved here, which is an innovation in the ABNF
> but not in the text or overall meaning of the ABNF (previously we had
> 2*3ALPHA followed by extlang and 4*8ALPHA was registered lang and most
> recently the relationship of extlangs to the likely use of 4ALPHA ISO639-6
> was discussed).
>
> This ABNF is slightly cleaner than the current draft-09 ANBF (all the
> language subtag stuff is together, the extlang relationship is clear, the
> rule names are more expressive.
>
> Here is the current result:
>
> --
> 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
>
> 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
> --
>
> This checks out via http://rtg.ietf.org/~fenner/abnf.cgi
>
> Any comments? Can I get a hum to use this in preference to draft-09's
> version?

Seem ok (with the deletion of the []s as Frank said).

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

---

From: "Randy Presuhn" <[email-masked]>
Date: Fri, 12 Aug 2005 16:46:33 -0700

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...
...

Language-Tag  = langtag

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