[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Locations suggest
From: |
Hans Aberg |
Subject: |
Re: Locations suggest |
Date: |
Tue, 1 Jan 2002 11:55:08 +0100 |
At 16:30 -0800 2001/12/31, John W. Millaway wrote:
>> One should perhaps equip Flex with better token location recording, for use
>> with error messages, etc:
>
>Good idea.
Thank you. :-)
> We've already integrated the bison YYLTYPE values into the reentrant
>scanner (these are placeholders for line/col information -- but no code
>actually fills them in).
The reason I suggested also the position or (total) character count to be
included, is that I think that this is what my IDE (Metrowerks CodeWarrior)
is using to identify the location in a file. It displays the error message
and a segment of the source code, a portion of the line, which could use
the line and column numbers, then. But one can also click on the error
message, and the file pops up with the highlighting correct segment, and it
there I think that the file position numbers area used.
For the position, there are two possibilities, Flex could count the
characters from the start of the scan, or it can use the value returned by
the C++ seekoff or C fseek functions.
>Now is a good time to mention that the "performance penalty" cited in the docs
>for %option lineno is an overstatement -- it's just a loop over yytext to
>check
>for '\n'.
I figure this stems from a time when computers did not perform so well.
Hans Aberg
- Re: Locations suggest,
Hans Aberg <=
- Re: Locations suggest, Akim Demaille, 2002/01/03
- Re: Locations suggest, Akim Demaille, 2002/01/03
- Re: Locations suggest, John W. Millaway, 2002/01/03
- Re: Locations suggest, Akim Demaille, 2002/01/03
- Re: Locations suggest, John W. Millaway, 2002/01/03
- Re: Locations suggest, Akim Demaille, 2002/01/07
- Re: Locations suggest, Hans Aberg, 2002/01/07
- Re: Locations suggest, Hans Aberg, 2002/01/07
- Re: Locations suggest, Akim Demaille, 2002/01/07
- Re: Locations suggest, Hans Aberg, 2002/01/07