Help examining possessions in backdrops [SOLVED]

This one is interesting. The issue seems to be a big circular loop through various scope and parsing routines triggered by the use of “[somebody]” in the grammar line. This creates a line in the parse_name() routine:

w = ParseTokenStopped(ELEMENTARY_TT, CREATURE_TOKEN);

When trying to parse a command and deciding the scope:

  1. After processing compass directions, SearchScope() case (c.3) attempts to add objects in the room to scope by calling ScopeWithin(location, yourself).
  2. ScopeWithin() begins to loop through unconcealed objects in the location, submitting each to DoScopeActionAndRecurse().
  3. When the backdrop is reached via a call of DoScopeActionAndRecurse(backdrop, yourself), the routine immediately calls DoScopeAction(backdrop).
  4. Because the scope_reason is PARSING_REASON, DoScopeAction() calls MatchTextAgainstItem(backdrop).
  5. MatchTextAgainstItem() calls TryGivenObject(backdrop, nothing).
  6. TryGivenObject() notes that the backdrop has a parse_name() routine and calls it.
  7. During pass 2 of backdrop.parse_name(), the call to ParseTokenStopped() mentioned above is made.
  8. The token-parsing machinery invokes NounDomain() to see what nouns are available to match.
  9. NounDomain() makes a call to SearchScope(location, yourself), and it’s back to step 1.

The above is for 6M62. Does the issue persist in 10.1?

4 Likes