[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: flex libraries



Well after having read your answer I took a peek at the sources for libfl.a.
And you are so right. The thought that I have spend so much time to make
this library compile and try to make gcc-cris link to it. And at no time I
have thought of looking into the source...That's it I am going home for
today!

thanks Kim for showing me the way. ;o)
May the source be with you !

-- 
Martin Hansen
Student at SDU Sønderborg. www.sdu.dk
Writing final project at Danfoss drives. www.danfossdrives.com

Tlf: 74 88 54 62


> -----Original Message-----
> From: Kim Lester [mailto:kim@xxxxxxx.au]
> Sent: Tuesday, May 07, 2002 7:34 PM
> To: dev-etrax@xxxxxxx.com
> Cc: Hansen Martin
> Subject: flex libraries
> 
> 
> Martin,
> 
> 	First of all libl and libfl are (from memory) interchangeable.
> 	They both contain 2 objects:
> 		main()
> 		yywrap()
> 	nothing else.
> 
> 	main() is just a trivial main() function which calls yylex()
> 	and yywrap is a normally trivial function whose default in
> 	lib(f)l is just
> 
> 	int yywrap()  { return 1; }		// 1 == EOF, 0 
> == more data
> 
> 	So you can use this library with yacc for the yywrap 
> function and
> 	the main() gets overwritten/ignored as I recall.
> 
> 	In short, write your own replacement functions.
> 	
> 	regards
> 		kim
> 
> Kim Lester,
> Senior Engineer,
> Datafusion and Visualisation Systems
> 
>