@@ -113,7 +113,7 @@ |
||
113 | 113 | $indexedArray[] = [$item, $i++]; |
114 | 114 | } |
115 | 115 | |
116 | - \usort($indexedArray, function (array $a, array $b) use ($cmp) { |
|
116 | + \usort($indexedArray, function(array $a, array $b) use ($cmp) { |
|
117 | 117 | $result = $cmp($a[0], $b[0]); |
118 | 118 | if ($result !== 0) { |
119 | 119 | return $result; |
@@ -332,7 +332,7 @@ |
||
332 | 332 | $this->context->debug("Used aux table:\n"); |
333 | 333 | } |
334 | 334 | $this->context->countAux = $this->context->countClasses; |
335 | - for (; ;) { |
|
335 | + for (;;) { |
|
336 | 336 | $maxGain = 0; |
337 | 337 | $maxAux = null; |
338 | 338 | $pre = null; |
@@ -317,7 +317,7 @@ |
||
317 | 317 | $nil->code = $code++; |
318 | 318 | } |
319 | 319 | |
320 | - \usort($this->_symbols, function ($a, $b) { |
|
320 | + \usort($this->_symbols, function($a, $b) { |
|
321 | 321 | return $a->code <=> $b->code; |
322 | 322 | }); |
323 | 323 | } |
@@ -284,7 +284,7 @@ |
||
284 | 284 | */ |
285 | 285 | protected function skipIf(string $spec): bool |
286 | 286 | { |
287 | - [ $dump, $test ] = \explode(' ', $spec, 2); |
|
287 | + [$dump, $test] = \explode(' ', $spec, 2); |
|
288 | 288 | |
289 | 289 | $test = \trim($test); |
290 | 290 | switch ($test) { |
@@ -124,7 +124,7 @@ |
||
124 | 124 | |
125 | 125 | $expanded = $this->macros->apply($this->context, $symbols, $tokens, $n, $attribute); |
126 | 126 | |
127 | - $action = \implode('', \array_map(function (Token $token) { |
|
127 | + $action = \implode('', \array_map(function(Token $token) { |
|
128 | 128 | return $token->getValue(); |
129 | 129 | }, $expanded)); |
130 | 130 |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | } |
177 | 177 | } |
178 | 178 | |
179 | - $tmpList = $this->sortList($tmpList, function (Lr1 $x, Lr1 $y) { |
|
179 | + $tmpList = $this->sortList($tmpList, function(Lr1 $x, Lr1 $y) { |
|
180 | 180 | $gx = $x->item[-1]->code; |
181 | 181 | $gy = $y->item[-1]->code; |
182 | 182 | if ($gx !== $gy) { |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | if (!$tdefact) { |
358 | 358 | $tdefact = -1; |
359 | 359 | |
360 | - Utils::stableSort($tmpr, function (Reduce $x, Reduce $y) { |
|
360 | + Utils::stableSort($tmpr, function(Reduce $x, Reduce $y) { |
|
361 | 361 | if ($x->number != $y->number) { |
362 | 362 | return $y->number - $x->number; |
363 | 363 | } |
@@ -381,11 +381,11 @@ discard block |
||
381 | 381 | } |
382 | 382 | |
383 | 383 | // Squeeze tmpr |
384 | - $tmpr = \array_filter($tmpr, function (Reduce $reduce) use ($tdefact) { |
|
384 | + $tmpr = \array_filter($tmpr, function(Reduce $reduce) use ($tdefact) { |
|
385 | 385 | return $reduce->number !== $tdefact; |
386 | 386 | }); |
387 | 387 | |
388 | - Utils::stableSort($tmpr, function (Reduce $x, Reduce $y) { |
|
388 | + Utils::stableSort($tmpr, function(Reduce $x, Reduce $y) { |
|
389 | 389 | if ($x->symbol !== $y->symbol) { |
390 | 390 | return $x->symbol->code - $y->symbol->code; |
391 | 391 | } |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | // do not move initial state |
425 | 425 | $initState = \array_shift($this->states); |
426 | 426 | |
427 | - Utils::stableSort($this->states, function (State $p, State $q) { |
|
427 | + Utils::stableSort($this->states, function(State $p, State $q) { |
|
428 | 428 | $numReduces = count($p->reduce) - 1; // -1 for default action |
429 | 429 | $pt = $numReduces; |
430 | 430 | $pn = count($p->shifts) + $numReduces; |