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 m
Because bison was been installed,the default version on osx is 2.3. So we should do something as follow:
Install a higher version os bison
If you use Brew, try to use this command--brew install bison, it will install bison 3.0.2. The binary package is under /usr/local/Cellar/bison/3.0.4/bin/ in my computer.
Or you can install bison through source code, follow instructions on offical website http://www.gnu.org/software/bison/.
Replace the old one(you need sudo or root permission)
$ which bison --- find the installed path,in my computer it's /usr/bin/bison
$ cd /usr/bin
$ sudo mv bison bison.2.3
$ sudo cp /usr/local/Cellar/bison/3.0.4/bin/bison bison
Then you can install thrift without this problem.