help-flex
[Top][All Lists]
Advanced

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

Re: line and column numbers


From: Jonathan S. Shapiro
Subject: Re: line and column numbers
Date: Tue, 14 Feb 2006 09:52:30 -0500

Or have a look at the IGNORE, TOK, STOK macros (and friends) in


http://www.opencm.org/opencm/~/PUBLIC/coyotos/DEV/ccs/top/bitcc-bootstrap/frontend/BitcLexer.l


On Tue, 2006-02-14 at 11:23 +0000, Henrik Sorensen wrote:
> 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
> 
> 
> 
> _______________________________________________
> Help-flex mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-flex





reply via email to

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