Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
This class does the heavy lifting of lexing the search string into tokens. More...
Public Member Functions | |
__construct (&$parser) | |
addEntryPattern ($pattern, $mode, $new_mode) | |
Adds a pattern that will enter a new parsing mode. | |
addExitPattern ($pattern, $mode) | |
Adds a pattern that will exit the current mode and re-enter the previous one. | |
addPattern ($pattern, $mode="accept") | |
Adds a token search pattern for a particular parsing mode. | |
addSpecialPattern ($pattern, $mode, $special) | |
Adds a pattern that has a special mode. | |
Lexer (&$parser, $start="accept", $case=false) | |
Old syntax of class constructor. | |
mapHandler ($mode, $handler) | |
Adds a mapping from a mode to another handler. | |
parse ($raw) | |
Splits the page text into tokens. | |
search_lexer (&$parser) | |
Old syntax of class constructor. | |
Public Attributes | |
$_case | |
$_mode | |
$_mode_handlers | |
$_parser | |
$_regexes | |
This class does the heavy lifting of lexing the search string into tokens.
Using a full-blown lexer is probably overkill for this application, but might be useful for other tasks.
search_lexer::search_lexer | ( | & | $parser | ) |