// -k '*' forces gperf to choose a hash for each size category instead of giving up. // required if characters appear in the same position in several keywords // -D forces gperf to cough up a non-perfect hash when it can't produce a perfect hash // required if several keywords are anagrams // // gnu // | class name // | | constants // | | | language // | | | | custom struct // | | | | | all characters // | | | | | | deal with anagrams // | | | | | | | % gperf -g -Z ParamHash -E -L C++ -t -k '*' -D parametersA.gperf // replace-regexp str\[\([0-9]+\)\] => tolower(str[\1]) \*str == \*s => tolower(\*str) == \*s //replace-not-regexp !strcmp (str + 1, s + 1) => !strncasecmp (str + 1, s + 1, len-1)