private function callCallbacks(int $initialState, int $endState)
    {
        if (isset($this->callbacks[$initialState][$endState]) &&
                is_callable($this->callbacks[$initialState][$endState])) {
            $this->matched = call_user_func($this->callbacks[$initialState][$endState], $this->matched);
        }
    }