[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: common per-token info
From: |
Hans Aberg |
Subject: |
Re: common per-token info |
Date: |
Wed, 9 Jan 2002 20:33:07 +0100 |
At 15:36 +0100 2002/01/09, Akim Demaille wrote:
>John> Akim: Just for the sake of example, can you give us a scenario
>John> for which you need to track the "width" of each token, (where
>John> width != yyleng) ?
>
>Strings come to my mind. You have to accumulate. And what do you
>count: chars or bytes?
If it is variable width characters you have in your mind, discussions in
various newsgroups and lists (std.c++, LaTeX-3) suggest that one should not
use that internally in a program: Instead first translate to fixed width
characters. Then that problem goes away.
>But I might not have understood the question: if you refer to the
>width I was referring to before, I meant that there are (at least) two
>schools: one is
>
> location = start-pos + end-pos
>
>the other being
>
> location = start-pos + width
If, as I suggested, for location one gives [begin, end) semi-open interval
of yytext, then the width can be computed when the error occurs. So then
that issue is covered.
Hans Aberg
- Re: why are locations dictated by bison?, (continued)
- Re: why are locations dictated by bison?, Bruce Lilly, 2002/01/16
- Re: why are locations dictated by bison?, Hans Aberg, 2002/01/17
- Re: why are locations dictated by bison?, Bruce Lilly, 2002/01/17
- Re: why are locations dictated by bison?, Hans Aberg, 2002/01/18
- Re: why are locations dictated by bison?, Bruce Lilly, 2002/01/18
- Re: why are locations dictated by bison?, Hans Aberg, 2002/01/18
- common per-token info, John W. Millaway, 2002/01/07
- Re: common per-token info, Hans Aberg, 2002/01/07
- Re: common per-token info, Hans Aberg, 2002/01/09
- Re: common per-token info, Akim Demaille, 2002/01/09
- Re: common per-token info,
Hans Aberg <=
- Re: Locations suggest -- we're stupid, Nikos Balkanas, 2002/01/07
- Re: Locations suggest -- we're stupid, Hans Aberg, 2002/01/08
- Re: Locations suggest -- we're stupid, Nikos Balkanas, 2002/01/08
- 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