}
else if (lex_match_id (lexer, "CI"))
{
- lex_force_match (lexer, T_LPAREN);
- lex_force_num (lexer);
+ if (!lex_force_match (lexer, T_LPAREN))
+ goto error;
+ if (! lex_force_num (lexer))
+ goto error;
roc.ci = lex_number (lexer);
lex_get (lexer);
- lex_force_match (lexer, T_RPAREN);
+ if (!lex_force_match (lexer, T_RPAREN))
+ goto error;
}
else if (lex_match_id (lexer, "DISTRIBUTION"))
{
- lex_force_match (lexer, T_LPAREN);
+ if (!lex_force_match (lexer, T_LPAREN))
+ goto error;
if (lex_match_id (lexer, "FREE"))
{
roc.bi_neg_exp = false;
lex_error (lexer, NULL);
goto error;
}
- lex_force_match (lexer, T_RPAREN);
+ if (!lex_force_match (lexer, T_RPAREN))
+ goto error;
}
else
{
AT_CHECK([pspp -o pspp.csv roc.sps], [1], [ignore])
AT_CLEANUP
+
+
+AT_SETUP([ROC crash on invalid syntax])
+AT_DATA([roc.sps], [dnl
+data list notable list /x * y * a *.
+bggin data.
+1 1 2
+1 2 28
+end data.
+
+
+roc x y by a (1)
+ /criteria = ci(y5)
+])
+
+AT_CHECK([pspp -O format=csv roc.sps], [1], [ignore])
+
+AT_CLEANUP