17 $v|=$NUMBER if ($c =~ /[0-9]/);
18 $v|=$UPPER if ($c =~ /[A-Z]/);
19 $v|=$LOWER if ($c =~ /[a-z]/);
20 $v|=$UNDER if ($c =~ /_/);
21 $v|=$WS if ($c =~ / \t\r\n/);
22 $v|=$ESC if ($c =~ /\\/);
23 $v|=$QUOTE if ($c =~ /['`"]/);
24 $v|=$COMMENT if ($c =~ /\#/);
25 $v|=$EOF if ($c =~ /\0/);
31 #define CONF_NUMBER $NUMBER
32 #define CONF_UPPER $UPPER
33 #define CONF_LOWER $LOWER
37 #define CONF_QUOTE $QUOTE
38 #define CONF_COMMENT $COMMENT
39 #define CONF_ALPHA (CONF_UPPER|CONF_LOWER)
40 #define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER)
41 #define CONF_UNDER $UNDER
43 #define IS_COMMENT(a) (CONF_COMMENT&(CONF_type[(a)&0x7f]))
44 #define IS_EOF(a) ((a) == '\\0')
45 #define IS_ESC(a) ((a) == '\\\\')
46 #define IS_NUMER(a) (CONF_type[(a)&0x7f]&CONF_NUMBER)
47 #define IS_WS(a) (CONF_type[(a)&0x7f]&CONF_WS)
48 #define IS_ALPHA_NUMERIC(a) (CONF_type[(a)&0x7f]&CONF_ALPHA_NUMERIC)
49 #define IS_QUOTE(a) (CONF_type[(a)&0x7f]&CONF_QUOTE)
53 print "static unsigned short CONF_type[128]={";
55 for ($i=0; $i<128; $i++)
57 print "\n\t" if ($i % 8) == 0;
58 printf "0x%03X,",$V[$i];