public function getTokensOffsetRelativeToStartToken($startTokenName)
    {
        $startTokenIdx = null;

        foreach ($this->tokens as $idx => $token) {
            if ($token->getTokenName() === $startTokenName) {
                $startTokenIdx = $idx;
            } elseif ($token->isStartToken()) {
                $startTokenIdx = $idx;
            }
        }

        if ($startTokenIdx === null) {
            throw new ConfigurationException('No start token found for pattern '.print_r($this, true));
        }

        $numTokens = count($this->tokens);

        $offsets = array_map(function ($idx) use ($startTokenIdx) {
            return $idx - $startTokenIdx;
        }, range(0, $numTokens - 1));

        return array_combine($offsets, $this->tokens);
    }