Lines Matching refs:lex
5 # Script to run Lex/Flex.
7 # means that neither Flex nor Lex was found, so we report an error and
18 echo "Usage: runlex <lex/flex command to run> [ arguments ]" 1>&2
21 LEX="$1"
25 # Check whether we have Lex or Flex.
27 if [ -z "${LEX}" ]
29 echo "Neither lex nor flex was found" 1>&2
35 # embed complete knowledge of what options are supported by Lex/Flex.
38 outfile=lex.yy.c
68 # Is it Lex, or is it Flex?
70 if [ "${LEX}" = flex ]
103 # It's Lex.
110 # If it's lex, it doesn't support -o, so we just write to
111 # lex.yy.c and, if it succeeds, rename it to the right name,
112 # otherwise we remove lex.yy.c.
114 # write to lex.yy.c, it writes to a lex.{prefix from -P}.c.
118 ${LEX} $flags -o"$outfile" "$@"
163 ${LEX} $flags "$@"
172 # No. Get rid of any lex.yy.c file we generated, and
175 rm -f lex.yy.c
180 # OK, rename lex.yy.c to the right output file.
182 mv lex.yy.c "$outfile"
191 # No. Get rid of any lex.yy.c file we generated, and
194 rm -f lex.yy.c
205 # the lex routine before defining it, causing compiler warnings.
217 prefixline="#define yylex ${prefix}lex"