Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
search_lexer Class Reference

This class does the heavy lifting of lexing the search string into tokens. More...

Inheritance diagram for search_lexer:
Lexer

Public Member Functions

 __construct (&$parser)
 
 addEntryPattern ($pattern, $mode, $new_mode)
 Adds a pattern that will enter a new parsing mode. More...
 
 addExitPattern ($pattern, $mode)
 Adds a pattern that will exit the current mode and re-enter the previous one. More...
 
 addPattern ($pattern, $mode="accept")
 Adds a token search pattern for a particular parsing mode. More...
 
 addSpecialPattern ($pattern, $mode, $special)
 Adds a pattern that has a special mode. More...
 
 Lexer (&$parser, $start="accept", $case=false)
 Old syntax of class constructor. More...
 
 mapHandler ($mode, $handler)
 Adds a mapping from a mode to another handler. More...
 
 parse ($raw)
 Splits the page text into tokens. More...
 
 search_lexer (&$parser)
 Old syntax of class constructor. More...
 

Public Attributes

 $_case
 
 $_mode
 
 $_mode_handlers
 
 $_parser
 
 $_regexes
 

Detailed Description

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.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ search_lexer()

search_lexer::search_lexer ( $parser)

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated:
since Moodle 3.1

The documentation for this class was generated from the following file: