help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting YY_CURRENT_BUFFER when using reentrant scanner


From: henrik . sorensen
Subject: Getting YY_CURRENT_BUFFER when using reentrant scanner
Date: Mon, 2 Apr 2007 15:44:50 +0100
User-agent: KMail/1.9.5

Hi List,

Just wondering how you are using YY_CURRENT_BUFFER in a reentrant scanner.

When using the %option reentrant, I have to do the following hack to use the 
YY_CURRENT_BUFFER in a function that only takes the yyscan_t yyscanner as 
parameter.


struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* <== HACK HACK */

yy_flush_buffer((YY_CURRENT_BUFFER),yyscanner);


Is there anyother way, that doesnt require the yyg variable ?


thanks for your help
Henrik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]