it really isn't worth fighting.

/n/dump/2009/1120/sys/src/cmd/yacc.c:1918,1933 - yacc.c:1918,1940
  
        /* i is the number of lines skipped */
        i = 0;
-       if(Bgetrune(finput) != '*')
-               error("illegal comment");
        c = Bgetrune(finput);
-       while(c != Beof) {
-               while(c == '*')
-                       if((c=Bgetrune(finput)) == '/')
-                               return i;
-               if(c == '\n')
-                       i++;
+       if(c == '/'){
+               while((c = Bgetrune(finput)) != Beof)
+                       if(c == '\n')
+                               return 1;
+       }else{
+               if(c != '*')
+                       error("illegal comment");
                c = Bgetrune(finput);
+               while(c != Beof) {
+                       while(c == '*')
+                               if((c=Bgetrune(finput)) == '/')
+                                       return i;
+                       if(c == '\n')
+                               i++;
+                       c = Bgetrune(finput);
+               }
        }
        error("EOF inside comment");
        return 0;

and for 8a

/n/dump/2009/1120/sys/src/cmd/cc/lexbody:418,425 - 
/sys/src/cmd/cc/lexbody:418,424
                        for(;;) {
                                c = GETC();
                                if(c == '\n') {
-                                       lineno++;
-                                       goto l0;
+                                       goto l1;                /* return ; for 
?a's benefit. */
                                }
                                if(c == EOF) {
                                        yyerror("eof in comment");

- erik

Reply via email to