help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Flex doesn't generate pure ANSI C code]


From: John W. Millaway
Subject: Re: Flex doesn't generate pure ANSI C code]
Date: Tue, 13 Nov 2001 08:06:00 -0800 (PST)

> >I want to make Flex to generate pure ANSI C code (or K&R) without
> >using any non-standard header files or functions.
> >
> >File lex.yy.c includes 'unistd.h' and uses 'read' function but my
> >compiler doesn't support it and I want to have ANSI C compatible
> >program.

Flex does not do this by default. You must have specifically requested a system
read(), instead of fread(), by using one of the optimization options, -Cr or
'%option read'. Note that the following options all trigger '%option read' to
be enabled:

-Cr or  %option read
-f  or  %option full  (since it is just a shortcut for -Cfr)
-F or  %option fast  (since it is just a shortcut for -CFr)

See the section, "OPTIONS", in the manual.



__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]