[Win32utils-devel] [OT] Byacc error

Heesob Park phasis at gmail.com
Thu Jun 26 11:05:27 EDT 2008


2008/6/26 Berger, Daniel <Daniel.Berger at qwest.com>:
>
>
>> -----Original Message-----
>> From: win32utils-devel-bounces at rubyforge.org
>> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of
>> Heesob Park
>> Sent: Wednesday, June 25, 2008 7:07 PM
>> To: Development and ideas for win32utils projects
>> Subject: Re: [Win32utils-devel] [OT] Byacc error
>>
>> Hi,
>>
>> 2008/6/26 Berger, Daniel <Daniel.Berger at qwest.com>:
>> > Hi all,
>> >
>> > Yeah, I'm going OT here...
>> >
>> > I'm not entirely sure I understand how Ruby builds parse.y
>> on Windows,
>> > but it works. However, when I changed all instances of "Ruby" to
>> > "Sapphire", and renamed all the source files, I suddenly started
>> > getting this error:
>> >
>> > byacc  ./parse.y
>> > 'byacc' is not recognized as an internal or external
>> command, operable
>> > program or batch file.
>> > NMAKE : fatal error U1077: 'byacc' : return code '0x1'
>> > Stop.
>> >
>> > Does anyone have any idea what would cause that?
>> >
>> >
>> It is due to the time discrepancy of parse.y and parse.c.
>> As far as I know, the Ruby source distribution comes with
>> parse.y and parse.c for the lacking of yacc of windows.
>>
>> You can find following lines in win32/Makefile.sub
>>
>> {$(srcdir)}.y.c:
>>       $(YACC) $(YFLAGS) $(<:\=/)
>>       sed -e "s!^ *extern char \*getenv();!/* &
>> */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $@
>>       @del y.tab.c
>>
>> I guess if you make both parse.y and parse.c same file time,
>> it will skip byacc.
>
> Yes, that worked, thanks!
>
>> If you would like to build with byacc, you can install byacc.
>> Refer to http://gnuwin32.sourceforge.net/packages/byacc.htm
>
> I've never tried it. Do you think there's any advantage to doing so?
>
Except for the case of changing grammer or parsing rule, you have no advantage.

Regards,

Park Heesob


More information about the win32utils-devel mailing list