X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fsort-variables.c;h=d30629feb0b7aa8c47837d5a5794e8c153405e91;hb=33f2a20744e97951032b729b3d98b611b071371f;hp=aee341bda61770f633964c1ab493960c0366ed4a;hpb=21f0bd4ca4ddf7b39a0bed6f5bd9c2fb649f0f99;p=pspp diff --git a/src/language/dictionary/sort-variables.c b/src/language/dictionary/sort-variables.c index aee341bda6..d30629feb0 100644 --- a/src/language/dictionary/sort-variables.c +++ b/src/language/dictionary/sort-variables.c @@ -240,6 +240,13 @@ cmd_sort_variables (struct lexer *lexer, struct dataset *ds) c.attr_name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); } + else + { + lex_error_expecting (lexer, "NAME", "TYPE", "FORMAT", "LABEL", + "VALUES", "MISSING", "MEASURE", "ROLE", + "COLUMNS", "ALIGNMENT", "ATTRIBUTE"); + return CMD_FAILURE; + } /* Parse sort direction. */ if (lex_match (lexer, T_LPAREN)) @@ -250,7 +257,7 @@ cmd_sort_variables (struct lexer *lexer, struct dataset *ds) c.descending = true; else { - lex_error (lexer, NULL); + lex_error_expecting (lexer, "A", "D"); goto exit; } if (!lex_force_match (lexer, T_RPAREN))