- msg (SE, _("No matching INPUT PROGRAM command."));
- return CMD_CASCADING_FAILURE;
+ enum cmd_result result;
+ lex_get ();
+ result = cmd_parse (CMD_STATE_INPUT_PROGRAM);
+ if (result == CMD_END_SUBLOOP)
+ break;
+ if (result == CMD_EOF || result == CMD_QUIT || result == CMD_CASCADING_FAILURE)
+ {
+ if (result == CMD_EOF)
+ msg (SE, _("Unexpected end-of-file within INPUT PROGRAM."));
+ discard_variables ();
+ inside_input_program = false;
+ return result;
+ }