You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a reentrant lexer YY_CURRENT_BUFFER_LVALUE contains as members the current line number, but also the current column number. It would be great if the macro YY_LESS_LINENO could take care of yycolumn, too.
For now I am currently using the snippit below in the .l footer as a workaround which might be a starting point for a patch supposedly to flex.skl:
--- YY_LESS_LINENO_v0.c+++ YY_LESS_LINENO_v1.c
#undef YY_LESS_LINENO
#define YY_LESS_LINENO(n) \
do { \
int yyl;\
- for ( yyl = n; yyl < yyleng; ++yyl )\- if ( yytext[yyl] == '\n' )\- --yylineno;\+ for ( yyl = n; yyl < yyleng; ++yyl ){\+ yycolumn--; \+ if ( yytext[yyl] == '\n' ){\+ --yylineno;yycolumn=0;}\+ }\
}while(0)
Thanks,
J.
The text was updated successfully, but these errors were encountered:
For a reentrant lexer
YY_CURRENT_BUFFER_LVALUE
contains as members the current line number, but also the current column number. It would be great if the macroYY_LESS_LINENO
could take care ofyycolumn
, too.For now I am currently using the snippit below in the .l footer as a workaround which might be a starting point for a patch supposedly to flex.skl:
Thanks,
J.
The text was updated successfully, but these errors were encountered: