Re: [HACKERS] flex

From: Jan Wieck <wieck(at)debis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] flex
Date: 2000-01-17 17:59:36
Message-ID: 38835888.4CF4257D@debis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> Peter Eisentraut <peter_e(at)gmx(dot)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 source into a standalone executable. Our backend already
contains a yywrap() (and a main() of course), so there are no symbols
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(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2000-01-17 18:27:18 Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT...
Previous Message Thomas Lockhart 2000-01-17 16:33:59 Re: [HACKERS] TODO list