bison 358 B

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