Does this get you at least part of the way there? (Note: I modified this quickly from some WIP code, so it may be a bit not-right.) UPDATE: edited to remove some extraneous lines in the code.
Following-up is a truth state that varies.
A Question is a kind of object.
A question has an object based rulebook called the result.
The current inquiry is a question that varies.
To prepare to ask (Q - a question):
now the current inquiry is Q;
say Q;
now Following-up is true;
Supplying an answer with is an action applying to one object.
Understand "[something]" as supplying an answer with when following-up is true.
This is the clear questioning rule:
now Following-up is false;
Carry out supplying an answer with:
let RB be the result of the current inquiry;
follow RB for the noun;
The clear questioning rule is listed before the generate action rule in the turn sequence rulebook.
Troll Room is a room.
The player carries the elvish sword.
The troll-creature is an animal in the Troll Room. It is privately-named. The printed name is "troll". Understand "troll" as the troll-creature.
Understand "attack" as attacking.
attack-what is a Question. The printed name is "What do you want to attack?[line break]".
attack clarifying is an object based rulebook.
The result of attack-what is attack clarifying.
attack clarifying something (called S):
try attacking S;
Rule for supplying a missing noun while attacking:
prepare to ask attack-what;
Instead of attacking the troll-creature:
say "The troll is knocked out!";
test me with "attack/troll/attack/me/attack/i".