Lines Matching defs:pattern
47 * Adds a token search pattern for a particular parsing mode.
49 * The pattern does not change the current mode.
51 * @param string $pattern Perl style regex, but ( and )
54 * pattern when dealing with
57 public function addPattern($pattern, $mode = "accept")
62 $this->regexes[$mode]->addPattern($pattern);
66 * Adds a pattern that will enter a new parsing mode.
70 * @param string $pattern Perl style regex, but ( and ) lose the usual meaning.
71 * @param string $mode Should only apply this pattern when dealing with this type of input.
74 public function addEntryPattern($pattern, $mode, $new_mode)
79 $this->regexes[$mode]->addPattern($pattern, $new_mode);
83 * Adds a pattern that will exit the current mode and re-enter the previous one.
85 * @param string $pattern Perl style regex, but ( and ) lose the usual meaning.
88 public function addExitPattern($pattern, $mode)
93 $this->regexes[$mode]->addPattern($pattern, "__exit");
97 * Adds a pattern that has a special mode.
99 * Acts as an entry and exit pattern in one go, effectively calling a special
102 * @param string $pattern Perl style regex, but ( and ) lose the usual meaning.
103 * @param string $mode Should only apply this pattern when dealing with this type of input.
106 public function addSpecialPattern($pattern, $mode, $special)
111 $this->regexes[$mode]->addPattern($pattern, "_$special");