Re: Universal Character Names

Brian.Inglis@cadvision.com (Brian Inglis)
13 Oct 1998 02:19:05 -0400

          From comp.compilers

Related articles
Universal Character Names eric.b.lemings@lmco.com (Eric Lemings) (1998-10-10)
Re: Universal Character Names qjackson@wave.home.com (Quinn Tyler Jackson) (1998-10-13)
Re: Universal Character Names Brian.Inglis@cadvision.com (1998-10-13)
Re: Universal Character Names eric.b.lemings@lmco.com (Eric Lemings) (1998-10-17)
Re: Universal Character Names ok@atlas.otago.ac.nz (Dr Richard A. O'Keefe) (1998-10-17)
Re: Universal Character Names fjh@cs.mu.OZ.AU (1998-10-22)
Re: Universal Character Names eggert@twinsun.com (1998-10-30)
| List of all articles for this month |

From: Brian.Inglis@cadvision.com (Brian Inglis)
Newsgroups: comp.compilers
Date: 13 Oct 1998 02:19:05 -0400
Organization: CADVision Development Corporation (http://www.cadvision.com/)
References: 98-10-068
Keywords: lex, i18n

Eric Lemings <eric.b.lemings@lmco.com> wrote:
>Dear readers,
>In the new C and C++ language standards, identifiers
>may contain universal character names (UCN). The
>rule for universal character names is:
>universal-character-name:
> \u hex-quad
> \U hex-quad hex-quad
>hex-quad:
> hex-digit hex-digit hex-digit hex-digit
>Needless to say this makes the old regexp for identifiers:
>[a-zA-Z_]+[a-zA-Z0-9_]*
>obsolete. How would you modify it to handle UCN?




Emphasis is on the *OLD*!
AFAIR, modern syntax designed to handle this is:
[[:alpha:]_]+[[:alpha:][:digit]_]*
AFAIR, the extra brackets are a required part of the syntax in the tools
I have used.
Take care.
Thanks, Brian Inglis (Calgary, Alberta, Canada) Brian.Inglis@CADvision.com





Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.