#include "data/transformations.h"
#include "data/variable.h"
#include "language/command.h"
#include "data/transformations.h"
#include "data/variable.h"
#include "language/command.h"
- enum cmd_result result = cmd_parse_in_state (lexer, ds, CMD_STATE_INPUT_PROGRAM);
- if (result == CMD_END_INPUT_PROGRAM)
- break;
- else if (result == CMD_END_CASE)
+ enum cmd_result result;
+
+ result = cmd_parse_in_state (lexer, ds, CMD_STATE_INPUT_PROGRAM);
+ if (result == CMD_END_CASE)
if (result == CMD_EOF)
msg (SE, _("Unexpected end-of-file within INPUT PROGRAM."));
inside_input_program = false;
if (result == CMD_EOF)
msg (SE, _("Unexpected end-of-file within INPUT PROGRAM."));
inside_input_program = false;
if (dict_get_next_value_idx (dataset_dict (ds)) == 0)
{
msg (SE, _("Input program did not create any variables."));
if (dict_get_next_value_idx (dataset_dict (ds)) == 0)
{
msg (SE, _("Input program did not create any variables."));
caseinit_mark_for_init (inp->init, dataset_dict (ds));
inp->proto = caseproto_ref (dict_get_proto (dataset_dict (ds)));
caseinit_mark_for_init (inp->init, dataset_dict (ds));
inp->proto = caseproto_ref (dict_get_proto (dataset_dict (ds)));
ds, casereader_create_sequential (NULL, inp->proto, CASENUMBER_MAX,
&input_program_casereader_class, inp));
ds, casereader_create_sequential (NULL, inp->proto, CASENUMBER_MAX,
&input_program_casereader_class, inp));
- assert (in_input_program ());
- return CMD_END_INPUT_PROGRAM;
+ /* Inside INPUT PROGRAM, this should get caught at the top of the loop in
+ cmd_input_program().
+
+ Outside of INPUT PROGRAM, the command parser should reject this
+ command. */
+ NOT_REACHED ();
{
assert (in_input_program ());
add_transformation (ds, end_file_trns_proc, NULL, NULL);
{
assert (in_input_program ());
add_transformation (ds, end_file_trns_proc, NULL, NULL);