Re: [HACKERS] flex

Поиск
Список
Период
Сортировка
Искать
От
Jan Wieck
Тема
Re: [HACKERS] flex
Дата
Msg-id
38835888.4CF4257D@debis.com
Список
Дерево обсуждения
flex Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] flex Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] flex Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] flex Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] flex Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] flex Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] flex Patrick Welche <prlw1@newn.cam.ac.uk>
Re: [HACKERS] flex Tom Lane <tgl@sss.pgh.pa.us>
Tom Lane wrote:

> Peter Eisentraut  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@debis.com (Jan Wieck) #




В списке pgsql-hackers по дате отправления
От: Bruce Momjian
Дата:
От: Jan Wieck
Дата:
FAQ