237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
|
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
|
-
+
-
+
-
+
|
elsif U in 'a' .. 'z' and then V in 'A' .. 'Z' then
return 1776 + Rank (U) * 26 + Rank (V);
elsif U in 'A' .. 'Z' and then V in 'a' .. 'z' then
return 2452 + Rank (U) * 26 + Rank (V);
elsif U in 'A' .. 'Z' and then V in 'A' .. 'Z' then
return 3128 + Rank (U) * 26 + Rank (V);
else
return 4096;
return 4095;
end if;
end;
when 3 =>
declare
U : constant Character := S (S'First);
V : constant Character := S (S'First + 1);
W : constant Character := S (S'First + 2);
begin
if U in '0' .. '9'
and then V in '0' .. '9'
and then W in '0' .. '9'
then
return 100 + Rank (U) * 100 + Rank (V) * 10 + Rank (W);
else
return 4096;
return 4095;
end if;
end;
when others =>
return 4096;
return 4095;
end case;
end Dictionary_4096_Hash;
procedure Generic_Roundtrip_Test
(Test : in out NT.Test;
Dict : in Smaz.Dictionary;
|