variable-parser: Rewrite parse_DATA_LIST_vars().
[pspp] / src / language / lexer / q2c.c
index cf5a04ee132c6df3449cccc4da8d86c1239a07e1..4858a25706133a5303b48b8b5184ca2dc2b1804a 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2008, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2008, 2010, 2011 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
@@ -1422,12 +1422,14 @@ make_match (const char *t)
            "|| lex_match_id (lexer, \"FALSE\"))");
   else if (isdigit ((unsigned char) t[0]))
     sprintf (s, "lex_match_int (lexer, %s)", t);
-  else
+  else if (strchr (t, hyphen_proxy))
     {
       char *c = unmunge (t);
       sprintf (s, "lex_match_hyphenated_word (lexer, \"%s\")", c);
       free (c);
     }
+  else
+    sprintf (s, "lex_match_id (lexer, \"%s\")", t);
 
   return s;
 }
@@ -1496,7 +1498,7 @@ dump_specifier_parse (const specifier *spec, const subcommand *sbc)
                }
              else
                {
-                 dump (1, "if (!lex_match (lexer, T_RPAREN))");
+                 dump (1, "if (!lex_match (lexer, T_LPAREN))");
                  dump (1, "{");
                  dump (0, "msg (SE, _(\"`(' expected after %s "
                        "specifier of %s subcommand.\"));",