Re: Trie algorithms?

grosch@cocolab.sub.com (Josef Grosch)
4 May 1996 23:22:05 -0400

          From comp.compilers

Related articles
Trie algorithms? mcdaniel@portcullis.cpm.com (Tim McDaniel) (1996-04-29)
Re: Trie algorithms? grosch@cocolab.sub.com (1996-05-04)
Re: Trie algorithms? tmcd@crl.com (1996-05-06)
| List of all articles for this month |
From: grosch@cocolab.sub.com (Josef Grosch)
Newsgroups: comp.compilers
Date: 4 May 1996 23:22:05 -0400
Organization: CoCoLab, Karlsruhe, Germany
References: 96-04-152
Keywords: lex

Tim McDaniel (mcdaniel@portcullis.cpm.com) 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
in


      J. Grosch, `Efficient Generation of Lexical Analysers',
      Software-Practice & Experience, 19, 1089-1103 (Nov. 1989).


Best regards


Josef Grosch


grosch@cocolab.sub.com
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.