Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / intl / chardet / tools / genhz.pl
blob9cd6985f2a39f4a665db9a81396eb2a300cdfc2a
1 #!/usr/local/bin/perl
2 use strict;
3 require "genverifier.pm";
4 use genverifier;
7 my(@hz_cls);
8 my(@hz_st);
9 my($hz_ver);
14 # > 0x80 - 1
15 # ~ - 2
16 # LF - 3
17 # { - 4
18 # } - 5
20 @hz_cls = (
21 [ 0x01 , 0x1a , 0 ],
22 [ 0x7e , 0x7e , 2 ],
23 [ 0x0a , 0x0a , 3 ],
24 [ 0x7b , 0x7b , 4 ],
25 [ 0x7d , 0x7d , 5 ],
26 [ 0x1c , 0x7f , 0 ],
27 [ 0x0e , 0x0f , 1 ],
28 [ 0x1b , 0x1b , 1 ],
29 [ 0x00 , 0x00 , 1 ],
30 [ 0x80 , 0xff , 1 ]
36 package genverifier;
37 @hz_st = (
38 # 0 1 2 3 4 5
39 0, 1, 3, 0, 0, 0, # Start State - 0
40 1, 1, 1, 1, 1, 1, # Error State - 1
41 2, 2, 2, 2, 2, 2, # ItsMe State - 2
42 1, 1, 0, 0, 4, 1, # state 3 - got ~
43 5, 1, 6, 1, 5, 5, # state 4 - got ~ {
44 4, 1, 4, 1, 4, 4, # state 5 - got ~ { X
45 4, 1, 4, 1, 4, 2, # state 6 - got ~ { [X X]* ~
48 $hz_ver = genverifier::GenVerifier("HZ", "HZ-GB-2312",
49 \@hz_cls, 6, \@hz_st);
50 print $hz_ver;