Why does my Mac (OS X 10.7.3) have an old version (2.3) of Gnu Bison?

前端 未结 7 769
孤街浪徒
孤街浪徒 2021-02-14 03:15

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

7条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-14 03:49

    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

提交回复
热议问题