Menu

Calling bison from Borland Builder C++ 6

Help
2005-01-14
2012-07-26
  • bitminer49er

    bitminer49er - 2005-01-14

    I attempted to call bison from Builder Builder C++ 6 by adding bison to the list of borland build tools (Tools->build tools - for thoes who use Borland).

    Below are the options I used for hooking in bison:

    Title=bison
    Default Extensions=*.y
    OtherExtensions=
    Target Extensions=tab.c
    Command Line=$SAVE c:\gnuwin32\bin\bison -d $PATH\$NAME
    Filter=<None>

    Now this orignaly did not work (and still does not work fully). I then added to the Borland Environment variables (Tools->Environment Optoins->Environment Variables) PATH=C:\GnuWin32\bin;%PATH% (I also tried $PATH as this is how borland expands macros-neiter worked) where bison resides. This helped bison get a little furtur until it could'nt find M4 as bison seems to shell out to M4 (why? - why is this not a standalone app - I looked thorugh the code and can see some of the logic (in off loading work to m4) at least until I remembered that this is why borland can not call it).

    By using the Environment path trick i can get bison to work but then borland cant find

    With environment var not set I get:
    [Fatal Error] c:\gnuwin32\bin\bison: m4: No such file or direcotry

    With it set to PATH=C:\gnuwin32\bin;%PATH% I get:
    Cannot find Borlandmm.dll (as though the %PATH% is not working)

    How do I use this tool from other tools? Is this possible?

    I also am trying to port this to Borland Builder 6. Does this seem possible? If I get it working is it something that can be added to the project (a borland build and project files)?

    Is it possible to make bison and flex standalone?

    I have long been in search of a decent bison and flex port to Win32.

    Brian

     
    • GnuWin

      GnuWin - 2005-01-18

      Some work is delegated to M4, simply because that's the way Bison has been designed since 1.875.

      M4 is provided with Bison. If you put it in the same folder as Bison, Bison should be able to find it. I don't know much about Borland, so I cannot tell why bison halts when called from Borland.

      It should not be too difficult to compile your own Bison with Borland, since its code is fairly standard C. Perhaps you may be forced to provide dummies for some Unix functions that do not exist in msvcrt.dll. Also, you must find some way to circumvent fork by using spawn (or use the patches provided with the sources on GnuWin32).

       
    • bitminer49er

      bitminer49er - 2005-01-20

      I have posted this same messgage at Borland Developers Network (BDN) borland.public.cppbuilder.ide in hopes it is simply a miss configuration on my part. I will post the results of that here.

       
MongoDB Logo MongoDB