[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Locations suggest -- we're stupid
From: |
Hans Aberg |
Subject: |
Re: Locations suggest -- we're stupid |
Date: |
Fri, 4 Jan 2002 11:12:29 +0100 |
At 17:50 -0800 2002/01/03, John W. Millaway wrote:
>Damn we're stupid. Flex reads ahead on the input stream!! In most cases, ftell
>will report the same position for repeated calls, that position being far
>ahead
>of the curent token.
Flex will have to use ftell before it is doing the buffering: That is, when
the part the Flex generated scanner that is doing the buffering is seeing a
newline, it should record its position.
This will not help if one wants to get the position number for some other
position.
So one way around this might be that the buffer records the position number
of the first character in it (or rather, just before the first character is
read into the buffer, the position number of the buffer is recorded). Then
the Flex scanner can have its own position number function which computes
the position number of every character in the buffer.
Hans Aberg
- Re: Locations suggest -- we're stupid, (continued)
- Re: Locations suggest -- we're stupid, Hans Aberg, 2002/01/09
- Re: Locations suggest -- we're stupid, Nikos Balkanas, 2002/01/10
- Re: Locations suggest -- we're stupid, Hans Aberg, 2002/01/11
- Re: Locations suggest -- we're stupid, Nikos Balkanas, 2002/01/12
- Re: Locations suggest -- we're stupid, Hans Aberg, 2002/01/13
- threaded I/O, John W. Millaway, 2002/01/11
- Re: threaded I/O, Nikos Balkanas, 2002/01/12
- Re: threaded I/O, Bruce Lilly, 2002/01/12
- Re: threaded I/O, Bruce Lilly, 2002/01/12
- Re: threaded I/O, Nikos Balkanas, 2002/01/13
- Re: Locations suggest -- we're stupid,
Hans Aberg <=
- Re: Locations suggest, Akim Demaille, 2002/01/07