[Top][All Lists]

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

Re: [PATCH] More %define/%code encapsulation

From: Joel E. Denny
Subject: Re: [PATCH] More %define/%code encapsulation
Date: Thu, 18 Jan 2007 02:51:35 -0500 (EST)

On Thu, 18 Jan 2007, Paolo Bonzini wrote:

> > And how many more specialized macros will someone end up writing for
> > %define?  Something like m4_n?  m4_ifvaln?  m4_ifset?  m4_bmatch?
> > m4_bpatsubsts?
> If you need m4_n, m4_bmatch, m4_bpatsubsts on define value, there are bigger
> problems in your skeleton.  `if' statements are a different thing.

I'm not sure that's true.  For example, at some point the C/C++ skeletons 
should compute cpp guards rather than using the same ones for all parsers.  
I haven't explored this thoroughly, but it could involve using 
m4_bpatsubsts to change the capitalization of a %define variable value 
(such as parser_class_name's) to look like a cpp macro name.

In any case, I sense that your main reason for wanting these extra wrapper 
macros is brevity.  As a compromise, let's leave those macros out, and 
let's change these:


to these:


What do you think?

reply via email to

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