GNU bison
1.1、GNU bison简介
是什么 ?:yacc-compatible parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.
开发语言:C
官方主页:http://www.gnu.org/software/bison
1.2、通过包管理器安装GNU bison
操作系统包管理器安装命令
Windowsscoppscopp install winflexbison
WindowsChocolateychoco install -y winflexbison
macOSHomeBrewbrew install bison
GNU/LinuxLinuxBrewbrew install bison
aptsudo apt-get install -y bison
CentOSyumsudo yum install -y bison
dnfsudo dnf install -y bison
openSUSEzyppersudo zypper install -y bison
Alpine Linuxapksudo apk add bison

Arch Linux

ArcoLinux

Manjaro Linux

pacmansudo pacman -Syyu --noconfirm
sudo pacman -S    --noconfirm bison
Gentoo LinuxPortagesudo emerge bison
1.3、通过编译源码安装GNU bison 

step1、安装依赖

下载时cURL
解压时tarxz
编译时POSIX shGNU CoreUtilsGNU makeGCC ( gcc )   | LLVM / ClangGNU m4PerlToolSet
运行时glibc ( libc.sold-linux-x86-64.so )

step2、使用curl命令下载bison源码包 (

curl -LO https://mirrors.tuna.tsinghua.edu.cn/gnu/bison/bison-3.4.tar.xz

step3、使用tar解压bison源码包

tar vxf bison-3.4.tar.xz

step4、进入bison-3.4目录,并查看它的内容

step5、配置、编译、安装

./configure && make && sudo make install
1.4、bison命令
1.5、yacc命令