Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> >>>> flex has a lexer-specific library (libfl.a), but as far as I can tell
> >>>> our scanners don't call it. In fact our build process has no provision
> >>>> for adding -lfl to the link, which I used to think was an oversight, but
> >>>> now it's starting to seem like a good idea. We could ship scan.c et al
> >>>> in the same way we handle the yacc/bison output files, and it should
> >>>> work everywhere.
>
> > This puzzles me a bit still, but it seems to work.
>
> I suppose that libfl.a is only needed to support some flex features that
> we don't use --- but I haven't bothered to dig in and find out what.
AFAIK, flex's libfl.a only contains a main() and a noop variant of yywrap(). The main() in there only calls
yylex()repeatedly so you can write a scan.l that does text replacement etc. and simply compile the generated C
sourceinto a standalone executable. Our backend already contains a yywrap() (and a main() of course), so there are
nosymbols that libfl.a could potentially resolve. Thus, it's not needed.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #