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


_______________________________________________
Help-flex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-flex

Reply via email to