help-flex
[Top][All Lists]
Advanced

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

Re: Locations suggest


From: Hans Aberg
Subject: Re: Locations suggest
Date: Mon, 7 Jan 2002 14:46:06 +0100

At 13:02 +0100 2002/01/07, Hans Aberg wrote:
>But one might give the implementation of a tab = whitespace equivalence a
>>thought, as that is used in some programs (for example, in Haskell). Then
>one >must have a variable telling how many whites there is on a tab. One
>extra >problem is that C/C++ whitespace [[:space:]]+ has several different
>tabs in it. >Unicode, I think, has several fixed width tabs, so the issue
>may pop up again >in that context.

Actually, this is a bad idea, as it causes scanning overheads: One should
optimize speed for the case no error happens.

So, instead, the best way seems to provide a pointer at the beginning of
the line in the internal buffer of the lexer, and the programmer can use
that to compute whatever tab related value in the case of an error. The
overhead of recording that pointer should be small.

  Hans Aberg





reply via email to

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