Afternoon!

The attached flexdiff changes flex.1 to be accurate about how flex
currently works: -lfl does not provide yywrap() by default.

Attached also are two lex files I used to find out that the man page
wasn't correct.
The man page says one can either use %option noyywrap or link with
-lfl but only the former solution works.
The two lex files intend to do the same thing: to be the simplest lex
program, and to produce an a.out that acts like cat.

This works:
lex optnoyy.l
cc -lfl lex.yy.c

This does not work:
lex noopt.l
cc -lfl lex.yy.c

The compiler finds undefined references to yywrap, which shows that
-lfl does not provide yywrap(), unlike what is said on the man page.

I did this testing on 6.0 release, but looking at cvsweb I don't think
it'll be any different on -current.

Thanks for reading. :D

Attachment: flexdiff
Description: Binary data

Attachment: optnoyy.l
Description: Binary data

Attachment: noopt.l
Description: Binary data

Reply via email to