def _do_anchor(self, anchor):
if anchor:<EOL><INDENT>for x in anchor.split("<STR_LIT:->"):<EOL><INDENT>A, P = None, None<EOL>if x.startswith("<STR_LIT:A>") and len(self.chunks) > <NUM_LIT:0>: <EOL><INDENT>A, P = x, x.replace("<STR_LIT:A>","<STR_LIT:P>")<EOL>self._anchors[A] = self.chunks[-<NUM_LIT:1>]<EOL><DEDENT>if x.startswith("<STR_LIT:P>") and len(self.pnp) > <NUM_LIT:0>:    <EOL><INDENT>A, P = x.replace("<STR_LIT:P>","<STR_LIT:A>"), x<EOL>self._anchors[P] = self.pnp[-<NUM_LIT:1>]<EOL><DEDENT>if A in self._anchors and P in self._anchors and not self._anchors[P].anchor:<EOL><INDENT>pnp = self._anchors[P]<EOL>pnp.anchor = self._anchors[A]<EOL>pnp.anchor.attachments.append(pnp)<EOL><DEDENT><DEDENT><DEDENT>
Collects preposition anchors and attachments in a dictionary.
            Once the dictionary has an entry for both the anchor and the attachment, they are linked.