pass an argument to yylex()?

Tribulations Parallèles <[email protected]>
Newsgroups gmane.comp.lex.flex.general
Message-ID <[email protected]>
Hello everybody,

I am using lex to scan a file and put in memory some tokens (coefficients of 
vectors and arrays, in fact). I put them in a memory structure of type "bar" 
with a given name, say "foo". I declare foo as a global variable (in the 
first section of my lex.yy file) so as to be able to access it in my main 
program ("extern bar foo"). I can access it after the call "yylex()".
I would like to be able to choose the name of my variable, and avoid global 
variables, so I would like to declare my variable foo in the main program, 
and pass it to yylex() in some way: for example yylex(foo).
But in all the examples that I have seen, yylex has no argument. I haven't 
seen anything in the documentation.
Is it possible to perform what I aim to do?

Thanks in advance,

Julien
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.