Check the return value of various calls to lex_force_match.
[pspp] / src / language / stats / means.c
index f1726b9af1aef0d02773ea7aa32726aafd4569f4..4d5d83fa92aa71104844cfc2f8a8b865227ec543 100644 (file)
@@ -597,7 +597,8 @@ cmd_means (struct lexer *lexer, struct dataset *ds)
   /*   Optional TABLES =   */
   if (lex_match_id (lexer, "TABLES"))
     {
-      lex_force_match (lexer, T_EQUALS);
+      if (! lex_force_match (lexer, T_EQUALS))
+       goto error;
     }
 
 
@@ -621,7 +622,7 @@ cmd_means (struct lexer *lexer, struct dataset *ds)
          if (lex_is_variable (lexer, means.dict, 1) )
            {
              more_tables = true;
-             lex_force_match (lexer, T_SLASH);
+             lex_match (lexer, T_SLASH);
            }
        }
     }