[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redifining yyltype
From: |
Hans Aberg |
Subject: |
Re: Redifining yyltype |
Date: |
Mon, 12 Apr 2004 18:55:03 +0200 |
At 09:17 +0200 2004/04/12, Henrik Sorensen wrote:
>What is the recommended way to redefine the structure used for tracking token
>locations?
>
>Should I define a new typedef or redefine the yyltype ?
>Or something else I didn't think of ?
>
>1)
> typedef myOwnLtype { .... } myOwnLtype;
> #define YYLTYPE myOwnLtype
>or
>2)
> typedef yyltype { int a;int b; } yyltype;
>...
You should do the first one; otherwise the macros will not be correct when
"yy" is changed to something else (as in the case of multiple parsers).
Strictly speaking, it depends how the skeleton file is written: With
Bison's M4 approach, one can probably do it differently now. But I think
this is the traditional setup.
Be aware of the Bison's location tracking feature may be buggy, as it is
not really supported, which has to do with that one has not been able to
agree on a good location tracking feature yet.
>please cc me, as I am not subscribed to help-bison
It is easy:
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-bison>,
<mailto:address@hidden>
List-Archive: <http://mail.gnu.org/pipermail/help-bison>
List-Post: <mailto:address@hidden>
List-Help: <mailto:address@hidden>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-bison>,
<mailto:address@hidden>
Hans Aberg