Re: [gob-list] Support for C++ syntax?

From: Jean-Yves Lefort <jylefort_at_brutele.be>
Date: Tue, 29 Jan 2008 12:01:44 +0100

On Tue, 29 Jan 2008 08:24:42 +0200
"Dov Grobgeld" <dov.grobgeld_at_gmail.com> wrote:

> I am using gob quite a lot with a Gtk+ and C++. Unfortunately gob barfs on
> some C++ syntax that it should just pass along to the cc and h files.
> Currently I'm able to work around this by introducing typedefs in the
> private-h section and then using them in the class definition, but I see no
> reason why the parser should not support them. The constructs in question
> are:
>
> private foo<bar> baz;
> private foo::bar baz;
>
> Neither the <> nor the :: syntaxes are supported.
>
> Any chance of getting this fixed?

The namespace syntax is supported if you use the --for-cpp command
line option. The template syntax isn't. Supporting it properly would
involve moving the handling of C/C++ types from the lexer to the
parser, to be able to handle more complex types such as:

        A::B<C, D::E::F, G<H::I<J, K> > >

> On 29/01/2008, Jean-Yves Lefort <jylefort_at_brutele.be> wrote:
> >
> > On Mon, 28 Jan 2008 18:10:20 +0100
> > Jean-Yves Lefort <jylefort_at_brutele.be> wrote:
> >
> > > The attached patch allows to add GCC attributes to methods, using a
> > > syntax borrowed from C#.
> >
> > There was a lexer conflict between array dimensions and
> > attributes. The fixed patches are attached.

-- 
Jean-Yves Lefort <jylefort_at_brutele.be>

Received on Tue Jan 29 2008 - 06:07:06 CST

This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT