command.def: Disallow DATASET commands inside INPUT PROGRAM, FILE TYPE.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 5 Jun 2013 06:25:36 +0000 (23:25 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 13 Jun 2013 07:07:13 +0000 (00:07 -0700)
It doesn't make sense to try to switch datasets within INPUT PROGRAM, and
so we shouldn't allow it.

src/language/command.def

index 90ee34888f7502b3ea0c711a4e46f4aebeeda021..5191e522d758a3354cb691f49e21f5940aa91b4e 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 DEF_CMD (S_ANY, F_ENHANCED, "CLOSE FILE HANDLE", cmd_close_file_handle)
 DEF_CMD (S_ANY, 0, "CACHE", cmd_cache)
 DEF_CMD (S_ANY, 0, "CD", cmd_cd)
-DEF_CMD (S_ANY, 0, "DATASET ACTIVATE", cmd_dataset_activate)
-DEF_CMD (S_ANY, 0, "DATASET DECLARE", cmd_dataset_declare)
-DEF_CMD (S_ANY, 0, "DATASET CLOSE", cmd_dataset_close)
-DEF_CMD (S_ANY, 0, "DATASET COPY", cmd_dataset_copy)
-DEF_CMD (S_ANY, 0, "DATASET NAME", cmd_dataset_name)
-DEF_CMD (S_ANY, 0, "DATASET DISPLAY", cmd_dataset_display)
 DEF_CMD (S_ANY, 0, "DO REPEAT", cmd_do_repeat)
 DEF_CMD (S_ANY, 0, "END REPEAT", cmd_end_repeat)
 DEF_CMD (S_ANY, 0, "ECHO", cmd_echo)
@@ -58,6 +52,12 @@ DEF_CMD (S_INITIAL | S_DATA, 0, "IMPORT", cmd_import)
 DEF_CMD (S_INITIAL | S_DATA, 0, "INPUT PROGRAM", cmd_input_program)
 DEF_CMD (S_INITIAL | S_DATA, 0, "MATCH FILES", cmd_match_files)
 DEF_CMD (S_INITIAL | S_DATA, 0, "UPDATE", cmd_update)
+DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET ACTIVATE", cmd_dataset_activate)
+DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET DECLARE", cmd_dataset_declare)
+DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET CLOSE", cmd_dataset_close)
+DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET COPY", cmd_dataset_copy)
+DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET NAME", cmd_dataset_name)
+DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET DISPLAY", cmd_dataset_display)
 
 /* Transformations and utilities that may appear after active
    file definition or within INPUT PROGRAM. */