| | 99 | if ! which flex >/dev/null 2>&1; then |
|---|
| | 100 | echo You must install flex to continue. |
|---|
| | 101 | exit 1 |
|---|
| | 102 | fi |
|---|
| | 103 | |
|---|
| | 104 | if ! which bison >/dev/null 2>&1; then |
|---|
| | 105 | echo You must install GNU Bison to continue. |
|---|
| | 106 | echo While you can install any version, it is '*STRONGLY*' suggested |
|---|
| | 107 | echo to install GNU Bison version 2.3 because of its bug fixes. |
|---|
| | 108 | exit 1 |
|---|
| | 109 | fi |
|---|
| | 110 | X=$(bison --version 2>&1 | fgrep 'GNU Bison' | sed 's/^[^0-9]*//') |
|---|
| | 111 | V=old |
|---|
| | 112 | if [[ $X = +([0-9]).+([0-9]) ]]; then |
|---|
| | 113 | let major=${X%.*} |
|---|
| | 114 | let minor=${X#*.} |
|---|
| | 115 | if (( (major > 2) || ((major == 2) && (minor >= 3)) )); then |
|---|
| | 116 | V=new |
|---|
| | 117 | fi |
|---|
| | 118 | fi |
|---|
| | 119 | if [[ $V = old ]]; then |
|---|
| | 120 | echo It is suggested to upgrade your copy of bison to |
|---|
| | 121 | echo GNU Bison 2.3 because of its bug fixes. |
|---|
| | 122 | fi |
|---|
| | 123 | |
|---|