help-bison
[Top][All Lists]
Advanced

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

Re: bison location tracking ..


From: Hans Aberg
Subject: Re: bison location tracking ..
Date: Thu, 10 Jun 2004 18:28:17 +0200

At 03:23 +0200 2004/06/10, Frank Heckenbach wrote:
>> It is not difficult to tweak the skeleton file:
>
>I tend to disagree. Modifications to the skeleton file have to be
>adjusted to each bison release. (And using them on a variety of
>systems with different bison versions installed doesn't make it
>easier. Or you have to require a specific bison version, usually the
>newest, as I have to do currently for other reasons and which has
>brought me a lot of negative comments so far ...)
>
>Redefining a macro provided for this purpose seems a bit easier to
>do if it works.

Actually, as Bison is now is set up, it is only a question of where the
macro one modifies is located: In the C-preprocessor or in M4.

The simplest way is to let future Bison releases have macros for such
things as default location assignment. Those who wishes can then let that
macro expand to a suitable C-preprocessor macro, which can be redefined. M4
is more flexible than the C-preprocessor, and this approach also works
better in situations where the C-preprocessor should be avoided (as in the
case of C++, as macros are hard to debug) or when it is not available at
all (in a multilingual approach).

Before that has happened, it is good if one can modify the skeleton file on
ones own, to cover up ones own particular needs.

  Hans Aberg






reply via email to

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