How to use flex option -o (--output=FILE) -
i met problem when trying flex abcd.l
. wanted redirect output new file instead of default 1 lex.yy.c
looked in manual finding option -o(--output=file)
changed command flex xx.l -o lex.yy.1.c
error occurs.
flex: can't open --outfile=lex.yy.1.c /usr/bin/m4:stdin:2621: error: end of file in string
my working environment cygwin
, windows 7
you need put command line options before positional arguments:
flex -o lex.yy.1.c xx.l
once positional (filename) argument recognized, flex assumes following arguments filenames. normal form of argument processing command-line utilities, although (gcc, example) allow options follow filenames.
(personally, i'd suggest using filename xx.lex.c
, principle same.)
Comments
Post a Comment