[splint-discuss] where to find yylex ?
Jack T Mudge III
jakykong at theanythingbox.com
Mon Aug 11 02:26:46 PDT 2008
On Monday 11 August 2008 01:53:54 am splint-discuss-request at cs.virginia.edu
wrote:
> Message: 9
> Date: Mon, 11 Aug 2008 10:23:10 +0200
> From: Olivier FAURAX <ofaurax at neotion.com>
> Subject: [splint-discuss] where to find yylex ?
> To: splint-discuss at cs.virginia.edu
> Message-ID: <489FF6EE.50609 at neotion.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello,
>
> I think this is really a newbie question, but I can't manage to compile
> splint from source code because of missing yy* errors :
> cgrammar.o: In function `yyparse':
> /home/ofaurax/cvs/splint/src/cgrammar.c:4194: undefined reference to
> `yylex'
>
> I've flex and bison installed, correctly found by the ./configure.
>
> Perhaps the ./configure could have an additional check for the needed
> lib.
>
> Thanks for your work.
> Olivier
I believe the issue is that you need to first run bison and flex to generate
the header files that contain those definitions. Splint, just like the
compiler, can only deal with what it already knows about -- and those
declarations, the yy* ones, are created by bison and flex.
At least for my programs, I typically run bison and flex and end up with
files such as "lex.yy.c" and "lex.yy.h" from flex and "yacc.yy.c"
and "yacc.yy.h" from bison. The .h files are included in my source file(s),
and that's how splint knows about the functions (etc). Once you run flex
and bison, it's all C from there.
Hope it helps!
--
Sincerely,
Jack Mudge
jakykong at theanythingbox.com
GPG Pubkey ID: 0x78BEC84C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20080811/4c56bda0/attachment.bin
More information about the splint-discuss
mailing list