]> git.saurik.com Git - bison.git/commitdiff
"," now elicits a warning, rather than being
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 29 Nov 2002 08:44:40 +0000 (08:44 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 29 Nov 2002 08:44:40 +0000 (08:44 +0000)
a token; this is more compatible with byacc.

src/scan-gram.l

index b7d8b509c650947217cfaf3b3c47c0be98ced8e5..2ed043f07aab242127032c884a77c6e73bfd6a93 100644 (file)
@@ -266,11 +266,15 @@ splice     (\\[ \f\t\v]*\n)*
   "="                     return EQUAL;
   ":"                     rule_length = 0; return COLON;
   "|"                     rule_length = 0; return PIPE;
-  ","                     return COMMA;
   ";"                     return SEMICOLON;
 
   [ \f\n\t\v]  STEP;
 
+  "," {
+    warn_at (*loc, _("stray `,' treated as white space"));
+    STEP;
+  }
+
   {id}        {
     val->symbol = symbol_get (yytext, *loc);
     rule_length++;