Lines Matching refs:position
24 function mb_preg_match($text, $matchRegex, $position=0) { argument
27 $textPiece = mb_substr($text, $position);
42 function sb_preg_match($text, $matchRegex, $position=0) { argument
44 $result = preg_match($matchRegex, $text, $matches, PREG_OFFSET_CAPTURE, $position);
53 if ($matchOfs > $position) {
91 public function tryMatch($text, $position) { argument
93 return mb_preg_match($text, $this->_matchRegex, $position);
95 return sb_preg_match($text, $this->_matchRegex, $position);
110 public function __construct($definition, $text, $position, $length) { argument
113 $this->_position = $position;
119 public function position() { return $this->_position; } function in AST\\TokenInstance
123 return mb_substr($this->_text, $this->position(), $this->length());
125 return substr($this->_text, $this->position(), $this->length());
143 for ($position = 0; $position < $textLen; $position += $foundTokInst->length()) {
146 $match = $tokDef->tryMatch($text, $position);
153 $foundTokInst = new TokenInstance($tokDef, $text, $position, $matchLen);
158 throw new UnknownTokenException($text, $position);