packages/sql-parser/src/Automaton/ResolvedState.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlParser\Automaton;
6
7/**
8 * The actions of one state once its conflicts have been settled.
9 *
10 * @visibility root
11 */
12final class ResolvedState
13{
14 /**
15 * @param array<int, int> $actions Action code by terminal, explicit errors included
16 * @param array<int, int> $reductionCounts How many terminals each completed rule still reduces on
17 * @param int $shiftReduceConflicts Terminals where a shift won by default
18 * @param int $reduceReduceConflicts Terminals where an earlier rule won by default
19 */
20 public function __construct(
21 public readonly array $actions,
22 public readonly array $reductionCounts,
23 public readonly int $shiftReduceConflicts,
24 public readonly int $reduceReduceConflicts,
25 ) {
26 }
27}
28