[Flex-help] Character classes e.g., [:alpha:]
flex is a tool for generating scanners
Brought to you by:
wlestes
From: John P. H. <jph...@gm...> - 2014-07-12 09:50:10
|
The manual states: "These expressions all designate a set of characters equivalent to the corresponding standard C isXXX function." and "For example, the following character classes are all equivalent: [[:alnum:]] [[:alpha:][:digit:]] [[:alpha:][0-9]] [a-zA-Z0-9] " This is clearly true in the C locale, but does this also hold for other locales, e.g., French? If not, is it the locale at compile time or the one at run time that applies? I ask because isXXX does depend on the locale, so either way it looks like the manual needs correction, perhaps by adding "in the C locale" to the first sentence. Or am I totally off my rocker? |