ff6e7485d69c2657c1813af6977bc17f985cbee1
[pspp-builds.git] / src / command.def
1 /* PSPP - computes sample statistics.
2    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3    Written by Ben Pfaff <blp@gnu.org>.
4
5    This program is free software; you can redistribute it and/or
6    modify it under the terms of the GNU General Public License as
7    published by the Free Software Foundation; either version 2 of the
8    License, or (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful, but
11    WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software
17    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18    02111-1307, USA. */
19
20 /* State abbreviations. */
21 #define INIT STATE_INIT
22 #define INPU STATE_INPUT
23 #define TRAN STATE_TRANS
24 #define PROC STATE_PROC
25 #define ERRO STATE_ERROR
26
27 UNIMPL ("ACF",                    ERRO, ERRO, ERRO, ERRO)
28 UNIMPL ("ADD FILES",              ERRO, ERRO, ERRO, ERRO)
29 DEFCMD ("ADD VALUE LABELS",       ERRO, INPU, TRAN, TRAN, cmd_add_value_labels)
30 DEFCMD ("AGGREGATE",              ERRO, ERRO, PROC, TRAN, cmd_aggregate)
31 UNIMPL ("ANOVA",                  ERRO, ERRO, ERRO, ERRO)
32 DEFCMD ("APPLY DICTIONARY",       ERRO, ERRO, TRAN, TRAN, cmd_apply_dictionary)
33 DEFCMD ("AUTORECODE",             ERRO, ERRO, PROC, PROC, cmd_autorecode)
34 SPCCMD ("BEGIN DATA",             ERRO, ERRO, PROC, PROC, cmd_begin_data)
35 DEFCMD ("BREAK",                  ERRO, INPU, TRAN, TRAN, cmd_break)
36 UNIMPL ("CASEPLOT",               ERRO, ERRO, ERRO, ERRO)
37 UNIMPL ("CASESTOVARS",            ERRO, ERRO, ERRO, ERRO)
38 UNIMPL ("CCF",                    ERRO, ERRO, ERRO, ERRO)
39 DEFCMD ("CLEAR TRANSFORMATIONS",  ERRO, INPU, TRAN, TRAN, cmd_clear_transformations)
40 UNIMPL ("CLUSTER",                ERRO, ERRO, ERRO, ERRO)
41 UNIMPL ("COMMENT",                ERRO, ERRO, ERRO, ERRO)
42 DEFCMD ("COMPUTE",                ERRO, INPU, TRAN, TRAN, cmd_compute)
43 UNIMPL ("CONJOINT",               ERRO, ERRO, ERRO, ERRO)
44 DEFCMD ("CORRELATIONS",           ERRO, ERRO, PROC, PROC, cmd_correlations)
45 DEFCMD ("COUNT",                  ERRO, INPU, TRAN, TRAN, cmd_count)
46 UNIMPL ("CREATE",                 ERRO, ERRO, ERRO, ERRO)
47 DEFCMD ("CROSSTABS",              ERRO, ERRO, PROC, PROC, cmd_crosstabs)
48 UNIMPL ("CURVEFIT",               ERRO, ERRO, ERRO, ERRO)
49 DEFCMD ("DATA LIST",              TRAN, INPU, TRAN, TRAN, cmd_data_list)
50 UNIMPL ("DATE",                   ERRO, ERRO, ERRO, ERRO)
51 DEFCMD ("DEBUG CASEFILE",         INIT, INPU, TRAN, PROC, cmd_debug_casefile)
52 DEFCMD ("DEBUG EVALUATE",         INIT, INPU, TRAN, PROC, cmd_debug_evaluate)
53 DEFCMD ("DEBUG MOMENTS",          INIT, INPU, TRAN, PROC, cmd_debug_moments)
54 DEFCMD ("DESCRIPTIVES",           ERRO, ERRO, PROC, PROC, cmd_descriptives)
55 UNIMPL ("DISCRIMINANT",           ERRO, ERRO, ERRO, ERRO)
56 DEFCMD ("DISPLAY",                ERRO, INPU, TRAN, PROC, cmd_display)
57 SPCCMD ("DOCUMENT",               ERRO, INPU, TRAN, TRAN, cmd_document)
58 DEFCMD ("DO IF",                  ERRO, INPU, TRAN, TRAN, cmd_do_if)
59 DEFCMD ("DO REPEAT",              ERRO, INPU, TRAN, TRAN, cmd_do_repeat)
60 DEFCMD ("DROP DOCUMENTS",         INIT, INPU, TRAN, PROC, cmd_drop_documents)
61 UNIMPL ("EDIT",                   ERRO, ERRO, ERRO, ERRO)
62 DEFCMD ("ELSE",                   ERRO, INPU, TRAN, TRAN, cmd_else)
63 DEFCMD ("ELSE IF",                ERRO, INPU, TRAN, TRAN, cmd_else_if)
64 DEFCMD ("END CASE",               ERRO, INPU, ERRO, ERRO, cmd_end_case)
65 DEFCMD ("END FILE",               ERRO, INPU, ERRO, ERRO, cmd_end_file)
66 DEFCMD ("END FILE TYPE",          ERRO, TRAN, ERRO, ERRO, cmd_end_file_type)
67 DEFCMD ("END IF",                 ERRO, INPU, TRAN, TRAN, cmd_end_if)
68 DEFCMD ("END INPUT PROGRAM",      ERRO, TRAN, ERRO, ERRO, cmd_end_input_program)
69 DEFCMD ("END LOOP",               ERRO, INPU, TRAN, TRAN, cmd_end_loop)
70 DEFCMD ("END REPEAT",             ERRO, INPU, TRAN, TRAN, cmd_end_repeat)
71 DEFCMD ("ERASE",                  INIT, INPU, TRAN, PROC, cmd_erase)
72 DEFCMD ("EXAMINE",                ERRO, ERRO, PROC, PROC, cmd_examine)
73 DEFCMD ("EXECUTE",                ERRO, ERRO, PROC, PROC, cmd_execute)
74 DEFCMD ("EXIT",                   INIT, INPU, TRAN, PROC, cmd_exit)
75 DEFCMD ("EXPORT",                 ERRO, ERRO, PROC, PROC, cmd_export)
76 UNIMPL ("FACTOR",                 ERRO, ERRO, ERRO, ERRO)
77 DEFCMD ("FILE HANDLE",            INIT, INPU, TRAN, PROC, cmd_file_handle)
78 SPCCMD ("FILE LABEL",             INIT, INPU, TRAN, PROC, cmd_file_label)
79 DEFCMD ("FILE TYPE",              INPU, ERRO, INPU, INPU, cmd_file_type)
80 DEFCMD ("FILTER",                 ERRO, ERRO, TRAN, TRAN, cmd_filter)
81 DEFCMD ("FINISH",                 INIT, INPU, TRAN, PROC, cmd_finish)
82 UNIMPL ("FIT",                    ERRO, ERRO, ERRO, ERRO)
83 DEFCMD ("FLIP",                   ERRO, ERRO, PROC, PROC, cmd_flip)
84 DEFCMD ("FORMATS",                INIT, INPU, TRAN, PROC, cmd_formats)
85 DEFCMD ("FREQUENCIES",            ERRO, ERRO, PROC, PROC, cmd_frequencies)
86 DEFCMD ("GET",                    TRAN, ERRO, TRAN, TRAN, cmd_get)
87 UNIMPL ("GET TRANSLATE",          ERRO, ERRO, ERRO, ERRO)
88 UNIMPL ("GLM",                    ERRO, ERRO, ERRO, ERRO)
89 UNIMPL ("GRAPH",                  ERRO, ERRO, ERRO, ERRO)
90 DEFCMD ("HOST",                   INIT, INPU, TRAN, PROC, cmd_host)
91 DEFCMD ("IF",                     ERRO, INPU, TRAN, TRAN, cmd_if)
92 UNIMPL ("IGRAPH",                 ERRO, ERRO, ERRO, ERRO)
93 DEFCMD ("IMPORT",                 TRAN, ERRO, TRAN, TRAN, cmd_import)
94 DEFCMD ("INCLUDE",                INIT, INPU, TRAN, PROC, cmd_include)
95 UNIMPL ("INFO",                   ERRO, ERRO, ERRO, ERRO)
96 UNIMPL ("INPUT MATRIX",           ERRO, ERRO, ERRO, ERRO)
97 DEFCMD ("INPUT PROGRAM",          INPU, ERRO, INPU, INPU, cmd_input_program)
98 UNIMPL ("KEYED DATA LIST",        ERRO, ERRO, ERRO, ERRO)
99 DEFCMD ("LEAVE",                  ERRO, INPU, TRAN, TRAN, cmd_leave)
100 DEFCMD ("LIST",                   ERRO, ERRO, PROC, PROC, cmd_list)
101 DEFCMD ("LOOP",                   ERRO, INPU, TRAN, TRAN, cmd_loop)
102 DEFCMD ("MATCH FILES",            TRAN, ERRO, TRAN, PROC, cmd_match_files)
103 DEFCMD ("MATRIX DATA",            TRAN, ERRO, TRAN, TRAN, cmd_matrix_data)
104 UNIMPL ("MCONVERT",               ERRO, ERRO, ERRO, ERRO)
105 DEFCMD ("MEANS",                  ERRO, ERRO, PROC, PROC, cmd_means)
106 DEFCMD ("MISSING VALUES",         ERRO, INPU, TRAN, TRAN, cmd_missing_values)
107 DEFCMD ("MODIFY VARS",            ERRO, ERRO, TRAN, PROC, cmd_modify_vars)
108 UNIMPL ("MULT RESPONSE",          ERRO, ERRO, ERRO, ERRO)
109 DEFCMD ("NEW FILE",               INIT, ERRO, INIT, INIT, cmd_new_file)
110 DEFCMD ("N",                      INIT, INPU, TRAN, TRAN, cmd_n_of_cases)
111 DEFCMD ("N OF CASES",             INIT, INPU, TRAN, TRAN, cmd_n_of_cases)
112 UNIMPL ("NONPAR CORR",            ERRO, ERRO, ERRO, ERRO)
113 UNIMPL ("NPAR TESTS",             ERRO, ERRO, ERRO, ERRO)
114 UNIMPL ("NUMBERED",               ERRO, ERRO, ERRO, ERRO)
115 DEFCMD ("NUMERIC",                ERRO, INPU, TRAN, TRAN, cmd_numeric)
116 DEFCMD ("ONEWAY",                 ERRO, ERRO, PROC, PROC, cmd_oneway)
117 UNIMPL ("PACF",                   ERRO, ERRO, ERRO, ERRO)
118 UNIMPL ("PARTIAL CORR",           ERRO, ERRO, ERRO, ERRO)
119 DEFCMD ("PEARSON CORRELATIONS",   ERRO, ERRO, PROC, PROC, cmd_correlations)
120 DEFCMD ("PERMISSIONS",            INIT, INPU, TRAN, PROC, cmd_permissions)
121 UNIMPL ("PLOT",                   ERRO, ERRO, ERRO, ERRO)
122 UNIMPL ("POINT",                  ERRO, ERRO, ERRO, ERRO)
123 UNIMPL ("PPLOT",                  ERRO, ERRO, ERRO, ERRO)
124 UNIMPL ("PREDICT",                ERRO, ERRO, ERRO, ERRO)
125 UNIMPL ("PRESERVE",               ERRO, ERRO, ERRO, ERRO)
126 DEFCMD ("PRINT EJECT",            ERRO, INPU, TRAN, TRAN, cmd_print_eject)
127 DEFCMD ("PRINT",                  ERRO, INPU, TRAN, TRAN, cmd_print)
128 DEFCMD ("PRINT FORMATS",          ERRO, INPU, TRAN, TRAN, cmd_print_formats)
129 DEFCMD ("PRINT SPACE",            ERRO, INPU, TRAN, TRAN, cmd_print_space)
130 UNIMPL ("PROCEDURE OUTPUT",       ERRO, ERRO, ERRO, ERRO)
131 DEFCMD ("PROCESS IF",             ERRO, ERRO, TRAN, TRAN, cmd_process_if)
132 UNIMPL ("PROXIMITIES",            ERRO, ERRO, ERRO, ERRO)
133 DEFCMD ("Q",                      INIT, INPU, TRAN, PROC, cmd_exit)
134 UNIMPL ("QUICK CLUSTER",          ERRO, ERRO, ERRO, ERRO)
135 DEFCMD ("QUIT",                   INIT, INPU, TRAN, PROC, cmd_exit)
136 UNIMPL ("RANK",                   ERRO, ERRO, ERRO, ERRO)
137 DEFCMD ("RECODE",                 ERRO, INPU, TRAN, TRAN, cmd_recode)
138 DEFCMD ("RECORD TYPE",            ERRO, INPU, ERRO, ERRO, cmd_record_type)
139 UNIMPL ("REFORMAT",               ERRO, ERRO, ERRO, ERRO)
140 UNIMPL ("REGRESSION",             ERRO, ERRO, ERRO, ERRO)
141 DEFCMD ("RENAME VARIABLES",       ERRO, INPU, TRAN, PROC, cmd_rename_variables)
142 DEFCMD ("REPEATING DATA",         ERRO, INPU, ERRO, ERRO, cmd_repeating_data)
143 UNIMPL ("REPORT",                 ERRO, ERRO, ERRO, ERRO)
144 DEFCMD ("REREAD",                 ERRO, INPU, ERRO, ERRO, cmd_reread)
145 UNIMPL ("RESTORE",                ERRO, ERRO, ERRO, ERRO)
146 UNIMPL ("RMV",                    ERRO, ERRO, ERRO, ERRO)
147 DEFCMD ("SAMPLE",                 ERRO, ERRO, TRAN, TRAN, cmd_sample)
148 DEFCMD ("SAVE",                   ERRO, ERRO, PROC, PROC, cmd_save)
149 UNIMPL ("SAVE TRANSLATE",         ERRO, ERRO, ERRO, ERRO)
150 UNIMPL ("SCRIPT",                 ERRO, ERRO, ERRO, ERRO)
151 DEFCMD ("SELECT IF",              ERRO, ERRO, TRAN, TRAN, cmd_select_if)
152 DEFCMD ("SET",                    INIT, INPU, TRAN, PROC, cmd_set)
153 DEFCMD ("SHOW",                   INIT, INPU, TRAN, PROC, cmd_show)
154 DEFCMD ("SORT CASES",             ERRO, ERRO, PROC, PROC, cmd_sort_cases)
155 DEFCMD ("SORT",                   ERRO, ERRO, PROC, PROC, cmd_sort_cases)
156 UNIMPL ("SPCHART",                ERRO, ERRO, ERRO, ERRO)
157 DEFCMD ("SPLIT FILE",             ERRO, INPU, TRAN, TRAN, cmd_split_file)
158 DEFCMD ("STRING",                 ERRO, INPU, TRAN, TRAN, cmd_string)
159 SPCCMD ("SUBTITLE",               INIT, INPU, TRAN, PROC, cmd_subtitle)
160 UNIMPL ("SUMMARIZE",              ERRO, ERRO, ERRO, ERRO)
161 UNIMPL ("SURVIVAL",               ERRO, ERRO, ERRO, ERRO)
162 DEFCMD ("SYSFILE INFO",           INIT, INPU, TRAN, PROC, cmd_sysfile_info)
163 DEFCMD ("TEMPORARY",              ERRO, ERRO, TRAN, TRAN, cmd_temporary)
164 SPCCMD ("TITLE",                  INIT, INPU, TRAN, PROC, cmd_title)
165 UNIMPL ("TSET",                   ERRO, ERRO, ERRO, ERRO)
166 UNIMPL ("TSHOW",                  ERRO, ERRO, ERRO, ERRO)
167 UNIMPL ("TSPLOT",                 ERRO, ERRO, ERRO, ERRO)
168 DEFCMD ("T-TEST",                 ERRO, ERRO, PROC, PROC, cmd_t_test)
169 UNIMPL ("UNIANOVA",               ERRO, ERRO, ERRO, ERRO)
170 UNIMPL ("UNNUMBERED",             ERRO, ERRO, ERRO, ERRO)
171 UNIMPL ("UPDATE",                 ERRO, ERRO, ERRO, ERRO)
172 DEFCMD ("USE",                    ERRO, ERRO, TRAN, TRAN, cmd_use)
173 DEFCMD ("VALUE LABELS",           ERRO, INPU, TRAN, TRAN, cmd_value_labels)
174 DEFCMD ("VARIABLE LABELS",        ERRO, INPU, TRAN, TRAN, cmd_variable_labels)
175 UNIMPL ("VARIABLE LEVEL",         ERRO, ERRO, ERRO, ERRO)
176 UNIMPL ("VARSTOCASES",            ERRO, ERRO, ERRO, ERRO)
177 DEFCMD ("VECTOR",                 ERRO, INPU, TRAN, TRAN, cmd_vector)
178 UNIMPL ("VERIFY",                 ERRO, ERRO, ERRO, ERRO)
179 DEFCMD ("WEIGHT",                 ERRO, INPU, TRAN, TRAN, cmd_weight)
180 DEFCMD ("WRITE",                  ERRO, INPU, TRAN, TRAN, cmd_write)
181 DEFCMD ("WRITE FORMATS",          ERRO, INPU, TRAN, TRAN, cmd_write_formats)
182 DEFCMD ("XSAVE",                  ERRO, INPU, TRAN, TRAN, cmd_xsave)