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

Re: Bug#196800: flex mustn't assume stdint.h is available on allplatforms



Hallo,

On Sat, Jun 14, 2003 at 08:41:48PM +0200, Bill Allombert wrote:
> I don't think it make sense to ship the lex.yy.c file build by flex
> anyway. Automake do that but I feel it's a bug:
I think it is always nice to keep the build dependencies small.
So I like to include pre-built files whenever it makes sense.

> flex rely on a support library libl.a to do it's job. If flex is not
> installed on the target machine, this library will most probably be
> missing.

Well, not really.  libl only implements 'main' and 'yywrap'.
Virtually all programs want to implement their own version of
main (e.g. to do option parsing), so this is no problem.
And about 'yywrap' the manual states the following.

    If you do not supply your own version of `yywrap()', then you must
    either use `%option noyywrap' (in which case the scanner behaves
    as though `yywrap()' returned 1), or you must link with `-lfl' to
    obtain the default version of the routine, which always returns 1.

So there is no real problem, too.  Most of my programs do not need the
yywrap feature, so I tend to just use `%option noyywrap'.

Until now the flex output seemed quite portable to me.

Jochen
-- 
                                         Omm
                                      (0)-(0)
http://www.mathematik.uni-kl.de/~wwwstoch/voss/index.html

Attachment: pgpncirOlqgxe.pgp
Description: PGP signature


Reply to: