help-flex
[Top][All Lists]
Advanced

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

Re: Locations suggest -- we're stupid


From: Hans-Bernhard Broeker
Subject: Re: Locations suggest -- we're stupid
Date: Fri, 4 Jan 2002 13:26:49 +0100 (MET)

On Fri, 4 Jan 2002, Hans Aberg wrote:

> I have used both variations, and keeping track of newlines while designing
> the lexer is a bother, especially when the grammar is not known beforehand.

Actually, it can be almost a nightmare. I've been through this with the
'cscope' scanner (parsing C with only a lexer), and it's been quite a
tricky business to make sure all the linenumbers are right, given that C
allows a \n just about anywhere a blank would be allowed, too.  I'm far
from sure there aren't any big loopholes left, after months of fiddling
with it.

> If further Flex is slow in doing that, then I think one should try to
> figure out why, and then successively remove that.

Most definitely, yes.

So maybe the important question should be: *why* is %%yylineno (claimed 
to be by flex -p) such a performance penalty?

-- 
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.




reply via email to

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