<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Lyall,<br>
Build a finite state machine that examines each input character only
once.<br>
To avoid missing embedded words ("Mississippi") the machine must be<br>
smart. I use an algorithm called X-Search developed at Stanford by<br>
a graduate student of Donald Knuth. It allows for parallel searches<br>
for many words simultaneously (e.g. "Hello", "Goodbye",
"yesterday").<br>
-Doug Danforth<br>
<br>
<div class="moz-cite-prefix">On 1/29/2017 8:10 AM, <a class="moz-txt-link-abbreviated" href="mailto:peter@easthope.ca">peter@easthope.ca</a>
wrote:<br>
</div>
<blockquote cite="mid:E1cXt9c-0000nt-AF@xo-53-1d-bb.localdomain"
type="cite">
<blockquote type="cite">
<pre wrap="">According to the EBNF for O7, the smallest legal module ...
</pre>
</blockquote>
<pre wrap="">
OK, thanks. Will keep in mind for later. For now I'm concerned only
with detecting the presence of a word in a text; not with conformity
to a syntax.
What is efficient code to find whether the word "Jaguar" is present
in a text for example? There are many ways of varying efficiency. A
compiler must have a solution but I'm unlikely to recognize it. Can
anyone give a code example or direct me to one?
Thanks, ... Lyall E.
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
Danforth of the Greenwood</div>
</body>
</html>