Lines Matching defs:i

170     for ($i = 0; $i<count($inner); $i++) {
171 $w += imagesx($inner[$i]);
172 $h = max($h, imagesy($inner[$i]));
176 for ($i = 1; $i<count($inner); $i++) {
179 imagecopy($im, $inner[$i], $x, 0, 0,0, imagesx($inner[$i]), imagesy($inner[$i]));
180 $x += imagesx($inner[$i])+EBNF_U;
185 for ($i = 0; $i<count($inner); $i++) {
186 $h += imagesy($inner[$i]);
187 $w = max($w, imagesx($inner[$i]));
191 for ($i = 0; $i<count($inner); $i++) {
193 imagecopy($im, $inner[$i], 3*EBNF_U, $y, 0,0, imagesx($inner[$i]), imagesy($inner[$i]));
197 $y += imagesy($inner[$i])+EBNF_U;
214 for ($i = 0; $i<count($images); $i++) {
215 $wn = max($wn, imagefontwidth(EBNF_FONT)*strlen($names[$i]));
216 $wr = max($wr, imagesx($images[$i]));
217 $h += imagesy($images[$i])+2*EBNF_U;
230 for ($i = 0; $i<count($images); $i++) {
231 imagestring($im, EBNF_FONT, EBNF_U, $y-EBNF_U+(2*EBNF_U-imagefontheight(EBNF_FONT))/2, $names[$i], $red);
232 imagecopy($im, $images[$i], $wn+2*EBNF_U, $y, 0,0, imagesx($images[$i]) , imagesy($images[$i]));
234 imageline($im, $wn+2*EBNF_U+imagesx($images[$i])-1, $y+EBNF_U, $w-EBNF_U, $y+EBNF_U, $black);
236 $y += 2*EBNF_U + imagesy($images[$i]);
258 $i = 0; $n = strlen($input); $m = count($ebnf_lexemes); $tokens = array();
259 while ($i < $n) {
262 preg_match("/^{$ebnf_lexemes[$j]['expr']}/", substr($input,$i), $matches)==0) $j++;
266 'value' => $matches[0], 'pos' => $i);
267 $i += strlen($matches[0]);
269 throw new Exception("Invalid token at position: $i");
283 $i = 0; $token = $tokens[$i++];
287 $token = $tokens[$i++];
291 $token = $tokens[$i];
292 while ($i < count($tokens) && $token['type'] == EBNF_IDENTIFIER_TOKEN) {
293 $syntax->appendChild(ebnf_parse_production($dom, $tokens, $i));
294 if ($i<count($tokens)) $token = $tokens[$i];
295 } $i++; if (!ebnf_check_token($token, EBNF_OPERATOR_TOKEN, '}'))
297 if ($i<count($tokens)) {
298 $token = $tokens[$i];
307 function ebnf_parse_production(&$dom, &$tokens, &$i) {
308 $token = $tokens[$i++];
313 $token = $tokens[$i++];
316 $production->appendChild( ebnf_parse_expression($dom, $tokens, $i));
317 $token = $tokens[$i++];
324 function ebnf_parse_expression(&$dom, &$tokens, &$i) {
326 $choise->appendChild(ebnf_parse_term($dom, $tokens, $i));
327 $token=$tokens[$i]; $mul = false;
329 $i++;
330 $choise->appendChild(ebnf_parse_term($dom, $tokens, $i));
331 $token=$tokens[$i]; $mul = true;
335 function ebnf_parse_term(&$dom, &$tokens, &$i) {
337 $factor = ebnf_parse_factor($dom, $tokens, $i);
339 $token=$tokens[$i]; $mul = false;
342 $sequence->appendChild(ebnf_parse_factor($dom, $tokens, $i));
343 $token=$tokens[$i]; $mul = true;
347 function ebnf_parse_factor(&$dom, &$tokens, &$i) {
348 $token = $tokens[$i++];
358 $expression = ebnf_parse_expression($dom, $tokens, $i);
359 $token = $tokens[$i++];
365 $option->appendChild(ebnf_parse_expression($dom, $tokens, $i));
366 $token = $tokens[$i++];
372 $loop->appendChild(ebnf_parse_expression($dom, $tokens, $i));
373 $token = $tokens[$i++];