Bison looking for bison.simple on Windows

July 27th, 2007 at 6:54 am

Bison is the GNU version of the venerable compiler generator YACC. It is available for Windows as part of the gnuwin32 port. However, when you run it, you might get this warning:

bison: /usr/local/share/bison.simple: No such file or directory

This is the default location for Bison to look for its skeleton parser code bison.simple, but such a directory obviously doesn’t exist on Windows machines (unless you run Bison inside Cygwin, but that’s a different story). To make it work, you should set the BISON_SIMPLE environment variable to your copy of bison.simple

Here is an example from a makefile:


YACC = bison -d

calc_parser: calc.y
    set BISON_SIMPLE=../bison.simple
    $(YACC) -o calc.tab.c calc.y

Related posts:

  1. Setting up an initialization file for CLISP on Windows
  2. Windows automation with AutoHotKey
  3. Non-blocking socket access on Windows
  4. parser hacking

Leave a Reply

To post code with preserved formatting, enclose it in `backticks` (even multiple lines)