@@ 360-366 (lines=7) @@ | ||
357 | if (!$tdefact) { |
|
358 | $tdefact = -1; |
|
359 | ||
360 | Utils::stableSort($tmpr, function (Reduce $x, Reduce $y) { |
|
361 | if ($x->number != $y->number) { |
|
362 | return $y->number - $x->number; |
|
363 | } |
|
364 | ||
365 | return $x->symbol->code - $y->symbol->code; |
|
366 | }); |
|
367 | ||
368 | $maxn = 0; |
|
369 | $nr = \count($tmpr); |
|
@@ 388-394 (lines=7) @@ | ||
385 | return $reduce->number !== $tdefact; |
|
386 | }); |
|
387 | ||
388 | Utils::stableSort($tmpr, function (Reduce $x, Reduce $y) { |
|
389 | if ($x->symbol !== $y->symbol) { |
|
390 | return $x->symbol->code - $y->symbol->code; |
|
391 | } |
|
392 | ||
393 | return $x->number - $y->number; |
|
394 | }); |
|
395 | $tmpr[] = new Reduce($this->context->nilsymbol, $tdefact); |
|
396 | ||
397 | // Squeeze shift actions (we deleted some keys) |