[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line and column numbers
From: |
Henrik Sorensen |
Subject: |
Re: line and column numbers |
Date: |
Tue, 14 Feb 2006 11:23:30 +0000 |
User-agent: |
KMail/1.8.3 |
On Tuesday 14 February 2006 01.39, Josh wrote:
> Does anyone know of a clever way to find the column count in GNU flex
> scanner?
I dont know if it is clever, but I have wrapped all the RETURN from a rule in
a macro, that do the bean counting.
The linenumbering is done by one rule:
<INITIAL>\n|\r {
l$++; // line counter
c$=0; // column counter
o$+=yyleng; //offset counter
}
for more details see pl1gcc.sourceforge.net or mail me directly.
>
> Josh
Henrik