Fixed some bugs related to empty parentheses
[pspp] / src / language / stats / reliability.c
index 8975e4f9082d780bc18704a55ffccfba7ac6ca61..90baa51fe2b861539291996bb6286858150b4232 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011, 2013, 2015 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -229,9 +229,9 @@ cmd_reliability (struct lexer *lexer, struct dataset *ds)
              reliability.model = MODEL_SPLIT;
              reliability.split_point = -1;
 
-             if ( lex_match (lexer, T_LPAREN))
+             if ( lex_match (lexer, T_LPAREN)
+                  && lex_force_num (lexer))
                {
-                 lex_force_num (lexer);
                  reliability.split_point = lex_number (lexer);
                  lex_get (lexer);
                  lex_force_match (lexer, T_RPAREN);
@@ -274,6 +274,14 @@ cmd_reliability (struct lexer *lexer, struct dataset *ds)
                }
            }
        }
+      else if (lex_match_id (lexer, "STATISTICS"))
+        {
+          lex_match (lexer, T_EQUALS);
+          msg (SW, _("The STATISTICS subcommand is not yet implemented.  "
+                     "No statistics will be produced."));
+          while (lex_match (lexer, T_ID))
+            continue;
+        }
       else
        {
          lex_error (lexer, NULL);