Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!uakari.primate.wisc.edu!sdd.hp.com!usc!orion.oac.uci.edu!ucivax!schmidt From: schmidt@oberkampf.ics.uci.edu (Doug Schmidt) Newsgroups: comp.lang.c Subject: Re: errors in Alg in "C" by Sedgewick Message-ID: <279C7E3D.10384@ics.uci.edu> Date: 22 Jan 91 18:02:37 GMT References: <1991Jan22.001229.20@cudnvr.denver.colorado.edu> Reply-To: schmidt@ics.uci.edu (Doug Schmidt) Distribution: comp Organization: University of California at Irvine: ICS Dept. Lines: 14 Nntp-Posting-Host: oberkampf.ics.uci.edu There are more than just syntax errors in the code from Sedgewick's book. In fact, the section on regular expression pattern matching contains both code *and* design that simply does not work (in particular, the method he uses to build the state machine for the alternation ('|') operation does not operate correctly). When I taught a compiler theory class I had to reimplement and redesign this code in several places to avoid subtle bugs. I'm curious whether anyone knows how to contact Sedgewick, since I'd like to contribute my corrections (written in C) for future versions of the book. Doug -- ``Cry havoc, and let slip | Douglas C. Schmidt (schmidt@ics.uci.edu) the dogs of war.'' -- Marc Antony | (714) 856-4101