line and column numbers

Josh <[email protected]> Mon, 13 Feb 2006 17:39:40 -0800
Newsgroups gmane.comp.lex.flex.general
Message-ID <[email protected]>
Does anyone know of a clever way to find the column count in GNU flex
scanner?  The yylineno option only gives you the line number, so my
scanner keeps track of the column number by augmenting it by the
length of yytext in each rule, but this is tedious.  Maybe there is a
solution using YY_CURRENT_BUFFER->yy_n_chars and/or
YY_CURRENT_BUFFER->yy_buf_size?

Josh