在这两个句子中, 句子的主语都作分词短语的逻辑主语。
having been told many times是现在分词短语,句子的主语he 是其逻辑主语。
lost in thought是过去分词短语, 句子的逻辑主语she 是其逻辑主语
这两个句子都是简单句。Having been told many times是状语,he主语 still状语 repeated谓语 the same 定语mistake宾语. (被告知多次了,他还是犯了同样的错误)
Lost in thought状语, she主语 nearly状语 ran谓语 into a tree状语.(陷入了深思,他差点撞到树上)