Review of draft-philips-langtags-03: ABNF errors

Harald Tveit Alvestrand harald at alvestrand.no
Wed Jun 23 22:08:28 CEST 2004


I have at last started to seriously review this document, with a view to 
offering my opinion to the IESG for their perusal - I'll recuse on the 
processing itself.

But - the ABNF is NOT ready for prime time.

The authors seem to believe that =/ is a continuation symbol (it is not), 
and that there is a space between the number-quantifier and the rule it 
quantifies (there isn't).

Also, "x" strings are case-insensitive, so they can't be used in ranges - 
hex codes have to be used.

And underscores aren't allowed in rule names.

Here's a grammar for the stuff that at least parses correctly:
------------------------------------------------------------
langtag   = lang *("-" extlang) ["-" script] ["-" region]
	 *("-" variant) *("-" extension) *("-" private-use)
      / private-use       ; private use tag
      / grandfathered     ; grandfathered registrations

lang            = 2*3ALPHA                ; shortest ISO 639 code
		/ registered-lang
extlang         = 3ALPHA                  ; reserved for future use
script          = 4ALPHA                  ; ISO 15924 code
region          = 2ALPHA                  ; ISO 3166 code
		/ 3DIGIT                 ; UN country number
variant         =  5*15alphanum           ; registered or private use 
variants
extension       = singleton 1*("-" (2*31alphanum)) ; extension subtag(s)
private-use     = "x" 1*("-" (1*31alphanum))       ; private use subtag(s)
singleton       = ALPHA      		; single letters - x has spec meaning
registered-lang = 4*15ALPHA               ; registered language subtag
grandfathered   = ALPHA *(alphanum / "-") ; grandfathered registration
alphanum        = (ALPHA / DIGIT)          ; letters and numbers





More information about the Ietf-languages mailing list