+#
+# Assign numbers to each of the character classes classes used.
+# Sets are numbered from 128 - 250
+# The values 0-127 in the state table are used for matching
+# individual ASCII characters (the only thing that can appear in the rules.)
+# The "set" names appearing in the code below (default, etc.) need special
+# handling because they do not correspond to a normal set of characters,
+# but trigger special handling by code in the state machine.
+#
+$i = 128;
+foreach $setName (sort keys %charClasses) {
+ if ($setName eq "default") {
+ $charClasses{$setName} = 255;}
+ elsif ($setName eq "escaped") {
+ $charClasses{$setName} = 254;}
+ elsif ($setName eq "escapedP") {
+ $charClasses{$setName} = 253;}
+ elsif ($setName eq "eof") {
+ $charClasses{$setName} = 252;}
+ else {
+ # Normal (single) character class. Number them.
+ $charClasses{$setName} = $i;
+ $i++;
+ }
+}
+
+
+my ($sec, $min, $hour, , $day, $mon, $year, $wday, $yday, $isdst) = localtime;
+$year += 1900;
+