[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Namespace-prefix
From: |
Hans Aberg |
Subject: |
Re: Namespace-prefix |
Date: |
Wed, 16 Oct 2002 09:32:09 +0200 |
At 11:40 -0700 2002/10/15, Paul Eggert wrote:
>Is there some more general way to address the issue, whatever it is?
>I would rather not add one name-mangling option for C++, another
>name-mangling option for ML, etc.
A general scheme that comes to my mind is that one can add in the .y file a
command:
%define <name> <definition>
Bison merely adds a M4 definition corresponding to <name> which expands to
<definition>. Then the skeleton file can use that definition if it so will.
I can then write
%definition namespace <name>
and use the corresponding macro to define C++ namespaces. Other skeleton
files, like for C, would may merely ignore that command if somebody is
using it.
The simple variation is that %define just writes the definition file handed
over to M4, and lets M4 sort it out (definition clashes).
Hans Aberg