Mail Archives: djgpp/1996/04/23/20:36:08
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.
- Raw text -