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
I used Brew and installed the package. However, this does not update the location of bison. I still see bison 2.3 instead of 2.5.
Then, I found that the location of new bison is different.
bash-3.2$ echo $PATH
/opt/local/bin:/opt/local/sbin:/Users/taposh/anaconda/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/m4/bin/
bash-3.2$ PATH=/usr/local/bison/bin/:$PATH
bash-3.2$ which bison
/usr/local/bison/bin//bison
bash-3.2$ bison --version
bison (GNU Bison) 2.5
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.