[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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;
}

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Wolfram Kahl on September, 9 2006 using texi2html 1.76.