language tags

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
| language tags

Andreas Radinger

the N3 parser is not able to deal with language tags, as described by
BCP 47 [1].
Currently the parser only checks for well-formedness and not validity.
Therefore I suggest to apply the patch in the attachment which works in
the same way but that can handle special language tag constructs too [2].


General syntax for language tags:

Patch for (rev 1.201) from CVS tested with cwm 1.197 (from

---   2011-12-09 11:56:44.000000000 +0100
+++        2011-12-09 15:02:54.000000000 +0100
@@ -99,7 +99,7 @@
 number_syntax =
 digitstring = re.compile(r'[0-9]+')             # Unsigned integer
 interesting = re.compile(r'[\\\r\n\"]')
-langcode = re.compile(r'[a-zA-Z0-9]+(-[a-zA-Z0-9]+)?')
+langcode = re.compile(r'[a-zA-Z]+(-[a-zA-Z0-9]+){0,7}')

Best regards,
Andreas Radinger


Dipl.-Ing. Andreas Radinger
Professur für Allgemeine BWL, insbesondere E-Business
e-business & web science research group
Universität der Bundeswehr München
e-mail: [hidden email]
www: (482 bytes) Download Attachment