From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sat, 23 Jul 2011 05:14:07 -0400 To: 9fans@9fans.net Message-ID: In-Reply-To: <20110722194224.33472B827@mail.bitblocks.com> References: <201107220536.p6M5agtv019617@freefriends.org> <20110722130310.GO1803@fangle.proxima.alt.za> <2f6021d419a7327afa4134cda0e6c88f@ladd.quanstro.net> <20110722153731.GQ1803@fangle.proxima.alt.za> <20110722171320.50A9CB827@mail.bitblocks.com> <20110722183802.60C66B827@mail.bitblocks.com> <20110722185545.87D40B852@mail.bitblocks.com> <20110722194224.33472B827@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Plan 9 Go (Was: GNU/Linux/Plan 9 disto) Topicbox-Message-UUID: 05b3cd58-ead7-11e9-9d60-3106f5b1d025 in double-checking this patch, i found that // comments are already used in cc.y. the difference in output between the old yacc and the new version is amusing. yacc doesn't see the comment and translates $n in the comments. - erik ---- in cpyact() replace case '/' with case '/': /* look for comments; sync with skipcom() */ Bputrune(faction, c); c = Bgetrune(finput); switch(c){ default: goto lcopy; case '/': Bputrune(faction, c); while((c = Bgetrune(finput)) != Beof){ Bputrune(faction, c); if(c == '\n'){ lineno++; goto loop; } } break; case '*': Bputrune(faction, c); match = 0; while((c = Bgetrune(finput)) != Beof){ Bputrune(faction, c); if(c == '\n') lineno++; if(match && c == '/') goto loop; match = c == '*'; } break; case Beof: break; } error("EOF inside comment");