type = COMB_TABLE;
table_idx = MIN (table_idx, proc.n_files);
}
+ else if (!proc.n_files)
+ {
+ lex_error_expecting (lexer, "FILE", "TABLE");
+ goto error;
+ }
else
break;
lex_match (lexer, T_EQUALS);
MATCH FILES/FILE='x.sav'/FILE=*/RENAME(name=name2)/FIRST=x.
MATCH FILES/FILE='x.sav'/FILE=*/RENAME(name=name2)/LAST=x.
MATCH FILES/FILE='x.sav'/FILE=*/RENAME(name=name2)/IN=x.
+MATCH FILES/KEEP=**.
])
AT_CHECK([pspp --testing-mode -O format=csv insert.sps], [1], [dnl
"match-files.sps:1.18: error: MATCH FILES: Cannot specify the active dataset since none has been defined.
"match-files.sps:39.55: error: MATCH FILES: Variable name x specified on IN subcommand duplicates an existing variable name.
39 | MATCH FILES/FILE='x.sav'/FILE=*/RENAME(name=name2)/IN=x.
| ^"
+
+"match-files.sps:40.13-40.16: error: MATCH FILES: Syntax error expecting FILE or TABLE.
+ 40 | MATCH FILES/KEEP=**.
+ | ^~~~"
])
AT_CLEANUP
15 | UPDATE/FILE='x.sav'/FILE=*/RENAME(name=name2).
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
-"update.sps:16.8-16.12: error: UPDATE: Syntax error expecting BY, MAP, DROP, or KEEP.
+"update.sps:16.8-16.12: error: UPDATE: Syntax error expecting FILE or TABLE.
16 | UPDATE/xyzzy.
| ^~~~~"
])