@Alextp
Search-str will be the 'words' from source code, and StrList (HashList) will have list of 'std IDs of syntax'. Collisions are possible - hashes may be equal but strings are not.
Now I have no idea what are you talking about.
There is a surjective relation between the stringlist and hashlist. Each string has a unique hash equivalent, more over the hashlist also contains the original strings too:
Hash := HL.NameOfIndex(I);
PStr := HL.Items[I];
OrigStr := PStr^
Hash and OrigStr are in pair, that's the whole point. Searching in Hash list is much faster because it was build for speed.
I have nothing more to say, good luck with the optimization.