[Tutor] what's a state machine?

Terry Carroll carroll@tjc.com
Tue Aug 5 23:17:16 EDT 2003


On Tue, 5 Aug 2003, Kirk Bailey wrote:

> I think you are right, a state machine of some sort is the way to handle 
> this task. This will demand writeng a number of functions, and saving 
> state in some variables, or objects.
> 
> I think I shall lay in a generous supply of the Bushnell's Irish whiskey...

You know,it occurs to me you're working in HTML.  It might be worthwhile 
to consider using XHTML, which is HTML expressed in XML, and then using an 
XML parser.  The SAX parser is an XML state machine, essentially.  The 
first couple chapters of the O'Reilley XML & Python book show how to use 
it, pretty clearly.

-- 
Terry Carroll        |   "I say to you that the VCR is to the American
Santa Clara, CA      |   film producer and the American public as the 
carroll@tjc.com      |   Boston strangler is to the woman home alone."  
                     |       Jack Valenti, MPAA President
Modell delendus est  |       Testimony before Congress, 1982





More information about the Tutor mailing list