1. An apparatus for pattern-matching characters in a stream of received characters, the apparatus comprising: a character processing unit comprising means for storing characters, and means for comparing a received input character with at least one stored character; and a controller for controlling the character processing unit, the controller including means for receiving an input stream of characters of a document to be pattern-matched and means for controlling the character processing unit to compare characters from the input stream with characters stored by the character processing unit, the controller comprising: means for assessing characters in the received character stream and then selectively controlling and using the character processing unit on the basis of that assessment; and means for parsing the document, wherein the character processing unit further comprises means for providing feedback to the controller as to whether the characters from the input stream match the characters stored by the character processing unit, the feedback enabling the controller to parse the document.
8. The apparatus of claim 1 , wherein the controller comprises a programmable state machine.