📄 trie-gen.1
字号:
.TH TRIE-GEN 1 "12 December 1989" "Version 1.0".de BP.sp.ti -.2i\(**...SH NAMEtrie-gen \- generate a minimal-prefix trie.SH SYNOPSIS.B trie-gen[.B \-c] < keyfile.SH DESCRIPTION.I TRIE-GEN is a program that reads a user-specified set of keywords from standardinput and generates a minimal-prefix trie. Minimal-prefix tries haveseveral useful properties that make them efficient implementations forstatic search sets. The table-driven trie generated by TRIE-GENrecognizes keywords in the search set in time proportional to thelength of the shortest unambiguous prefix for a given keyword.Consider a command interpreter for an interactive debugger oroperating system shell (e.g., gdb or VMS). It is frequently nice toallow users to type the `minimal unambiguous prefix' for any commandin the set of built-in keywords. For example, given the followingcomplete list of system commands:.nf----------------------------------------bashbisondiffdiff3egrepflexg++gawkgccgdbgenclassgnuchessgnuplotgperfgrepindentmakesed----------------------------------------.fiand assuming these are the only available commands, a user couldinvoke the egrep program simply by entering a single `e', but wouldneed to enter `ba' to run bash or `gnuc' to run gnuchess..I TRIE-GEN generates several static lookup tables and two functions that allowclient programs to either interpret standard input one character at atime or, given a prefix string, to determine which keyword in thestatic search set this prefix string matches.The trie generation algorithm runs in time proportional to O(n * k),where .I n is the number of user-specified keywords from the standard input and.I k is the length of the longest common prefix between any words in thekeyword set.The table compaction algorithm, invoked by giving the `-c' option,runs in time proportional to O(r * e * 128), where .I r is the total number of rows in the generated trie, .I e is the maximum number of non-null entries in each row, and 128 is thesize of the ASCII character set used to index into the trie..SH OPTIONS.TP.B \-cCompact the generated trie using a technique called `double-offsetindexing,' which is used in Bison and FLEX (also described in Tarjanand Yao's article ``Storing a Sparse Table'' in CACM, 1979)..B \-fGenerates a `full' trie rather than a minimal-prefix trie..SH "SEE ALSO"gperf (the GNU perfect hash function generator).SH BUGSNone known at this time, though there is much work to be done with theuser interface and program options... Bugs should be reported to.BR schmidt@ics.uci.edu .Bugs tend actually to be fixed if they can be isolated, so it is in yourinterest to report them in such a way that they can be easily reproduced..SH COPYINGCopyright (c) 1989 Free Software Foundation, Inc..PPermission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies..PPermission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that theentire resulting derived work is distributed under the terms of apermission notice identical to this one..PPermission is granted to copy and distribute translations of thismanual into another language, under the above conditions for modifiedversions, except that this permission notice may be included intranslations approved by the Free Software Foundation instead of inthe original English..SH AUTHORSDouglas C. Schmidt (schmidt@ics.uci.edu)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -