*** Guide-to-Links ***
JQ
JQ is used to connect prepositions to question-words in constructions
like the following:

         +-------Qd----+
         +-----J---+   |
    +-Wj-+-JQ+--D--+   +-SI-+
    |    |   |     |   |    |
  ///// In which room were you working

This requires some explanation. Consider the following
simplified expressions:

	in: {JQ+} & J+ & (MVp- or Mp- or (Qd+ & Wj-)...)
	which: (R- & (RS+ or C+)) or 
		((QI- or W-) & (B+ or S+)) or (JQ- & D+);

Notice, first, that the preposition uses the same J+ to
connect to "room" that it uses in an ordinary prepositional
phrase (for example, with a MVp- or Mp-). In ordinary
prepositional phrases, however, no JQ link is made; thus the
JQ+ on "in" must be optional. Notice also that the complex
used on "which" is disjoined from the connectors it uses in
other kinds of questions (direct and indirect) and relative
clauses.

But given this expression for "in", what prevents use of JQ in
ordinary prepositional phrases?

                +----J----+
                +JQ-+--D--+
                |   |     |
	*I saw in which room

This is prevented by post-processing. The Wj linking the
preposition to the wall starts a domain, in which it is
included; we then require that JQ links must have a Wj
link in the same group. We also have to ensure that in
constructions like the above, a question-determiner is used: 
"*In that room were you working". To do this, we also insist in
post-processing that a group with a Wj must contain a
JQ. Notice, also, that the preposition here makes a Qd
connection to the auxiliary. This link, which starts a domain,
is one of the ones that permits (and in fact requires)
subject-verb inversion in post-processing (see "SI"). But this
serves another function too; it isolates the JQ and J links in
the group. This ensures that the post-processing rules
relating to Wj and JQ will not be satisfied by a JQ occurring
later in the sentence ("*In the room were you working on which
desk?" (We should note that groups started by Wj, unlike
others, normally do not contain whole clauses.)  Thus the
following domain structure is generated:

          +---Q(j(m))----+
          +-----J(j)-+   |
    +Wj(j)+JQ(j)+D(j)+   +SI(j(m))+
    |     |     |    |   |        |
  /////	 In  which room were     you working
	
Such a construction might be also be formed in indirect
questions: "I wonder in which room he was sleeping". This
usage would require extra paraphernalia, however, and seems
almost non-existent, so we exclude it.

A similar linkage is formed in questions where the question-word
acts not as a determiner but as a noun-phrase:

         +---Qd----+
    +-Wj-+-Jw+     +-SI-+
    |    |   |     |    |
  /////	 To whom  were you speaking

Question-words that can be used in this way - "which" and
"whom" - have Jw- connectors disjoined with everything else.
In this case, then, the usual "J+" connector on the
preposition is used, but it is given a 'w' subscript; no "JQ"
connection is made. "Jw" is then added to "JQ" in the list of
links which may satisfy the demand of "Wj" in post-processing;
and, in turn, "Jw" may only occur if a "Wj" is present.

Grammar Documentation Page.