Lines Matching refs:cursor
99 static $cursor;
102 $cursor = 0;
108 while ($cursor < strlen($str)) {
109 if (preg_match('/\s+/A', $str, $match, null, $cursor)) {
110 $cursor += strlen($match[0]);
111 } elseif (preg_match('/<(\w+)(?:\:(\w+))?>/A', $str, $match, null, $cursor)) {
117 $cursor += strlen($match[0]);
118 } elseif (preg_match('/\w+/A', $str, $match, null, $cursor)) {
120 $cursor += strlen($match[0]);
121 } elseif (preg_match('/,/A', $str, $match, null, $cursor)) {
123 $cursor += strlen($match[0]);
124 } elseif (preg_match('/\[/A', $str, $match, null, $cursor)) {
125 $cursor += strlen($match[0]);
127 } elseif (true !== $main && preg_match('/\]/A', $str, $match, null, $cursor)) {
128 $cursor += strlen($match[0]);
132 …_Runtime(sprintf('Unable to parse grammar "%s" near "...%s..."', $str, substr($str, $cursor, 10)));