Hi List, I am in the process of switching my flex scanner to a reentrant scanner.
In a sub function, that used the macro YY_CURRENT_BUFFER, how can I do this when using a reentrant scanner ? The compiler complains over ../../gcc-src/gcc-4.2-20060415/gcc/pl1/pl1-scanner.l: In function 'stackCurrentBuffer': ../../gcc-src/gcc-4.2-20060415/gcc/pl1/pl1-scanner.l:1208: error: 'yyg' undeclared (first use in this function) ../../gcc-src/gcc-4.2-20060415/gcc/pl1/pl1-scanner.l:1208: error: (Each undeclared identifier is reported only once ../../gcc-src/gcc-4.2-20060415/gcc/pl1/pl1-scanner.l:1208: error: for each function it appears in.) I could of course cheat and define yyg myself as struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; but is there not another way to get the YY_CURRENT_BUFFER ? The version before the conversion to reentrant can be found in the source forge cvs: http://pl1gcc.cvs.sourceforge.net/pl1gcc/gcc/gcc/pl1/pl1-scanner.l?revision=1.41&view=markup thanks for your help Henrik _______________________________________________ help-flex mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-flex
