help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [:alpha:] classe does not support isalpha characters


From: STEINBERG, PETER
Subject: RE: [:alpha:] classe does not support isalpha characters
Date: Wed, 29 Oct 2003 08:02:45 -0600

File parse.y appears to contain the code related to [:isalpha:].

scan.l returns CCE_ALPHA.
parse.y has the action CCL_EXPR(isalpha), which adds characters to the matching list based on the conditions:
      isascii (c) && isalpha (c)

Peter


-----Original Message-----
From: Jorge Gustavo Rocha [mailto:address@hidden]
Sent: Tuesday, October 28, 2003 6:07 PM
To: W. L. Estes
Cc: address@hidden
Subject: Re: [:alpha:] classe does not support isalpha characters


Hi Will and Valter,

Will is right; according to the manual [:alpha:] should match every
isalpha() character.
I've tested a lot (but always on Linux) and I am quite sure that the
locale are set correctly. I can use isalpha() C function with the
expected behavior, inside my flex program.
I'm using flex version 2.5.4 (8 bit is default), and gcc 3.2.2. (More
precisely, I'm using flex version 2.5.4a, release 29).

The flex generated automata does not include all the isalpha characters
in the class [:isalpha:]. Even with the locale working, [:isalpha:] is
like a normal [a-zA-Z].

Of course, I've solved my problem using definitions for all accented
characters. But that is not portable; that is a very primitive way of
doing things (specially when we are pressed to move to Unicode).

I'm interested in finding the problem [and the solution]. I can read
code written by others. Where should I start to correct this?

Thank you both (and Ruediger Haertel) for the feedback,

Jorge

W. L. Estes wrote:
> On Tuesday, 28 October 2003,09:04 -0200, Valter G. Nogueira Jr. wrote:
>
>
>>I am not a flex expert but I consider that it doesn't use isalpha to match
>>[:alfa:].
>
>
> The flex manual states that a match in a character class using
> [:alpha:] should be equivalent to a match against isalpha(). If this
> report turns out to be true, then it would be a bug.
>

--
jorge gustavo rocha
departamento de informática
universidade do minho
4710-057 braga
portugal
N 41º33'44,5" W 8º23'40,5"
tel +351 253604470 fax +351 253604471 cel +351 919690914





_______________________________________________
Help-flex mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-flex


reply via email to

[Prev in Thread] Current Thread [Next in Thread]