lexer: New function lex_force_match_phrase().
[pspp] / src / language / stats / npar.c
index 5dabe25a16d6802a76720699e75328d1a9fb3d29..713c543d08e3f4e5ea3aec0b22a20a57e17e049f 100644 (file)
@@ -423,8 +423,7 @@ npar_runs (struct lexer *lexer, struct dataset *ds,
       return false;
     }
 
-  if (!lex_force_match (lexer, T_RPAREN)
-      || !lex_force_match (lexer, T_EQUALS))
+  if (!lex_force_match_phrase (lexer, ")="))
     return false;
 
   if (!parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds),
@@ -756,8 +755,7 @@ parse_two_sample_related_test (struct lexer *lexer,
 
       if (lex_match (lexer, T_LPAREN))
         {
-          if (!lex_force_match_id (lexer, "PAIRED")
-              || !lex_force_match (lexer, T_RPAREN))
+          if (!lex_force_match_phrase (lexer, "PAIRED)"))
             return false;
           paired = true;