From mboxrd@z Thu Jan 1 00:00:00 1970 To: lucio@proxima.alt.za, Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Fri, 22 Jul 2011 17:37:32 +0200." <20110722153731.GQ1803@fangle.proxima.alt.za> References: <201107220536.p6M5agtv019617@freefriends.org> <20110722130310.GO1803@fangle.proxima.alt.za> <2f6021d419a7327afa4134cda0e6c88f@ladd.quanstro.net> <20110722153731.GQ1803@fangle.proxima.alt.za> Date: Fri, 22 Jul 2011 10:13:20 -0700 From: Bakul Shah Message-Id: <20110722171320.50A9CB827@mail.bitblocks.com> Subject: Re: [9fans] Plan 9 Go (Was: GNU/Linux/Plan 9 disto) Topicbox-Message-UUID: 04bf2488-ead7-11e9-9d60-3106f5b1d025 On Fri, 22 Jul 2011 17:37:32 +0200 Lucio De Re wrote: > But until I clear my slate of a number of distractions, I can only ask > more knowledgeable persons to look at the code and make suggestions to > the Go Authors, directly or through my submissions to CodeReview, on > how to eliminate Bison dependencies that make porting the Go code base > to Plan 9 difficult. Or help me deal with these problems in a manner > that can be incorporated into the Go release. go is too big and changes too fast so rather than try bend it in the plan9 direction, my advice is to make *no* changes to the go sources. Just use sed / ed scripts & patch to modify what you need to during a build, and add some plan9 specific files/scripts -- this is approach b) from my previous email -- usually what is done in *BSD ports. This can get a port up quickly. You may still want to feed back changes to the authors but this usually involves lengthy interactions and is best done in background mode. More specifically 1. comment out %error-version 2. fix plan9 yacc to handle apostrophes in // comments because that is a bug. Alternatively sed 's,//.*,/* & */,' 3. if you find any other bison dependency, work around. 4. avoid porting bison! I commented out %error-version and removed apostrophes in // comments in go.y and now the plan9 yacc handles the syntax fine. Trying all.bash with yacc, I see that the output of awk script "bisonerrors" fails. I don't have a great desire to port go to plan9 so I stopped here but you can checkout what is done here in the 9front port and/or compare bison y.output.c with yacc y.output.c because y.output.c is what bisonerrors munges. My guess is you will need a more or less equivalent yaccerrors script. As Steve says you won't get nicer error handling but so it goes.