The version of GNU Bison on my mac is 2.3 but I know that Bison 2.5 was released long ago. The book Flex & Bison uses version 2.5.
Should I upgrade to 2.5 myself? Is it necessary?
What's the difference between 2.3 and 2.5?
The version of GNU Bison on my mac is 2.3 but I know that Bison 2.5 was released long ago. The book Flex & Bison uses version 2.5.
Should I upgrade to 2.5 myself? Is it necessary?
What's the difference between 2.3 and 2.5?
If you use Brew:
brew tap homebrew/dupes && brew install bison
If you use MacPorts:
sudo port install bison
If you use Fink, they're still on 2.3, just like Apple, so you'll have to edit the package yourself.
If you know how to install Unix software, download it, untar, then configure/make/install as usual.
If all of the above are Greek to you, look at http://mxcl.github.com/homebrew/ and http://macports.org and decide which one looks friendlier to you.
I had the same issue MacOSX 10.9.5.
After doing:
brew install bison
I added this to my bash profile:
export PATH=/usr/local/Cellar/bison/3.0.4/bin:$PATH
(by the time you read this, your version may be different from 3.0.4)
And after I restarted the Terminal it picked up the new version of Bison when I did bison -V
you can install a new version with homebrew:
$ brew install bison
...
This formula is keg-only, which means it was not symlinked into /usr/local.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
Some formulae require a newer version of bison.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/bison/lib
==> Summary