using flex internals outside the scanner.l file

Henrik Sorensen <[email protected]>
Newsgroups gmane.comp.lex.flex.general
Message-ID <[email protected]>
Hi List,

In the PL/I project (pl1gcc.sourceforge.net), I have recently refactored the 
flex scanner file. All the c functions have now been moved into a separate 
library. 
I had a problem with some of the functions since they use the YY_BUFFER_STATE 
structure, and YY_BUFFER_STATE uses yy_buffer_state and yy_site_t.

I have created a separate header file where I copied the necessary pieces from 
the generated lex.yy.c file.
Obviously this is not really portable between versions of flex.

Is there anyway to get flex to export the necessary definitions to a file ?

Are there any other way to do this ?

Thanks for your help
Henrik
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.