]> git.saurik.com Git - bison.git/commitdiff
(<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 30 Dec 2002 23:38:20 +0000 (23:38 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 30 Dec 2002 23:38:20 +0000 (23:38 +0000)
Moved here from...
(<INITIAL>","): Here.  This causes stray "," to be treated
more uniformly.

src/scan-gram.l

index 502fabaabaf91182f9b5b153f84e40504a6b6c92..a1fbac5ea7c65a47803a46bfaff87991d8c9e951 100644 (file)
@@ -154,10 +154,15 @@ splice     (\\[ \f\t\v]*\n)*
 <INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>
 {
   [ \f\n\t\v]  ;
 <INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>
 {
   [ \f\n\t\v]  ;
+  ","         warn_at (*loc, _("stray `,' treated as white space"));
 
   /* Comments. */
 
   /* Comments. */
-  "/*"         token_start = loc->start; context_state = YY_START; BEGIN SC_YACC_COMMENT;
   "//".*       ;
   "//".*       ;
+  "/*" {
+    token_start = loc->start;
+    context_state = YY_START;
+    BEGIN SC_YACC_COMMENT;
+  }
 
   /* #line directives are not documented, and may be withdrawn or
      modified in future versions of Bison.  */
 
   /* #line directives are not documented, and may be withdrawn or
      modified in future versions of Bison.  */
@@ -215,10 +220,6 @@ splice      (\\[ \f\t\v]*\n)*
   "|"                     rule_length = 0; return PIPE;
   ";"                     return SEMICOLON;
 
   "|"                     rule_length = 0; return PIPE;
   ";"                     return SEMICOLON;
 
-  "," {
-    warn_at (*loc, _("stray `,' treated as white space"));
-  }
-
   {id} {
     val->symbol = symbol_get (yytext, *loc);
     id_loc = *loc;
   {id} {
     val->symbol = symbol_get (yytext, *loc);
     id_loc = *loc;