help-flex
[Top][All Lists]
Advanced

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

line and column numbers


From: Josh
Subject: line and column numbers
Date: Mon, 13 Feb 2006 17:39:40 -0800

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




reply via email to

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