|Help making an automat... firstname.lastname@example.org (Jonathan Neve) (2000-03-25)|
|Re: Help making an automat... email@example.com (Andras Erdei) (2000-03-28)|
|From:||Jonathan Neve <firstname.lastname@example.org>|
|Date:||25 Mar 2000 02:37:23 -0500|
I'm currently reading "Algorithms in C" by Robert , and I've been
reading about string matching, and so on rather recently. Come to a
practical problem similar to the ones talked about in the book, I
naturaly tried to imitate the methods presented there. However, my
problem is somewhat more complicated because, whereas the examples in
the book only searched for one string at a time, I'd like to be able to
check a whole list of keywords for possible match before proceding
futher in the file. I'd like to create an automat of the type:
NO MATCH!!<-NO D? <-NO
for the keywords AND and ADD.
That is, I'd like the automat to check the first letter, and then fork
out to check all the possible keywords starting with that letter, and so
I guess it's probably not very difficult, but as I don't have much
experience doing such things yet, only theory, I don't quite see how to
go about it.
I'll be very grateful for all help! Thanks!!
[The usual approach is to treat the set of strings as a regular expression
and translate it to an NFA or DFA. -John]
Return to the
Search the comp.compilers archives again.