Implemented long variable names a la spss V12.
[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 UNIMPL ("AREG",                   ERRO, ERRO, ERRO, ERRO)
34 UNIMPL ("ARIMA",                  ERRO, ERRO, ERRO, ERRO)
35 DEFCMD ("AUTORECODE",             ERRO, ERRO, PROC, PROC, cmd_autorecode)
36 SPCCMD ("BEGIN DATA",             ERRO, ERRO, PROC, PROC, cmd_begin_data)
37 DEFCMD ("BREAK",                  ERRO, INPU, TRAN, TRAN, cmd_break)
38 UNIMPL ("CASEPLOT",               ERRO, ERRO, ERRO, ERRO)
39 UNIMPL ("CASESTOVARS",            ERRO, ERRO, ERRO, ERRO)
40 UNIMPL ("CCF",                    ERRO, ERRO, ERRO, ERRO)
41 DEFCMD ("CLEAR TRANSFORMATIONS",  ERRO, INPU, TRAN, TRAN, cmd_clear_transformations)
42 UNIMPL ("CLUSTER",                ERRO, ERRO, ERRO, ERRO)
43 DEFCMD ("COMPUTE",                ERRO, INPU, TRAN, TRAN, cmd_compute)
44 UNIMPL ("CONJOINT",               ERRO, ERRO, ERRO, ERRO)
45 DEFCMD ("CORRELATIONS",           ERRO, ERRO, PROC, PROC, cmd_correlations)
46 UNIMPL ("COXREG",                 ERRO, ERRO, ERRO, ERRO)
47 DEFCMD ("COUNT",                  ERRO, INPU, TRAN, TRAN, cmd_count)
48 UNIMPL ("CREATE",                 ERRO, ERRO, ERRO, ERRO)
49 DEFCMD ("CROSSTABS",              ERRO, ERRO, PROC, PROC, cmd_crosstabs)
50 UNIMPL ("CURVEFIT",               ERRO, ERRO, ERRO, ERRO)
51 DEFCMD ("DATA LIST",              TRAN, INPU, TRAN, TRAN, cmd_data_list)
52 UNIMPL ("DATE",                   ERRO, ERRO, ERRO, ERRO)
53 DBGCMD ("DEBUG CASEFILE",         INIT, INPU, TRAN, PROC, cmd_debug_casefile)
54 DBGCMD ("DEBUG EVALUATE",         INIT, INPU, TRAN, PROC, cmd_debug_evaluate)
55 DBGCMD ("DEBUG MOMENTS",          INIT, INPU, TRAN, PROC, cmd_debug_moments)
56 DBGCMD ("DEBUG POOL",             INIT, INPU, TRAN, PROC, cmd_debug_pool)
57 UNIMPL ("DELETE VARIABLES",       ERRO, ERRO, ERRO, ERRO)
58 DEFCMD ("DESCRIPTIVES",           ERRO, ERRO, PROC, PROC, cmd_descriptives)
59 UNIMPL ("DISCRIMINANT",           ERRO, ERRO, ERRO, ERRO)
60 DEFCMD ("DISPLAY",                ERRO, INPU, TRAN, PROC, cmd_display)
61 SPCCMD ("DOCUMENT",               ERRO, INPU, TRAN, TRAN, cmd_document)
62 DEFCMD ("DO IF",                  ERRO, INPU, TRAN, TRAN, cmd_do_if)
63 DEFCMD ("DO REPEAT",              ERRO, INPU, TRAN, TRAN, cmd_do_repeat)
64 DEFCMD ("DROP DOCUMENTS",         INIT, INPU, TRAN, PROC, cmd_drop_documents)
65 UNIMPL ("EDIT",                   ERRO, ERRO, ERRO, ERRO)
66 DEFCMD ("ELSE",                   ERRO, INPU, TRAN, TRAN, cmd_else)
67 DEFCMD ("ELSE IF",                ERRO, INPU, TRAN, TRAN, cmd_else_if)
68 DEFCMD ("END CASE",               ERRO, INPU, ERRO, ERRO, cmd_end_case)
69 DEFCMD ("END FILE",               ERRO, INPU, ERRO, ERRO, cmd_end_file)
70 DEFCMD ("END FILE TYPE",          ERRO, TRAN, ERRO, ERRO, cmd_end_file_type)
71 DEFCMD ("END IF",                 ERRO, INPU, TRAN, TRAN, cmd_end_if)
72 DEFCMD ("END INPUT PROGRAM",      ERRO, TRAN, ERRO, ERRO, cmd_end_input_program)
73 DEFCMD ("END LOOP",               ERRO, INPU, TRAN, TRAN, cmd_end_loop)
74 DEFCMD ("END REPEAT",             ERRO, INPU, TRAN, TRAN, cmd_end_repeat)
75 DEFCMD ("ERASE",                  INIT, INPU, TRAN, PROC, cmd_erase)
76 DEFCMD ("EXAMINE",                ERRO, ERRO, PROC, PROC, cmd_examine)
77 DEFCMD ("EXECUTE",                ERRO, ERRO, PROC, PROC, cmd_execute)
78 DEFCMD ("EXIT",                   INIT, INPU, TRAN, PROC, cmd_exit)
79 DEFCMD ("EXPORT",                 ERRO, ERRO, PROC, PROC, cmd_export)
80 UNIMPL ("FACTOR",                 ERRO, ERRO, ERRO, ERRO)
81 DEFCMD ("FILE HANDLE",            INIT, INPU, TRAN, PROC, cmd_file_handle)
82 SPCCMD ("FILE LABEL",             INIT, INPU, TRAN, PROC, cmd_file_label)
83 DEFCMD ("FILE TYPE",              INPU, ERRO, INPU, INPU, cmd_file_type)
84 DEFCMD ("FILTER",                 ERRO, ERRO, TRAN, TRAN, cmd_filter)
85 DEFCMD ("FINISH",                 INIT, INPU, TRAN, PROC, cmd_finish)
86 UNIMPL ("FIT",                    ERRO, ERRO, ERRO, ERRO)
87 DEFCMD ("FLIP",                   ERRO, ERRO, PROC, PROC, cmd_flip)
88 DEFCMD ("FORMATS",                INIT, INPU, TRAN, PROC, cmd_formats)
89 DEFCMD ("FREQUENCIES",            ERRO, ERRO, PROC, PROC, cmd_frequencies)
90 UNIMPL ("GENLOG",                 ERRO, ERRO, ERRO, ERRO)
91 DEFCMD ("GET",                    TRAN, ERRO, TRAN, TRAN, cmd_get)
92 UNIMPL ("GET TRANSLATE",          ERRO, ERRO, ERRO, ERRO)
93 UNIMPL ("GLM",                    ERRO, ERRO, ERRO, ERRO)
94 UNIMPL ("GRAPH",                  ERRO, ERRO, ERRO, ERRO)
95 UNIMPL ("HILOGLINEAR",            ERRO, ERRO, ERRO, ERRO)
96 DEFCMD ("HOST",                   INIT, INPU, TRAN, PROC, cmd_host)
97 DEFCMD ("IF",                     ERRO, INPU, TRAN, TRAN, cmd_if)
98 UNIMPL ("IGRAPH",                 ERRO, ERRO, ERRO, ERRO)
99 DEFCMD ("IMPORT",                 TRAN, ERRO, TRAN, TRAN, cmd_import)
100 DEFCMD ("INCLUDE",                INIT, INPU, TRAN, PROC, cmd_include)
101 UNIMPL ("INFO",                   ERRO, ERRO, ERRO, ERRO)
102 UNIMPL ("INPUT MATRIX",           ERRO, ERRO, ERRO, ERRO)
103 DEFCMD ("INPUT PROGRAM",          INPU, ERRO, INPU, INPU, cmd_input_program)
104 UNIMPL ("KEYED DATA LIST",        ERRO, ERRO, ERRO, ERRO)
105 DEFCMD ("LEAVE",                  ERRO, INPU, TRAN, TRAN, cmd_leave)
106 DEFCMD ("LIST",                   ERRO, ERRO, PROC, PROC, cmd_list)
107 UNIMPL ("LOGLINEAR",              ERRO, ERRO, ERRO, ERRO)
108 UNIMPL ("LOGISITIC REGRESSION",   ERRO, ERRO, ERRO, ERRO)
109 DEFCMD ("LOOP",                   ERRO, INPU, TRAN, TRAN, cmd_loop)
110 DEFCMD ("MATCH FILES",            TRAN, ERRO, TRAN, PROC, cmd_match_files)
111 DEFCMD ("MATRIX DATA",            TRAN, ERRO, TRAN, TRAN, cmd_matrix_data)
112 UNIMPL ("MCONVERT",               ERRO, ERRO, ERRO, ERRO)
113 DEFCMD ("MEANS",                  ERRO, ERRO, PROC, PROC, cmd_means)
114 DEFCMD ("MISSING VALUES",         ERRO, INPU, TRAN, TRAN, cmd_missing_values)
115 DEFCMD ("MODIFY VARS",            ERRO, ERRO, TRAN, PROC, cmd_modify_vars)
116 UNIMPL ("MULT RESPONSE",          ERRO, ERRO, ERRO, ERRO)
117 UNIMPL ("MVA",                    ERRO, ERRO, ERRO, ERRO)
118 DEFCMD ("NEW FILE",               INIT, ERRO, INIT, INIT, cmd_new_file)
119 DEFCMD ("N",                      INIT, INPU, TRAN, TRAN, cmd_n_of_cases)
120 DEFCMD ("N OF CASES",             INIT, INPU, TRAN, TRAN, cmd_n_of_cases)
121 UNIMPL ("NLR",                    ERRO, ERRO, ERRO, ERRO)
122 UNIMPL ("NONPAR CORR",            ERRO, ERRO, ERRO, ERRO)
123 UNIMPL ("NPAR TESTS",             ERRO, ERRO, ERRO, ERRO)
124 UNIMPL ("NUMBERED",               ERRO, ERRO, ERRO, ERRO)
125 DEFCMD ("NUMERIC",                ERRO, INPU, TRAN, TRAN, cmd_numeric)
126 UNIMPL ("OLAP CUBES",             ERRO, ERRO, ERRO, ERRO)
127 UNIMPL ("OMS",                    ERRO, ERRO, ERRO, ERRO)
128 DEFCMD ("ONEWAY",                 ERRO, ERRO, PROC, PROC, cmd_oneway)
129 UNIMPL ("ORTHOPLAN",              ERRO, ERRO, ERRO, ERRO)
130 UNIMPL ("PACF",                   ERRO, ERRO, ERRO, ERRO)
131 UNIMPL ("PARTIAL CORR",           ERRO, ERRO, ERRO, ERRO)
132 DEFCMD ("PEARSON CORRELATIONS",   ERRO, ERRO, PROC, PROC, cmd_correlations)
133 DEFCMD ("PERMISSIONS",            INIT, INPU, TRAN, PROC, cmd_permissions)
134 UNIMPL ("PLOT",                   ERRO, ERRO, ERRO, ERRO)
135 UNIMPL ("POINT",                  ERRO, ERRO, ERRO, ERRO)
136 UNIMPL ("PPLOT",                  ERRO, ERRO, ERRO, ERRO)
137 UNIMPL ("PREDICT",                ERRO, ERRO, ERRO, ERRO)
138 UNIMPL ("PRESERVE",               ERRO, ERRO, ERRO, ERRO)
139 DEFCMD ("PRINT EJECT",            ERRO, INPU, TRAN, TRAN, cmd_print_eject)
140 DEFCMD ("PRINT",                  ERRO, INPU, TRAN, TRAN, cmd_print)
141 DEFCMD ("PRINT FORMATS",          ERRO, INPU, TRAN, TRAN, cmd_print_formats)
142 DEFCMD ("PRINT SPACE",            ERRO, INPU, TRAN, TRAN, cmd_print_space)
143 UNIMPL ("PROCEDURE OUTPUT",       ERRO, ERRO, ERRO, ERRO)
144 DEFCMD ("PROCESS IF",             ERRO, ERRO, TRAN, TRAN, cmd_process_if)
145 UNIMPL ("PROXIMITIES",            ERRO, ERRO, ERRO, ERRO)
146 DEFCMD ("Q",                      INIT, INPU, TRAN, PROC, cmd_exit)
147 UNIMPL ("QUICK CLUSTER",          ERRO, ERRO, ERRO, ERRO)
148 DEFCMD ("QUIT",                   INIT, INPU, TRAN, PROC, cmd_exit)
149 UNIMPL ("RANK",                   ERRO, ERRO, ERRO, ERRO)
150 DEFCMD ("RECODE",                 ERRO, INPU, TRAN, TRAN, cmd_recode)
151 DEFCMD ("RECORD TYPE",            ERRO, INPU, ERRO, ERRO, cmd_record_type)
152 UNIMPL ("REFORMAT",               ERRO, ERRO, ERRO, ERRO)
153 UNIMPL ("REGRESSION",             ERRO, ERRO, ERRO, ERRO)
154 DEFCMD ("RENAME VARIABLES",       ERRO, INPU, TRAN, PROC, cmd_rename_variables)
155 DEFCMD ("REPEATING DATA",         ERRO, INPU, ERRO, ERRO, cmd_repeating_data)
156 UNIMPL ("REPORT",                 ERRO, ERRO, ERRO, ERRO)
157 DEFCMD ("REREAD",                 ERRO, INPU, ERRO, ERRO, cmd_reread)
158 UNIMPL ("RESTORE",                ERRO, ERRO, ERRO, ERRO)
159 UNIMPL ("RMV",                    ERRO, ERRO, ERRO, ERRO)
160 DEFCMD ("SAMPLE",                 ERRO, ERRO, TRAN, TRAN, cmd_sample)
161 DEFCMD ("SAVE",                   ERRO, ERRO, PROC, PROC, cmd_save)
162 UNIMPL ("SAVE TRANSLATE",         ERRO, ERRO, ERRO, ERRO)
163 UNIMPL ("SCRIPT",                 ERRO, ERRO, ERRO, ERRO)
164 DEFCMD ("SELECT IF",              ERRO, ERRO, TRAN, TRAN, cmd_select_if)
165 DEFCMD ("SET",                    INIT, INPU, TRAN, PROC, cmd_set)
166 DEFCMD ("SHOW",                   INIT, INPU, TRAN, PROC, cmd_show)
167 DEFCMD ("SORT CASES",             ERRO, ERRO, PROC, PROC, cmd_sort_cases)
168 DEFCMD ("SORT",                   ERRO, ERRO, PROC, PROC, cmd_sort_cases)
169 UNIMPL ("SPCHART",                ERRO, ERRO, ERRO, ERRO)
170 DEFCMD ("SPLIT FILE",             ERRO, INPU, TRAN, TRAN, cmd_split_file)
171 DEFCMD ("STRING",                 ERRO, INPU, TRAN, TRAN, cmd_string)
172 SPCCMD ("SUBTITLE",               INIT, INPU, TRAN, PROC, cmd_subtitle)
173 UNIMPL ("SUMMARIZE",              ERRO, ERRO, ERRO, ERRO)
174 UNIMPL ("SURVIVAL",               ERRO, ERRO, ERRO, ERRO)
175 DEFCMD ("SYSFILE INFO",           INIT, INPU, TRAN, PROC, cmd_sysfile_info)
176 DEFCMD ("TEMPORARY",              ERRO, ERRO, TRAN, TRAN, cmd_temporary)
177 SPCCMD ("TITLE",                  INIT, INPU, TRAN, PROC, cmd_title)
178 UNIMPL ("TSET",                   ERRO, ERRO, ERRO, ERRO)
179 UNIMPL ("TSHOW",                  ERRO, ERRO, ERRO, ERRO)
180 UNIMPL ("TSPLOT",                 ERRO, ERRO, ERRO, ERRO)
181 DEFCMD ("T-TEST",                 ERRO, ERRO, PROC, PROC, cmd_t_test)
182 UNIMPL ("UNIANOVA",               ERRO, ERRO, ERRO, ERRO)
183 UNIMPL ("UNNUMBERED",             ERRO, ERRO, ERRO, ERRO)
184 UNIMPL ("UPDATE",                 ERRO, ERRO, ERRO, ERRO)
185 DEFCMD ("USE",                    ERRO, ERRO, TRAN, TRAN, cmd_use)
186 DEFCMD ("VALUE LABELS",           ERRO, INPU, TRAN, TRAN, cmd_value_labels)
187 DEFCMD ("VARIABLE ALIGNMENT",     ERRO, INPU, TRAN, TRAN, cmd_variable_alignment)
188 DEFCMD ("VARIABLE LABELS",        ERRO, INPU, TRAN, TRAN, cmd_variable_labels)
189 DEFCMD ("VARIABLE LEVEL",         ERRO, INPU, TRAN, TRAN, cmd_variable_level)
190 DEFCMD ("VARIABLE WIDTH",         ERRO, INPU, TRAN, TRAN, cmd_variable_width)
191 UNIMPL ("VARSTOCASES",            ERRO, ERRO, ERRO, ERRO)
192 DEFCMD ("VECTOR",                 ERRO, INPU, TRAN, TRAN, cmd_vector)
193 UNIMPL ("VERIFY",                 ERRO, ERRO, ERRO, ERRO)
194 DEFCMD ("WEIGHT",                 ERRO, INPU, TRAN, TRAN, cmd_weight)
195 DEFCMD ("WRITE",                  ERRO, INPU, TRAN, TRAN, cmd_write)
196 DEFCMD ("WRITE FORMATS",          ERRO, INPU, TRAN, TRAN, cmd_write_formats)
197 DEFCMD ("XSAVE",                  ERRO, INPU, TRAN, TRAN, cmd_xsave)