(flex.info.gz) How do I execute code only during initialization (only before the first scan)?
Info Catalog
(flex.info.gz) How do I abandon a file in the middle of a scan and switch to a new file?
(flex.info.gz) FAQ
(flex.info.gz) How do I execute code at termination?
How do I execute code only during initialization (only before the first scan)?
==============================================================================
You can specify an initial action by defining the macro `YY_USER_INIT'
(though note that `yyout' may not be available at the time this macro
is executed). Or you can add to the beginning of your rules section:
%%
/* Must be indented! */
static int did_init = 0;
if ( ! did_init ){
do_my_init();
did_init = 1;
}
Info Catalog
(flex.info.gz) How do I abandon a file in the middle of a scan and switch to a new file?
(flex.info.gz) FAQ
(flex.info.gz) How do I execute code at termination?
automatically generated byinfo2html