Boost logo

Boost :

From: Hartmut Kaiser (HartmutKaiser_at_[hidden])
Date: 2005-04-08 06:49:30

Matt Hurd wrote:

> Do you think Wave could be used for adding some syntatic
> sugar that would allow easy compile time programming of strings?

What concretely do you have in mind?

> If I remember the main issue with such thoughts it was the
> clumsiness of the typelist of characters. A little
> non-standard sugar from Wave might solve that.
> Been thinking about a compile time packet parser and how
> something like a spirit-like but at compile time would fit the bill.

Generally Wave provides you with the tokenised and preprocessed C++ input
stream. This may be used to drive some kind of parser (a spirit parser will
do). But Wave doesn't do any C++ related semantic analysis of the input
stream. For instance you'll get the information that there was an identifier
found in the input stream at a certain point, but you won't get any
information about whether this is a variable, a class name, a typedef'd
name, or perhaps a function name etc.

I'm not quite sure if it is sufficient to have Wave around to solve the
problem you've mentioned. Probably you'll need some kind of C++ semantic
analysis for that (i.e. a parser for C++ or a significant subset).

Regards Hartmut

Boost list run by bdawes at, gregod at, cpdaniel at, john at