Accepts text and breaks it into tokens.
Some optimisation to make the sure the content is only scanned by the PHP regex parser once. Lexer modes must not start with leading underscores.
Located in /libraries/pear/simpletest/parser.php (line 178)
Sets up the lexer in case insensitive matching by default.
Adds a pattern that will enter a new parsing mode. Useful for entering parenthesis, strings, tags, etc.
Adds a pattern that will exit the current mode and re-enter the previous one.
Adds a token search pattern for a particular parsing mode. The pattern does not change the current mode.
Adds a pattern that has a special mode. Acts as an entry and exit pattern in one go, effectively calling a special parser handler for this token only.
Adds a mapping from a mode to another handler.
Splits the page text into tokens. Will fail
if the handlers report an error or if no content is consumed. If successful then each unparsed and parsed token invokes a call to the held listener.
Strips the magic underscore marking single token modes.
Sends the matched token and any leading unmatched text to the parser changing the lexer to a new mode if one is listed.
Calls the parser method named after the current mode. Empty content will be ignored. The lexer has a parser handler for each mode in the lexer.
Tests to see if the new mode is actually to leave the current mode and pop an item from the matching mode stack.
Test to see if the mode is one where this mode is entered for this token only and automatically leaves immediately afterwoods.
Tries to match a chunk of text and if successful removes the recognised chunk and any leading unparsed data. Empty strings will not be matched.
Documentation generated on Fri, 3 Dec 2004 12:27:14 +0000 by phpDocumentor 1.3.0RC3