From: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] flex |
Date: | 2000-01-17 10:49:59 |
Message-ID: | 20000117104959.D21506@quartz.newn.cam.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Jan 16, 2000 at 09:13:03PM +0100, Peter Eisentraut wrote:
>
> This puzzles me a bit still, but it seems to work. GNU suggests putting
> yacc and lex files in distributions, so I can't imagine why they would do
> that if you need to have lib[f]l.a anyway.
>
> $ nm /usr/lib/libfl.a
>
> libmain.o:
> 00000000 t gcc2_compiled.
> 00000000 T main
> U yylex
>
> libyywrap.o:
> 00000000 t gcc2_compiled.
> 00000000 T yywrap
I think those are defaults for the case where you just have a lex file, but
didn't bother with defining a main() after the last %% eg:
%%
A putchar('b');
%%
When linked with -lfl, you get an executable. In the postgresql case, life
is more complicated and the parser calls yylex rather than a fake main(), so
-lfl isn't needed.
Cheers,
Patrick
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-01-17 11:07:43 | Re: [HACKERS] pg_dump not in very good shape |
Previous Message | Hiroshi Inoue | 2000-01-17 09:25:06 | RE: [HACKERS] RE: Getting rid of setheapoverride (was Re: [COMMITTERS] heap.c) |