3 # Copyright © 2020 Nick Bowler
5 # Fake flex program for testing the flex detection macro.
7 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
8 # This is free software: you are free to do what the fuck you want to.
9 # There is NO WARRANTY, to the extent permitted by law.
11 : "${FAKE_FLEX_VERSION=2.0.0}"
22 -o) outfile
=$1; shift ;;
23 *) set x
"$@" "$arg"; shift ;;
34 if test x
"$infile" = x
""; then
35 printf '%s: error: no input file\n' "$argv0" 1>&2
40 exec 3<"$infile" 4>"$outfile"
43 set x
$FAKE_FLEX_VERSION 0 0 0; shift
48 #define YY_FLEX_MAJOR_VERSION $1
49 #define YY_FLEX_MINOR_VERSION $2
50 #define YY_FLEX_SUBMINOR_VERSION $3
53 while read line
<&3; do
58 *) $copyout && printf '%s\n' "$line" >&4 ;;
69 while read line
<&3; do