Do you know what he is pretending that the broom is?
The that-clause within the what-clause is confusing me. Is this a grammatical sentence?
Do you know what he is pretending that the broom is?
The that-clause within the what-clause is confusing me. Is this a grammatical sentence?
It is indeed a grammatical sentence. It is confusing because it includes three separate clauses, with the second ‘embedded’ in the first and the third embedded in the second:
1 MAIN CLAUSE: Do you know X?
⇓
2 EMBEDDED: He is pretending Y.
⇓
3 EMBEDDED: The broom is X.
Two syntactical devices are employed to put these three clauses into the proper relationship in a single sentence. We work from the ‘bottom’ up, because each lower clause has to be restructured to fit into the next higher clause.
Clause 3 is recast employing the complementizer† that. This transforms the clause into a form which allows it to act as the complement of the verb PRETEND, replacing Y in Clause 2.
He is pretending that the broom is X.
This expanded Clause 2 is recast employing the construction called a free relative clause‡. This construction replaces a clause constituent with an interrogative expression such as what, who, where, how, when and moves the interrogative to the ‘head’ of the clause. This permits the new construction to act as an NP (‘noun phrase’) constituent in a higher-order clause. In this particular case, the constituent you are interested in is X, which you know to be a ‘thing’, so you replace it with what. Below I use an underscore, _, to indicate where the replaced constituent was originally.
what he is pretending that the broom is _.
Now you replace the X in Clause 1 with the transformed Clause 2, and you have your original sentence:
Do you know what he is pretending that the broom is?
† In traditional grammar this is called a subordinating conjunction, and Clause 3 is said to be cast as a subordinate clause.
‡ Free relative clauses are discussed at many places on ELL; click free-relative-clauses for a list of related questions.