[Turn on line numbering]
arg line, action, @more;
var r, c;
switch (action) {
case 'error:
._tell(more[1]);
case 'match, 'command:
r = (> more[1].(more[2])(@more.subrange(3)) <);
if (type(r) in ['list, 'frob, 'string])
.ptell(r, #[['type, 'parser], ['command, more[2]]]);
case 'failed:
for c in ($place_lib.coordinate_shortcuts().keys()) {
if (line.match_template(c)) {
.tell("There is no exit " + line + " here.");
r = 1;
}
}
if (!r)
.tell("I don't understand " + line.chop(.linelen() - 22) + ".");
case 'ok:
// do nothing, probably a null command
default:
._tell("Unusual response from the parser: " + more);
}
["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]