Xref: utzoo comp.lang.c++:8810 gnu.g++:1016 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!usc!orion.oac.uci.edu!eapu034 From: eapu034@orion.oac.uci.edu (Carl F. Edman) Newsgroups: comp.lang.c++,gnu.g++ Subject: Re: yacc/lex experience... Message-ID: <26BCDE8F.18823@orion.oac.uci.edu> Date: 6 Aug 90 03:05:51 GMT References: <3006@zipeecs.umich.edu> Reply-To: eapu034@orion.oac.uci.edu (Carl F. Edman) Organization: University of California, Irvine Lines: 28 In article <3006@zipeecs.umich.edu> bagchi@dip.eecs.umich.edu (Ranjan Bagchi) writes: > > Does anyone have any experience with using yacc & lex in >conjunction with c++/g++? I've got a yyparse function which I would >like to make a member function of class say...foo. > I'm assuming that everything could be done with a sed script, but >I really don't know about all the functions which need name-changes. > > again...calling upon the knowledge banks ofthe net... > > -rj > bagchi@eecs.umich.edu Not exactly, but using g++ 1.37.1 and bison 1.11, I was able to modify the bison.simple/hairy files so that they compile without errors under g++. Really not very difficult and even when you make the change 2 warning messages remain which indicate that labels are defined but not used (You really should be able to turn of these labels.). Possibly not the most elegant solution, but , I assure you, quite workable. If you don't want to go to the trouble and do the modifications yourself, drop me a line (at the address in the signature, please) and I can send/ftp the changed files to you. Carl Edman Theorectial Physicist,N.:A physicist whose | Send mail existence is postulated, to make the numbers | to balance but who is never actually observed | cedman@golem.ps.uci.edu in the laboratory. | eapu034@orion.oac.uci.edu