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

前端 未结 7 773
孤街浪徒
孤街浪徒 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 04:15

    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.
    
    0 讨论(0)
提交回复
热议问题