1#!/bin/sh
2
3# This wrappers allows to deals build system calling bison with certain long option
4# and messing with arguments orders
5
6case " $@ " in
7*" --version "*) echo "bison (GNU bison 3.5.2)" ; exit 0 ;;
8esac
9
10for arg; do
11	case "$arg" in
12	*.y) inputfile="$arg" ;;
13	--verbose|-v) ;; # ignore
14	*) args="$args $arg" ;;
15	esac
16done
17exec byacc $args $inputfile
18