Xref: news2.mv.net comp.os.msdos.djgpp:3027 From: Denis Bernard Newsgroups: comp.os.msdos.djgpp Subject: Re: YACC and BISON in DJGPP 2.0 Date: Tue, 23 Apr 1996 12:02:20 -0400 Organization: Teleglobe Canada Inc. Lines: 56 Message-ID: <317CFF0C.15D5@teleglobe.ca> References: <199604221605 DOT JAA01502 AT nic DOT cerf DOT net> NNTP-Posting-Host: bnet-gw.teleglobe.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp ACTA Inc wrote: > > Hi, > > Thank you for your replay to my previous query about the YACC > "feature" in DJGPP. > > Almost every one suggested BISON. > > So I tried BISON. But I still have difficulties to compile my > program with Bison. > > According to the O'Reily' s book on YACC and LEX, bison produce a > filename.tab.c file unlike YACC which produces a > y.tab.c file. I noticed that in DJGPP 2.0, the bison generates a file > filename_tab.c after I run bison -y -d filename.y. > > For my particular case, my YACC file name is grammar.y, and the > bison in DJGPP 2.0 produce a file called "grammar_.c" if I just type "bison > -y -d grammar.y ". There is no any error message. > > Yet if I directly use makefile, I noticed that bison generates a > y_tab.c and y_tab.h, and the make process determined with > an error of " ***[grammar.y] error -1" at line "mv -f y_tab.c grammar.c" > > What I have done wrong ? > > The differences between my unix version and DJGPP version are the > file names, which appears in both makefile and > the ".c" files due to the change of the name of header files. > > Thanks for your help. > > > ACTA Inc. > 23430 Hawthorne Blvd. > Skypark Bldg. #3, Suite #300 > Torrance, CA. 90505 > (310) 378-6254 Business > (310) 375-0663 Fax > (310) 375-8023 Modem > > * Please include addressee's name in subject field > when responding. bison generates things this way... bison -d file.y produces file_tab.c and file_tab.h and bison -y -d file.y produces y_tab.c and y_tab.h So it's up to you to use the -y switch or not. Denis.