Related articles |
---|
[8 earlier articles] |
Re: is lex useful? dhami@mdd.comm.mot.com (1996-06-26) |
Re: is lex useful? stefan.monnier@lia.di.epfl.ch (Stefan Monnier) (1996-06-26) |
Re: is lex useful? raph@kiwi.cs.berkeley.edu (1996-06-26) |
Re: is lex useful? rgreen@barach.bbn.com (1996-06-26) |
Re: is lex useful? leichter@smarts.com (Jerry Leichter) (1996-06-27) |
Re: is lex useful? scooter@mccabe.com (Scott Stanchfield) (1996-06-27) |
Re: is lex useful? Scott.Nicol@infoadvan.com (1996-06-27) |
Re: is lex useful? Scott.Nicol@infoadvan.com (1996-06-27) |
Re: is lex useful? 72510.2757@CompuServe.COM (Stephen Lindholm) (1996-06-27) |
Re: is lex useful? kanze@lts.sel.alcatel.de (1996-06-27) |
Re: is lex useful? bart@time.cirl.uoregon.edu (1996-06-30) |
Re: is lex useful? Robert.Corbett@Eng.Sun.COM (1996-06-30) |
Re: is lex useful? leichter@smarts.com (1996-06-30) |
[8 later articles] |
From: | Scott.Nicol@infoadvan.com (Scott Nicol) |
Newsgroups: | comp.compilers |
Date: | 27 Jun 1996 11:34:47 -0400 |
Organization: | Information Advantage |
References: | 96-06-073 96-06-105 96-06-112 |
Keywords: | lex, i18n |
stefan.monnier@lia.di.epfl.ch says...
>] - No support for wide (>8 bit) character sets. Even 8-bit support is
>] fairly recent. The obvious implementation for wide characters (expand
>] tables to 16 bits) isn't practical, because you would increase the tables
>] sizes (which are already huge) 256x.
>
>The other obvious option is to treat a 16bit char as two 8bit chars.
>It might be less readable, but it works great.
This won't work if you want to use POSIX-style character classes, i.e.
[[:alpha:]]+ return(IDENTIFIER);
It would be very messy getting Lex to do this if you wanted to have, say,
Japanese as your language.
Also, what is isalpha() in one locale is not necessarily isalpha() in
another. If you change your language (i.e. LANG, LC_COLLATE, or LC_ALL
environment variables on *nix), a Lex-generated scanner won't know the
difference, because the RE's are hard-coded in tables. At best you can
make Lex work for one locale.
--
Scott Nicol
Information Advantage, Inc.
Scott.Nicol@infoadvan.com
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.