]> git.saurik.com Git - bison.git/blobdiff - src/output.c
Fix a --enable-gcc-warnings problem.
[bison.git] / src / output.c
index f72514733b41bbeb35ad697900575353b619ba82..d5e30b8a5da9d033d7de924483f0b798e76d7916 100644 (file)
@@ -1,7 +1,7 @@
 /* Output the generated parsing program for Bison.
 
    Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -363,9 +363,11 @@ token_definitions_output (FILE *out)
       if (sym->tag[0] == '\'' || sym->tag[0] == '\"')
        continue;
 
-      /* Don't #define nonliteral tokens whose names contain periods
-        or '$' (as does the default value of the EOF token).  */
-      if (strchr (sym->tag, '.') || strchr (sym->tag, '$'))
+      /* Don't #define nonliteral tokens whose names contain periods,
+         dashes or '$' (as does the default value of the EOF token).  */
+      if (strchr (sym->tag, '.')
+          || strchr (sym->tag, '-')
+          || strchr (sym->tag, '$'))
        continue;
 
       fprintf (out, "%s[[[%s]], %d]",