[Flex-devel] Direct yy_fatal_error instead of YY_FATAL_ERROR macro
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Aaron S. <aa...@se...> - 2008-11-26 06:19:48
|
In the code generated for a reentrant scanner, two functions call yy_fatal_error directly instead of going through the YY_FATAL_ERROR macro. I believe this to be an omission. Any objections to changing it? void libsieve_addrset_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) yy_fatal_error( "libsieve_addrset_lineno called with no buffer" , yyscanner); yylineno = line_number; } And... void libsieve_addrset_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) yy_fatal_error( "libsieve_addrset_column called with no buffer" , yyscanner); yycolumn = column_no; } Cheers, Aaron |