Subject: [Ltru] ABNFs in draft-ietf-ltru-matching-05

From: "Kent Karlsson" <[email-masked]>
Date: Thu, 13 Oct 2005 17:11:51 +0200 (CEST)

> language-range = language-tag / "*"
> language-tag   = 1*8[alphanum] *["-" 1*8alphanum]

But we have Language-Tag (titlecase name) in -registry.

Why this confusing language-tag (lowercase name) in -matching,
with quite a different grammar? Why not reuse the Language-Tag
of -registry? And that without quoting the grammar, just referring
to -registry.

> alphanum       = ALPHA / DIGIT

In -registry that is
alphanum      = (ALPHA / DIGIT)       ; letters and numbers

Now that spaces are so important, I'm not sure how important
the parentheses are... But that is moot if we just refer to the
Language-Tag ABNF of -registry.

I would also prefer to have the alternative on a line by itself.

The figure should have a number and a figure caption:
"Basic language range/pattern". Yes, I would still prefer
calling these "patterns" rather than "ranges", perhaps with
an aliasing in the introduction.

++++++++++++++++++++thus++++++++++++++++++++++++++

Basic-Language-Tag-Pattern
              = Language-Tag
              / "*"

Figure 1: Basic Language Pattern ABNF
++++++++++++++++++++++++++++++++++++++++++++++++++
and add a sentence explaining that the ABNF for Language-Tag
can be found in Figure 1 of -registry.

-----------

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

I don't like the reuse of non-terminal names. They are
defined and used in -registry and they may easily be both
informally and formally referred to from the same place.
So please use non-terminal names that aren't used in -registry,
unless the ABNF for them is exactly the same (in which case
we can just refer to figure 1 of -registry for those).

++++++++++++++++++++thus++++++++++++++++++++++++++
Extended-Language-Tag-Pattern
              = langtag-pattern
              / privateuse              ; private use tag
              / grandfathered           ; grandfathered registrations
++++++++++++++++++++++++++++++++++++++++++++++++++

Note that the grammar for grandfathered is just as in
-registry, and we need only refer to figure 1 of -registry.

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

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

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

+++++++++++++++++++++and++++++++++++++++++++++++++
language-pattern
              = (2*3ALPHA [ extlang-pattern ])
              / 4ALPHA                 ; reserved for future use
              / 5*8ALPHA               ; registered language subtag
              / "*"                    ; ... or wildcard
++++++++++++++++++++++++++++++++++++++++++++++++++

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

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

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

+++++++++++++++++++++and++++++++++++++++++++++++++
script-pattern
              = 4ALPHA                 ; ISO 15924 code
              / "*"                    ; or wildcard
++++++++++++++++++++++++++++++++++++++++++++++++++

But it would suffice to say:
+++++++++++++++++++++alternative++++++++++++++++++++++
script-pattern
              = script
              / "*"                    ; ... or wildcard
++++++++++++++++++++++++++++++++++++++++++++++++++
relying on 'script' in figure 1 of -registry.

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

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

But it would suffice to say:
+++++++++++++++++++++alternative++++++++++++++++++++++
region-pattern
              = region
              / "*"                    ; ... or wildcard
++++++++++++++++++++++++++++++++++++++++++++++++++
relying on 'region' in figure 1 of -registry.

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

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

But it would suffice to say:
+++++++++++++++++++++alternative++++++++++++++++++++++
variant-pattern
              = variant
              / "*"                    ; ... or wildcard
++++++++++++++++++++++++++++++++++++++++++++++++++
relying on 'variant' in figure 1 of -registry.

> extension     = singleton *("-" (2*8alphanum)) [ "-*" ]
>                                        ; extension subtags
>                                        ; wildcard can only appear
>                                        ;   at the end

+++++++++++++++++++++and++++++++++++++++++++++++++
extension-pattern
              = singleton *("-" (2*8alphanum)) [ "-*" ]
                                       ; extension subtags
                                       ; wildcard can only appear
                                       ;   at the end
++++++++++++++++++++++++++++++++++++++++++++++++++

> 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

These four last ones are unchanged from -registry language tag ABNF,
and we can just refer to figure 1 of -registry.

The figure should have a number and a figure caption: Extended language
range/pattern.

----------------------

Similarly, several other figures should be numbered and get captions.

		/kent k

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

---

From: Frank Ellermann <[email-masked]>
Date: Thu, 13 Oct 2005 17:56:59 +0200

> the parentheses are... 

It's equivalent, the parentheses are unnecessary in this case.
4234 "strongly advises" to use parentheses  for something like
x = a b / c

It's not obvious that this is the same as x = ( a  b ) / c.

But for y = d / e or for z = f g parentheses are unnecessary.

> So please use non-terminal names that aren't used in
> -registry, unless the ABNF for them is exactly the same
> (in which case we can just refer to figure 1 of -registry
> for those).

I'd think that readers would appreciate it if used -registry
stuff is copied verbatim.  References are "cleaner" (impossible
to introduce subtle differences), but a reader interested in
47 KB -matching might be unwilling to read 134 KB -registry in
parallel only to understand the -matching ABNF...

> +++++++++++++++++++++alternative++++++++++++++++++++++

...okay, if we adopt that idea (dito for some other terms),
then a reader simply must get <variant> etc. from -registry.
Maybe "range" is a better name resulting in...

       script-range  = "*" / script
       region-range  = "*" / region
       variant-range = "*" / variant

...we discussed this already, but I forgot what the result was.

                              Bye, Frank