Patch: ctype.h replacement
Neil Booth
neilb@earthling.net
Mon Nov 27 10:37:00 GMT 2000
Hi Zack,
I'm not sure about what you've done to cpplib.
For example,
> -#define ISspace 0x20 /* ' ' \t \r \n \f \v \0 */
> -#define is_space(x) (_cpp_IStable[x] & ISspace)
is not the same as
isspace ()
unless this includes NUL (?). Our handling of NULs relies on this, I
think; unfortunately test cases don't seem to be possible without
screwing up CVS.
Another thing is that I was going to introduce extra character classes
to speed up comment parsing, which is probably dog slow right now.
Like have a set of characters that are interesting in a comment ('/'
'*' '\' '?' '\t' '\n' '\r' off the top of my head). We could then
skip the others quickly, rather than have every char go through these
separate tests.
Neil.
More information about the Gcc-patches
mailing list