|Trie algorithms? firstname.lastname@example.org (Tim McDaniel) (1996-04-29)|
|Re: Trie algorithms? email@example.com (1996-05-04)|
|Re: Trie algorithms? firstname.lastname@example.org (1996-05-06)|
|From:||email@example.com (Josef Grosch)|
|Date:||4 May 1996 23:22:05 -0400|
|Organization:||CoCoLab, Karlsruhe, Germany|
Tim McDaniel (firstname.lastname@example.org) wrote:
: I'm looking for algorithms for quick matching of one of a set of fixed
: strings. ...
: What I'd like to do, though, is do something on each acceptance state.
: It's token replacement, where an N-character keyword must be replaced
: by an N-character replacement. ...
: [I'd just use flex, following some of the hints in the documentation to make
: lexers work faster. -John]
I agree with John - nearly every scanner generator such as flex or rex
should do the job. Especially when the set of keywords is large then I
would recommend rex from the Cocktail Toolbox. The reason is described
J. Grosch, `Efficient Generation of Lexical Analysers',
Software-Practice & Experience, 19, 1089-1103 (Nov. 1989).
Return to the
Search the comp.compilers archives again.