]> git.draconx.ca Git - gob-dx.git/commitdiff
Release 1.0.9 v1.0.9
authorGeorge Lebl <jirka@5z.com>
Sun, 22 Apr 2001 13:53:00 +0000 (05:53 -0800)
committerNick Bowler <nbowler@draconx.ca>
Tue, 19 Feb 2019 17:20:40 +0000 (12:20 -0500)
20 files changed:
ChangeLog
NEWS
configure
configure.in
doc/gob.1.in
examples/GNOME_Foo_SomeInterface.idl [new file with mode: 0644]
examples/Makefile.am
examples/Makefile.in
examples/README
examples/foo-some-interface.gob [new file with mode: 0644]
gob.spec
src/checks.c
src/lexer.c
src/lexer.l
src/main.c
src/parse.c
src/parse.y
src/treefuncs.c
src/treefuncs.def
src/treefuncs.h

index d91f155037cdbd19096e019083645af4367b1574..f2247b8c8e6e498cccf38b9fa302a7da90d72f8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+Sat Apr 21 20:37:40 2001  George Lebl <jirka@5z.com>
+
+       * Release 1.0.9
+
+Sat Apr 21 20:06:10 2001  George Lebl <jirka@5z.com>
+
+       * examples/Makefile.am, examples/README,
+         examples/GNOME_Foo_SomeInterface.idl,
+         examples/foo-some-interface.gob:  Add an example for BonoboXObject
+
+Sat Apr 21 19:33:08 2001  George Lebl <jirka@5z.com>
+
+       * configure.in:  Raise version to 1.0.9
+
+       * src/lexer.l:  Properly check major version requirements (majors
+         must match in the requires line)
+
+       * src/parse.y, src/main.c, src/treefuncs.(def|c|h), src/checks.c:
+         Add direct BonoboXObject support
+
+       * src/parse.y: fix the chunks usage
+
+       * doc/gob.1.in: document BonoboXObject stuff, fix the bugs section
+         wrt gtk-doc which has been supported for quite some time
+
+Fri Apr 13 21:19:33 2001  George Lebl <jirka@5z.com>
+
+       * src/parse.y: commited too fast, fix printf warning
+
+Fri Apr 13 17:45:14 2001  George Lebl <jirka@5z.com>
+
+       * src/parse.y, doc/gob.1.in: Fix a problem found by Eric Kidd
+         <eric.kidd@pobox.com>, where objectlink was not completely
+         refcounting safe.  Could underref if you set the same object.
+
 Thu Apr 12 09:19:58 2001  George Lebl <jirka@5z.com>
 
        * Release 1.0.8
 Thu Apr 12 09:19:58 2001  George Lebl <jirka@5z.com>
 
        * Release 1.0.8
diff --git a/NEWS b/NEWS
index 8ec51d68d865439046756a5b4a6416949af15a34..a5bb98f4ae6494bd8c6826843662da60bcd1ea03 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+1.0.9
+       * add direct support for BonoboXObject
+       * fix objectlink refcounting problem (Eric Kidd)
+
 1.0.8
        * fix signals with a return value and no argument
 
 1.0.8
        * fix signals with a return value and no argument
 
index 01a92dcbaffa9b8628005e11b7bc5e7617d4319b..8d8b81d0f7331bb8a12fe96da3b1686edc25548d 100755 (executable)
--- a/configure
+++ b/configure
@@ -703,7 +703,7 @@ fi
 
 PACKAGE=gob
 
 
 PACKAGE=gob
 
-VERSION=1.0.8
+VERSION=1.0.9
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
index 7c5b251c89242258e4f9bd0f44567f4ea6b58576..90a53a73ef99318cd0366c6de435ab9473fffc01 100644 (file)
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.2)
 AC_INIT(src/treefuncs.h)
 AM_CONFIG_HEADER(config.h)
 AC_PREREQ(2.2)
 AC_INIT(src/treefuncs.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(gob,1.0.8)
+AM_INIT_AUTOMAKE(gob,1.0.9)
 
 dnl
 dnl  An utter hack to allow embedding of gob inside other packages.
 
 dnl
 dnl  An utter hack to allow embedding of gob inside other packages.
index 81aa107e361bd31c5f0dca22d48b033e18649850..518e358d4fd20ef6f243d5e37e0eaa69987a409b 100644 (file)
@@ -466,11 +466,11 @@ is just like
   get {
         ARG = self->foo;
   } set {
   get {
         ARG = self->foo;
   } set {
-        if(self->foo)
+        if(ARG != NULL)
+                gtk_object_ref(ARG);
+        if(self->foo != NULL)
                 gtk_object_unref(self->foo);
         self->foo = ARG;
                 gtk_object_unref(self->foo);
         self->foo = ARG;
-        if(self->foo)
-                gtk_object_ref(self->foo);
   }
 
 .fi
   }
 
 .fi
@@ -828,7 +828,8 @@ compile with a C++ compiler.
 .PP
 The get_type is not really a method, but a function which initializes your
 object.  Recently objects appeared which require you to make a custom
 .PP
 The get_type is not really a method, but a function which initializes your
 object.  Recently objects appeared which require you to make a custom
-get_type function (BonoboXObject currently).  So in 1.0.7 it is now possible
+get_type function (BonoboXObject currently, see next section for direct
+BonoboXObject support).  So in 1.0.7 it is now possible
 to override this function.  To do so, just define a new public method called
 get_type, with no arguments.  Example:
 .nf
 to override this function.  To do so, just define a new public method called
 get_type, with no arguments.  Example:
 .nf
@@ -842,6 +843,45 @@ get_type, with no arguments.  Example:
 
 .fi
 
 
 .fi
 
+.SH DIRECT BonoboXObject SUPPORT
+.PP
+If you want to build a BonoboXObject class gob has direct support for these
+classes since 1.0.9.  Just create a new object that derives from
+Bonobo:X:Object.  Then use a "BonoboX" class flag with the interface name as an
+argument.  The interface name should be as you would type it in C, that is with
+underscores as namespace separators.  Then you add the methods (using exact
+same names as in the idl file) and prepend those methods with a BonoboX
+keyword.  For example imagine you have an interface GNOME/Foo/SomeInterface,
+with a method fooBar that takes a single string:
+.nf
+
+  class Foo:Some:Interface from Bonobo:X:Object
+    (BonoboX GNOME_Foo_SomeInterface) {
+
+          BonoboX
+          private void
+          fooBar (PortableServer_Servant servant,
+                  const CORBA_char *string,
+                  CORBA_Environment *ev)
+          {
+                  Self *self = SELF (bonobo_object_from_servant (servant));
+
+                  /* your code here */
+          }
+
+          /* rest of class */
+  }
+
+.fi
+Note that the implementation method can be private, in fact that's probably
+a good idea to do.  It won't work to make this a signal, it can however
+be a virtual.  Note that the method prototype must match the one from the
+interface header file, or you will get a bad assignment warning.  You should
+check the header file generated by orbit-idl and see the epv structure
+for the correct prototypes if you can't figure them out from the idl itself.
+Also note that the first argument is not "self", but the servant and you must
+use bonobo_object_from_servant function to get the actual object pointer.
+
 .SH IDENTIFIER CONFLICTS
 .PP
 Gob will need to define some local variables and functions in the generated
 .SH IDENTIFIER CONFLICTS
 .PP
 Gob will need to define some local variables and functions in the generated
@@ -1028,8 +1068,7 @@ that's about as far as I can really take it and even that is problematic.
 Basically, if you use gob, just don't use the C preprocessor too extensively.
 .PP
 Comments will not get through to the generated files unless inside C code.
 Basically, if you use gob, just don't use the C preprocessor too extensively.
 .PP
 Comments will not get through to the generated files unless inside C code.
-This makes using something like gtk-doc harder.  However I'm planning to
-fix this somehow.
+This is not the case for gtk-doc style comments which are supported.
 .PP
 The short name aliases are actually implemented as pointers to functions.  Thus
 if you want to get the pointer of a function using the short name alias you
 .PP
 The short name aliases are actually implemented as pointers to functions.  Thus
 if you want to get the pointer of a function using the short name alias you
diff --git a/examples/GNOME_Foo_SomeInterface.idl b/examples/GNOME_Foo_SomeInterface.idl
new file mode 100644 (file)
index 0000000..c6a3d0d
--- /dev/null
@@ -0,0 +1,26 @@
+#include <Bonobo.idl>
+
+/* An example interface
+ *
+ * Do note that the GNOME namespace is not just a freeforall,
+ * so this file should not be installed as Foo is not a registered
+ * name.  To see the current namespece setup see doc/NAMESPACE
+ * in the bonobo cvs module or from a recent bonobo tarball.
+ * To register a new name under the GNOME namespace just drop
+ * a mail to:
+ * Michael Meeks <michael@ximian.com> or George Lebl <jirka@5z.com>
+ * and we'll get you all set.  (This is just to avoid conflicts in
+ * the namespace, and no it doesn't cost anything)
+ */
+
+module GNOME {
+
+module Foo {
+
+interface SomeInterface {
+       void fooBar (in string foo);
+};
+
+};
+
+};
index 9197fa7d67b2ab1c4dd2f7263fe432e790102e13..b92c41322e84b003100992485bfff504c5476113 100644 (file)
@@ -2,6 +2,8 @@ EXTRA_DIST = \
        README                  \
        gtk-button-count.gob    \
        my-person.gob           \
        README                  \
        gtk-button-count.gob    \
        my-person.gob           \
-       my-person2.gob
+       my-person2.gob          \
+       GNOME_Foo_SomeInterface.idl \
+       foo-some-interface.gob
 
 SUBDIRS =
 
 SUBDIRS =
index 3695c5619b26051e8d9ab89f38984464b7035d45..6b5ea9c6eaf0aabad13d92467411ca1f343aa080 100644 (file)
@@ -77,7 +77,7 @@ TAR = @TAR@
 VERSION = @VERSION@
 YACC = @YACC@
 
 VERSION = @VERSION@
 YACC = @YACC@
 
-EXTRA_DIST =   README                          gtk-button-count.gob            my-person.gob                   my-person2.gob
+EXTRA_DIST =   README                          gtk-button-count.gob            my-person.gob                   my-person2.gob                  GNOME_Foo_SomeInterface.idl     foo-some-interface.gob
 
 
 SUBDIRS = 
 
 
 SUBDIRS = 
index 1eebe5533d180299a5f4ac7b39c2ca8e70ed5692..dba804d8ad49877d4c7f7e1492bbc547ef7f1df4 100644 (file)
@@ -15,3 +15,8 @@ my-person.gob         A simple file which can store some identity
 
 my-person2.gob         The same as above but using automatic initialization,
                        destruction and argument linking features of 0.93.0+
 
 my-person2.gob         The same as above but using automatic initialization,
                        destruction and argument linking features of 0.93.0+
+
+GNOME_Foo_SomeInterface.idl
+foo-some-interface.gob Example idl and gob file for a BonoboXClass
+                       implementation.  It can be this easy to write
+                       Bonobo classes.
diff --git a/examples/foo-some-interface.gob b/examples/foo-some-interface.gob
new file mode 100644 (file)
index 0000000..15aa928
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Example BonoboXObject class
+ *
+ * see GNOME_Foo_SomeInterface.idl
+ */
+requires 1.0.9
+
+%{
+/* some standard includes */
+#include <gnome.h>
+#include <bonobo.h>
+
+/* this requires you to use orbit-idl on GNOME_Foo_SomeInterface.idl first */
+#include "GNOME_Foo_SomeInterface.h"
+
+#include "foo-some-interface.h"
+#include "foo-some-interface-private.h"
+%}
+
+class Foo:Some:Interface from Bonobo:X:Object
+       (BonoboX GNOME_Foo_SomeInterface)
+{
+
+       BonoboX
+       private void
+       fooBar (PortableServer_Servant servant,
+               const CORBA_char *string,
+               CORBA_Environment *ev)
+       {
+               Self *self = SELF (bonobo_object_from_servant (servant));
+
+               /* your code here */
+       }
+
+       /* rest of class */
+}
index acc349cf1c956c62996edd656af7dcde326b4e4e..f6a7b332cab2e00638034c5f607f2a9cdb03a864 100644 (file)
--- a/gob.spec
+++ b/gob.spec
@@ -1,4 +1,4 @@
-%define  ver     1.0.8
+%define  ver     1.0.9
 %define  rel     1
 %define  prefix  /usr
 
 %define  rel     1
 %define  prefix  /usr
 
index 062d6357c2e11521ed3cbe1cbdb4dcc5967ea2fb..376e45b7d370eaedb02abd79e4f8b82c87c739d3 100644 (file)
@@ -152,7 +152,8 @@ check_bad_symbols(Class *c)
                        if((m->method == SIGNAL_LAST_METHOD ||
                            m->method == SIGNAL_FIRST_METHOD ||
                            m->method == VIRTUAL_METHOD) &&
                        if((m->method == SIGNAL_LAST_METHOD ||
                            m->method == SIGNAL_FIRST_METHOD ||
                            m->method == VIRTUAL_METHOD) &&
-                          (strcmp(m->id, "__parent__")==0 ||
+                          (strcmp(m->id, "_epv")==0 ||
+                           strcmp(m->id, "__parent__")==0 ||
                            strcmp(m->id, "___parent__")==0)) {
                                error_printf(GOB_ERROR, m->line_no,
                                             "'%s' not allowed as an "
                            strcmp(m->id, "___parent__")==0)) {
                                error_printf(GOB_ERROR, m->line_no,
                                             "'%s' not allowed as an "
index fe904e563e84f8076d90e91a269aad709b447422..73353799097f1927096d7c80605f82839eef0e7d 100644 (file)
@@ -1552,27 +1552,46 @@ YY_RULE_SETUP
 {
                        int maj = 0,min = 0,pl = 0;
                        int rmaj = 0,rmin = 0,rpl = 0;
 {
                        int maj = 0,min = 0,pl = 0;
                        int rmaj = 0,rmin = 0,rpl = 0;
+                       int effective_maj = 0;
+                       int effective_rmaj = 0;
                        char *p;
                        
                        sscanf(VERSION,"%d.%d.%d",&rmaj,&rmin,&rpl);
                        char *p;
                        
                        sscanf(VERSION,"%d.%d.%d",&rmaj,&rmin,&rpl);
+                       effective_rmaj = rmaj;
+                       if (rmin >= 90)
+                               effective_rmaj = rmaj + 1;
+
                        p = strchr(yytext,'r');
                        g_assert(p); /* we MUST have found it */
                        sscanf(p,"requires %d.%d.%d",&maj,&min,&pl);
                        p = strchr(yytext,'r');
                        g_assert(p); /* we MUST have found it */
                        sscanf(p,"requires %d.%d.%d",&maj,&min,&pl);
+                       effective_maj = maj;
+                       if (min >= 90)
+                               effective_maj = maj + 1;
+
                        if(rmaj < maj ||
                           (rmaj == maj && rmin < min) ||
                           (rmaj == maj && rmin == min && rpl < pl)) {
                                error_printf(GOB_ERROR, line_no,
                        if(rmaj < maj ||
                           (rmaj == maj && rmin < min) ||
                           (rmaj == maj && rmin == min && rpl < pl)) {
                                error_printf(GOB_ERROR, line_no,
-                                            "GOB version %d.%d.%d required "
+                                            "GOB version at least %d.%d.%d required "
                                             "(this is %s)\n"
                                             "To upgrade your gob, see: "
                                             "http://www.5z.com/jirka/gob.html",
                                             maj, min, pl, VERSION);
                        }
                                             "(this is %s)\n"
                                             "To upgrade your gob, see: "
                                             "http://www.5z.com/jirka/gob.html",
                                             maj, min, pl, VERSION);
                        }
+
+                       if(effective_rmaj != effective_maj) {
+                               error_printf(GOB_ERROR, line_no,
+                                            "GOB major version %d required "
+                                            "(this is %s)\n"
+                                            "To upgrade your gob, see: "
+                                            "http://www.5z.com/jirka/gob.html",
+                                            maj, VERSION);
+                       }
                }
        YY_BREAK
 case 53:
 YY_RULE_SETUP
                }
        YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 365 "lexer.l"
+#line 384 "lexer.l"
 {
                        if(for_cpp) {
                                error_printf(GOB_WARN, line_no,
 {
                        if(for_cpp) {
                                error_printf(GOB_WARN, line_no,
@@ -1585,122 +1604,122 @@ YY_RULE_SETUP
        YY_BREAK
 case 54:
 YY_RULE_SETUP
        YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 375 "lexer.l"
+#line 394 "lexer.l"
 {return FROM;}
        YY_BREAK
 case 55:
 YY_RULE_SETUP
 {return FROM;}
        YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 377 "lexer.l"
+#line 396 "lexer.l"
 {return VOID;}
        YY_BREAK
 case 56:
 YY_RULE_SETUP
 {return VOID;}
        YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 378 "lexer.l"
+#line 397 "lexer.l"
 {return STRUCT;}
        YY_BREAK
 case 57:
 YY_RULE_SETUP
 {return STRUCT;}
        YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 379 "lexer.l"
+#line 398 "lexer.l"
 {return UNION;}
        YY_BREAK
 case 58:
 YY_RULE_SETUP
 {return UNION;}
        YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 380 "lexer.l"
+#line 399 "lexer.l"
 {return ENUM;}
        YY_BREAK
 case 59:
 YY_RULE_SETUP
 {return ENUM;}
        YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 381 "lexer.l"
+#line 400 "lexer.l"
 {return SIGNED;}
        YY_BREAK
 case 60:
 YY_RULE_SETUP
 {return SIGNED;}
        YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 382 "lexer.l"
+#line 401 "lexer.l"
 {return UNSIGNED;}
        YY_BREAK
 case 61:
 YY_RULE_SETUP
 {return UNSIGNED;}
        YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 383 "lexer.l"
+#line 402 "lexer.l"
 {return LONG;}
        YY_BREAK
 case 62:
 YY_RULE_SETUP
 {return LONG;}
        YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 384 "lexer.l"
+#line 403 "lexer.l"
 {return SHORT;}
        YY_BREAK
 case 63:
 YY_RULE_SETUP
 {return SHORT;}
        YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 385 "lexer.l"
+#line 404 "lexer.l"
 {return INT;}
        YY_BREAK
 case 64:
 YY_RULE_SETUP
 {return INT;}
        YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 386 "lexer.l"
+#line 405 "lexer.l"
 {return FLOAT;}
        YY_BREAK
 case 65:
 YY_RULE_SETUP
 {return FLOAT;}
        YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 387 "lexer.l"
+#line 406 "lexer.l"
 {return DOUBLE;}
        YY_BREAK
 case 66:
 YY_RULE_SETUP
 {return DOUBLE;}
        YY_BREAK
 case 66:
 YY_RULE_SETUP
-#line 388 "lexer.l"
+#line 407 "lexer.l"
 {return CHAR;}
        YY_BREAK
 case 67:
 YY_RULE_SETUP
 {return CHAR;}
        YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 389 "lexer.l"
+#line 408 "lexer.l"
 {return CONST;}
        YY_BREAK
 case 68:
 YY_RULE_SETUP
 {return CONST;}
        YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 391 "lexer.l"
+#line 410 "lexer.l"
 {return THREEDOTS;}
        YY_BREAK
 case 69:
 YY_RULE_SETUP
 {return THREEDOTS;}
        YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 393 "lexer.l"
+#line 412 "lexer.l"
 {yylval.line = line_no; return PUBLIC;}
        YY_BREAK
 case 70:
 YY_RULE_SETUP
 {yylval.line = line_no; return PUBLIC;}
        YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 394 "lexer.l"
+#line 413 "lexer.l"
 {yylval.line = line_no; return PRIVATE;}
        YY_BREAK
 case 71:
 YY_RULE_SETUP
 {yylval.line = line_no; return PRIVATE;}
        YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 395 "lexer.l"
+#line 414 "lexer.l"
 {yylval.line = line_no; return PROTECTED;}
        YY_BREAK
 case 72:
 YY_RULE_SETUP
 {yylval.line = line_no; return PROTECTED;}
        YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 396 "lexer.l"
+#line 415 "lexer.l"
 {yylval.line = line_no; return CLASSWIDE;}
        YY_BREAK
 case 73:
 YY_RULE_SETUP
 {yylval.line = line_no; return CLASSWIDE;}
        YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 397 "lexer.l"
+#line 416 "lexer.l"
 {yylval.line = line_no; return ARGUMENT;}
        YY_BREAK
 case 74:
 YY_RULE_SETUP
 {yylval.line = line_no; return ARGUMENT;}
        YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 398 "lexer.l"
+#line 417 "lexer.l"
 {yylval.line = line_no; return VIRTUAL;}
        YY_BREAK
 case 75:
 YY_RULE_SETUP
 {yylval.line = line_no; return VIRTUAL;}
        YY_BREAK
 case 75:
 YY_RULE_SETUP
-#line 399 "lexer.l"
+#line 418 "lexer.l"
 {yylval.line = line_no; return SIGNAL;}
        YY_BREAK
 case 76:
 YY_RULE_SETUP
 {yylval.line = line_no; return SIGNAL;}
        YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 400 "lexer.l"
+#line 419 "lexer.l"
 {yylval.line = line_no; return OVERRIDE;}
        YY_BREAK
 case 77:
 YY_RULE_SETUP
 {yylval.line = line_no; return OVERRIDE;}
        YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 401 "lexer.l"
+#line 420 "lexer.l"
 {
                        yylval.id = g_strdup(yytext);
                        return NUMBER;
 {
                        yylval.id = g_strdup(yytext);
                        return NUMBER;
@@ -1708,7 +1727,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 78:
 YY_RULE_SETUP
        YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 405 "lexer.l"
+#line 424 "lexer.l"
 {
                        /* this one is for a classname with a namespace */
                        yylval.id = g_strdup(yytext);
 {
                        /* this one is for a classname with a namespace */
                        yylval.id = g_strdup(yytext);
@@ -1717,7 +1736,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 79:
 YY_RULE_SETUP
        YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 410 "lexer.l"
+#line 429 "lexer.l"
 {
                        /* this is for a classname with an empty namespace */
                        yylval.id = g_strdup(yytext);
 {
                        /* this is for a classname with an empty namespace */
                        yylval.id = g_strdup(yytext);
@@ -1726,7 +1745,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 80:
 YY_RULE_SETUP
        YY_BREAK
 case 80:
 YY_RULE_SETUP
-#line 415 "lexer.l"
+#line 434 "lexer.l"
 {
                        yylval.id = g_strdup(yytext);
                        return TOKEN;
 {
                        yylval.id = g_strdup(yytext);
                        return TOKEN;
@@ -1734,7 +1753,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 81:
 YY_RULE_SETUP
        YY_BREAK
 case 81:
 YY_RULE_SETUP
-#line 420 "lexer.l"
+#line 439 "lexer.l"
 {
                        yylval.id = g_strdup(yytext);
                        return ARRAY_DIM;
 {
                        yylval.id = g_strdup(yytext);
                        return ARRAY_DIM;
@@ -1742,7 +1761,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 82:
 YY_RULE_SETUP
        YY_BREAK
 case 82:
 YY_RULE_SETUP
-#line 425 "lexer.l"
+#line 444 "lexer.l"
 {
                        BEGIN(CLASS_CODE_I);
                        return '{';
 {
                        BEGIN(CLASS_CODE_I);
                        return '{';
@@ -1750,7 +1769,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 83:
 YY_RULE_SETUP
        YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 429 "lexer.l"
+#line 448 "lexer.l"
 {
                        BEGIN(C_CODE);
                        parenth_depth=1;
 {
                        BEGIN(C_CODE);
                        parenth_depth=1;
@@ -1763,7 +1782,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 84:
 YY_RULE_SETUP
        YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 438 "lexer.l"
+#line 457 "lexer.l"
 {
                                BEGIN(INITIAL);
                                return '}';
 {
                                BEGIN(INITIAL);
                                return '}';
@@ -1771,12 +1790,12 @@ YY_RULE_SETUP
        YY_BREAK
 case 85:
 YY_RULE_SETUP
        YY_BREAK
 case 85:
 YY_RULE_SETUP
-#line 443 "lexer.l"
+#line 462 "lexer.l"
 ;  /*ignore*/
        YY_BREAK
 case 86:
 YY_RULE_SETUP
 ;  /*ignore*/
        YY_BREAK
 case 86:
 YY_RULE_SETUP
-#line 445 "lexer.l"
+#line 464 "lexer.l"
 {
                        yylval.line = line_no;
                        return yytext[0];
 {
                        yylval.line = line_no;
                        return yytext[0];
@@ -1784,15 +1803,15 @@ YY_RULE_SETUP
        YY_BREAK
 case 87:
 YY_RULE_SETUP
        YY_BREAK
 case 87:
 YY_RULE_SETUP
-#line 450 "lexer.l"
+#line 469 "lexer.l"
 ;  /*ignore*/
        YY_BREAK
 case 88:
 YY_RULE_SETUP
 ;  /*ignore*/
        YY_BREAK
 case 88:
 YY_RULE_SETUP
-#line 452 "lexer.l"
+#line 471 "lexer.l"
 ECHO;
        YY_BREAK
 ECHO;
        YY_BREAK
-#line 1796 "lex.yy.c"
+#line 1815 "lex.yy.c"
                        case YY_STATE_EOF(INITIAL):
                        case YY_STATE_EOF(COMMENT):
                        case YY_STATE_EOF(C_CODE):
                        case YY_STATE_EOF(INITIAL):
                        case YY_STATE_EOF(COMMENT):
                        case YY_STATE_EOF(C_CODE):
@@ -2682,7 +2701,7 @@ int main()
        return 0;
        }
 #endif
        return 0;
        }
 #endif
-#line 452 "lexer.l"
+#line 471 "lexer.l"
 
 
 /* Ugly warning avoiding */
 
 
 /* Ugly warning avoiding */
index f45fcc5bc384f246e709a019bbce5d238921936f..95cbf52c0fd83b61bf479d9e44fb8cb69796d99c 100644 (file)
@@ -344,22 +344,41 @@ class             {
 ^[ \t]*requires[ \t]+[0-9]+\.[0-9]+\.[0-9]+[\t ]*$     {
                        int maj = 0,min = 0,pl = 0;
                        int rmaj = 0,rmin = 0,rpl = 0;
 ^[ \t]*requires[ \t]+[0-9]+\.[0-9]+\.[0-9]+[\t ]*$     {
                        int maj = 0,min = 0,pl = 0;
                        int rmaj = 0,rmin = 0,rpl = 0;
+                       int effective_maj = 0;
+                       int effective_rmaj = 0;
                        char *p;
                        
                        sscanf(VERSION,"%d.%d.%d",&rmaj,&rmin,&rpl);
                        char *p;
                        
                        sscanf(VERSION,"%d.%d.%d",&rmaj,&rmin,&rpl);
+                       effective_rmaj = rmaj;
+                       if (rmin >= 90)
+                               effective_rmaj = rmaj + 1;
+
                        p = strchr(yytext,'r');
                        g_assert(p); /* we MUST have found it */
                        sscanf(p,"requires %d.%d.%d",&maj,&min,&pl);
                        p = strchr(yytext,'r');
                        g_assert(p); /* we MUST have found it */
                        sscanf(p,"requires %d.%d.%d",&maj,&min,&pl);
+                       effective_maj = maj;
+                       if (min >= 90)
+                               effective_maj = maj + 1;
+
                        if(rmaj < maj ||
                           (rmaj == maj && rmin < min) ||
                           (rmaj == maj && rmin == min && rpl < pl)) {
                                error_printf(GOB_ERROR, line_no,
                        if(rmaj < maj ||
                           (rmaj == maj && rmin < min) ||
                           (rmaj == maj && rmin == min && rpl < pl)) {
                                error_printf(GOB_ERROR, line_no,
-                                            "GOB version %d.%d.%d required "
+                                            "GOB version at least %d.%d.%d required "
                                             "(this is %s)\n"
                                             "To upgrade your gob, see: "
                                             "http://www.5z.com/jirka/gob.html",
                                             maj, min, pl, VERSION);
                        }
                                             "(this is %s)\n"
                                             "To upgrade your gob, see: "
                                             "http://www.5z.com/jirka/gob.html",
                                             maj, min, pl, VERSION);
                        }
+
+                       if(effective_rmaj != effective_maj) {
+                               error_printf(GOB_ERROR, line_no,
+                                            "GOB major version %d required "
+                                            "(this is %s)\n"
+                                            "To upgrade your gob, see: "
+                                            "http://www.5z.com/jirka/gob.html",
+                                            maj, VERSION);
+                       }
                }
 
 <CLASS_CODE,CLASS_CODE_I>class|this    {
                }
 
 <CLASS_CODE,CLASS_CODE_I>class|this    {
index a3682d1acd411fabda5ae01d3d50240f79a77f49..f60175774e8d66e853d41731c390c96d75f506c9 100644 (file)
@@ -559,7 +559,8 @@ make_inits(Class *cl)
                                  NULL, NULL, NULL, g_strdup("class_init"),
                                  make_func_arg(cl->otype, TRUE, g_strdup("c")),
                                  NULL, NULL, NULL, 0, 0, FALSE,
                                  NULL, NULL, NULL, g_strdup("class_init"),
                                  make_func_arg(cl->otype, TRUE, g_strdup("c")),
                                  NULL, NULL, NULL, 0, 0, FALSE,
-                                 method_unique_id++);
+                                 method_unique_id++,
+                                 FALSE /*bonobo_x_func*/);
                cl->nodes = g_list_prepend(cl->nodes, node);
        }
        if(!got_init) {
                cl->nodes = g_list_prepend(cl->nodes, node);
        }
        if(!got_init) {
@@ -569,7 +570,8 @@ make_inits(Class *cl)
                                  NULL, NULL, NULL, g_strdup("init"),
                                  make_func_arg(cl->otype, FALSE, g_strdup("o")),
                                  NULL, NULL, NULL, 0, 0, FALSE,
                                  NULL, NULL, NULL, g_strdup("init"),
                                  make_func_arg(cl->otype, FALSE, g_strdup("o")),
                                  NULL, NULL, NULL, 0, 0, FALSE,
-                                 method_unique_id++);
+                                 method_unique_id++,
+                                 FALSE /*bonobo_x_func*/);
                cl->nodes = g_list_prepend(cl->nodes, node);
        }
 }
                cl->nodes = g_list_prepend(cl->nodes, node);
        }
 }
@@ -850,6 +852,49 @@ add_get_type(void)
                   "}\n\n");
 }
 
                   "}\n\n");
 }
 
+static void
+add_bonobo_x_get_type (void)
+{
+       char *chunk_size = ((Class*)class)->chunk_size;
+       
+       out_printf(out,
+                  "GtkType\n"
+                  "%s_get_type (void)\n"
+                  "{\n"
+                  "\tstatic GtkType type = 0;\n\n"
+                  "\tif (type == 0) {\n"
+                  "\t\tstatic const GtkTypeInfo info = {\n"
+                  "\t\t\t\"%s\",\n"
+                  "\t\t\tsizeof (%s),\n"
+                  "\t\t\tsizeof (%sClass),\n"
+                  "\t\t\t(GtkClassInitFunc) %s_class_init,\n"
+                  "\t\t\t(GtkObjectInitFunc) %s_init,\n"
+                  "\t\t\t/* reserved_1 */ NULL,\n"
+                  "\t\t\t/* reserved_2 */ NULL,\n"
+                  "\t\t\t(GtkClassInitFunc) NULL\n"
+                  "\t\t};\n\n"
+                  "\t\ttype = bonobo_x_type_unique\n"
+                  "\t\t\t(%s_get_type (),\n"
+                  "\t\t\tPOA_%s__init, NULL,\n"
+                  "\t\t\tGTK_STRUCT_OFFSET (%sClass, _epv),\n"
+                  "\t\t\t&info);\n",
+                  funcbase, typebase, typebase, typebase,
+                  funcbase, funcbase, pfuncbase,
+                  ((Class*)class)->bonobo_x_class,
+                  typebase);
+       if(chunk_size)  {
+               out_printf(out,
+                          "#if %s > 0\n"
+                          "\t\tgtk_type_set_chunk_alloc(type, %s);\n"
+                          "#endif\n", 
+                          chunk_size, chunk_size);
+       }
+       out_printf(out,
+                  "\t}\n\n"
+                  "\treturn type;\n"
+                  "}\n\n");
+}
+
 static void
 add_overrides(Class *c, const char *oname, gboolean did_base_obj)
 {
 static void
 add_overrides(Class *c, const char *oname, gboolean did_base_obj)
 {
@@ -1356,6 +1401,36 @@ add_finalize(Class *c)
                   "#undef __GOB_FUNCTION__\n\n");
 }
 
                   "#undef __GOB_FUNCTION__\n\n");
 }
 
+static void
+make_bonobo_x_epv (Class *c, const char *classname)
+{
+       GList *li;
+       gboolean added_line = FALSE;
+
+       for (li = c->nodes; li != NULL; li = li->next) {
+               Node *n = li->data;
+               Method *m = (Method *)n;
+               if(n->type != METHOD_NODE ||
+                  m->method == OVERRIDE_METHOD)
+                       continue;
+
+               if (m->bonobo_x_func) {
+                       if(m->line_no > 0) {
+                               out_addline_infile(out, m->line_no);
+                               added_line = TRUE;
+                       } else if (m->line_no == 0 &&
+                                  added_line) {
+                               out_addline_outfile(out);
+                               added_line = FALSE;
+                       }
+                       out_printf (out, "\t%s->_epv.%s = %s;\n",
+                                   classname, m->id, m->id);
+               }
+       }
+       if (added_line)
+               out_addline_outfile(out);
+}
+
 static void
 add_inits(Class *c)
 {
 static void
 add_inits(Class *c)
 {
@@ -1479,6 +1554,9 @@ add_inits(Class *c)
                        if(get_arguments > 0 || set_arguments > 0)
                                make_arguments(c);
 
                        if(get_arguments > 0 || set_arguments > 0)
                                make_arguments(c);
 
+                       if (c->bonobo_x_class != NULL) {
+                               make_bonobo_x_epv (c, ((FuncArg *)m->args->data)->name);
+                       }
                } else
                        continue;
 
                } else
                        continue;
 
@@ -1677,6 +1755,8 @@ print_preconditions(Method *m)
 static void
 print_method_body(Method *m, int pre)
 {
 static void
 print_method_body(Method *m, int pre)
 {
+       if (m->line_no > 0)
+               out_addline_outfile(out);
        out_printf(out, "{\n"
                   "#define __GOB_FUNCTION__ \"%s::%s\"\n",
                   ((Class *)class)->otype,
        out_printf(out, "{\n"
                   "#define __GOB_FUNCTION__ \"%s::%s\"\n",
                   ((Class *)class)->otype,
@@ -2278,6 +2358,13 @@ print_class_block(Class *c)
                if(n->type == METHOD_NODE)
                        put_vs_method((Method *)n);
        }
                if(n->type == METHOD_NODE)
                        put_vs_method((Method *)n);
        }
+       /* If BonoboX type class put down the epv */
+       if (c->bonobo_x_class != NULL) {
+               out_printf (outh,
+                           "\t/* Bonobo object epv */\n"
+                           "\tPOA_%s__epv _epv;\n",
+                           c->bonobo_x_class);
+       }
        /* put class scope variables */
        for(l = c->nodes; l != NULL; l = l->next) {
                Node *n = l->data;
        /* put class scope variables */
        for(l = c->nodes; l != NULL; l = l->next) {
                Node *n = l->data;
@@ -2304,11 +2391,13 @@ print_class_block(Class *c)
                   " * Public methods\n"
                   " */\n");
 
                   " * Public methods\n"
                   " */\n");
 
-       out_printf(outh, "GtkType\t%s_get_type\t(void)", funcbase);
-       if ( ! no_gnu) {
-               out_printf(outh, " G_GNUC_CONST;\n");
-       } else {
-               out_printf(outh, ";\n");
+       if ( ! overrode_get_type) {
+               out_printf(outh, "GtkType\t%s_get_type\t(void)", funcbase);
+               if ( ! no_gnu) {
+                       out_printf(outh, " G_GNUC_CONST;\n");
+               } else {
+                       out_printf(outh, ";\n");
+               }
        }
 
        for(l = c->nodes; l != NULL; l = l->next) {
        }
 
        for(l = c->nodes; l != NULL; l = l->next) {
@@ -2362,8 +2451,12 @@ print_class_block(Class *c)
 
        add_enums(c);
 
 
        add_enums(c);
 
-       if ( ! overrode_get_type)
-               add_get_type();
+       if ( ! overrode_get_type) {
+               if (c->bonobo_x_class != NULL)
+                       add_bonobo_x_get_type ();
+               else
+                       add_get_type ();
+       }
 
        if(any_method_to_alias(c)) {
                if( ! no_gnu) {
 
        if(any_method_to_alias(c)) {
                if( ! no_gnu) {
index 9fdfed3c50279b80f71c3af2fb7679d09900901a..420897c8399a4ddb7e0c503e99e77253a4fb31e9 100644 (file)
@@ -58,13 +58,15 @@ GList *nodes = NULL;
 
 static GList *class_nodes = NULL;
 Node *class = NULL;
 
 static GList *class_nodes = NULL;
 Node *class = NULL;
-char *chunk_size = NULL;
 
 
+static char *chunk_size = NULL;
+static char *bonobo_x_class = NULL;
 static GList *typestack = NULL;
 static GList *funcargs = NULL;
 static GList *checks = NULL;
 static int has_self = FALSE;
 static int vararg = FALSE;
 static GList *typestack = NULL;
 static GList *funcargs = NULL;
 static GList *checks = NULL;
 static int has_self = FALSE;
 static int vararg = FALSE;
+static Method *last_added_method = NULL;
 
 /* destructor and initializer for variables */
 static char *destructor = NULL;
 
 /* destructor and initializer for variables */
 static char *destructor = NULL;
@@ -190,7 +192,10 @@ push_function(int scope, int method, char *oid, char *id,
 
        node = new_method(scope, method, type, oid, gtktypes, flags,
                          id, funcargs, onerror, defreturn, c_cbuf, line_no,
 
        node = new_method(scope, method, type, oid, gtktypes, flags,
                          id, funcargs, onerror, defreturn, c_cbuf, line_no,
-                         ccode_line, vararg, method_unique_id++);
+                         ccode_line, vararg, method_unique_id++,
+                         FALSE);
+
+       last_added_method = (Method *)node;
 
        if(cbuf)
                g_string_free(cbuf,
 
        if(cbuf)
                g_string_free(cbuf,
@@ -311,7 +316,7 @@ set_return_value(char *type, char *val)
 }
 
 
 }
 
 
-#line 293 "parse.y"
+#line 298 "parse.y"
 typedef union {
        char *id;
        GString *cbuf;
 typedef union {
        char *id;
        GString *cbuf;
@@ -333,7 +338,7 @@ typedef union {
 
 
 
 
 
 
-#define        YYFINAL         263
+#define        YYFINAL         270
 #define        YYFLAG          -32768
 #define        YYNTBASE        50
 
 #define        YYFLAG          -32768
 #define        YYNTBASE        50
 
@@ -374,19 +379,19 @@ static const char yytranslate[] = {     0,
 #if YYDEBUG != 0
 static const short yyprhs[] = {     0,
      0,     4,     7,    10,    12,    14,    16,    18,    20,    22,
 #if YYDEBUG != 0
 static const short yyprhs[] = {     0,
      0,     4,     7,    10,    12,    14,    16,    18,    20,    22,
-    24,    27,    29,    34,    38,    44,    45,    50,    55,    58,
-    60,    62,    64,    66,    68,    70,    72,    74,    76,    79,
-    83,    86,    90,    93,    96,    98,   100,   101,   107,   114,
-   126,   135,   141,   147,   149,   153,   154,   158,   160,   163,
-   165,   167,   169,   172,   175,   178,   182,   186,   189,   192,
-   195,   197,   200,   202,   205,   207,   209,   211,   213,   215,
-   217,   219,   221,   223,   225,   227,   229,   231,   234,   237,
-   241,   244,   246,   250,   254,   257,   259,   264,   268,   270,
-   273,   275,   286,   298,   308,   318,   327,   339,   348,   354,
-   357,   362,   363,   365,   368,   370,   372,   375,   378,   382,
-   387,   392,   394,   398,   400,   404,   406,   409,   413,   420,
-   428,   431,   433,   435,   438,   441,   445,   449,   453,   457,
-   459,   462
+    24,    27,    29,    34,    38,    44,    45,    51,    57,    60,
+    62,    64,    67,    69,    71,    73,    75,    77,    79,    81,
+    84,    88,    91,    95,    98,   101,   103,   105,   106,   112,
+   119,   131,   140,   146,   152,   154,   158,   159,   163,   165,
+   168,   170,   172,   174,   177,   180,   183,   187,   191,   194,
+   197,   200,   202,   205,   207,   210,   212,   214,   216,   218,
+   220,   222,   224,   226,   228,   230,   232,   234,   236,   239,
+   242,   246,   249,   251,   255,   259,   262,   264,   269,   273,
+   275,   278,   280,   291,   303,   313,   323,   332,   344,   353,
+   359,   362,   367,   368,   370,   373,   375,   377,   380,   383,
+   387,   392,   397,   399,   403,   405,   409,   411,   414,   418,
+   425,   433,   436,   438,   440,   443,   446,   450,   454,   458,
+   462,   464,   467
 };
 
 static const short yyrhs[] = {    52,
 };
 
 static const short yyrhs[] = {    52,
@@ -394,69 +399,69 @@ static const short yyrhs[] = {    52,
      0,    23,     0,    26,     0,    24,     0,    25,     0,    27,
      0,    28,     0,    52,    51,     0,    51,     0,    54,    37,
     56,    38,     0,    54,    37,    38,     0,     3,    21,     4,
      0,    23,     0,    26,     0,    24,     0,    25,     0,    27,
      0,    28,     0,    52,    51,     0,    51,     0,    54,    37,
     56,    38,     0,    54,    37,    38,     0,     3,    21,     4,
-    21,    55,     0,     0,    39,    19,    19,    40,     0,    39,
-    19,    20,    40,     0,    56,    57,     0,    57,     0,    78,
-     0,    62,     0,    63,     0,    41,     0,    29,     0,    30,
-     0,    31,     0,    32,     0,    19,    19,     0,    19,    37,
-    23,     0,    42,    87,     0,    42,    37,    23,     0,    59,
-    60,     0,    60,    59,     0,    60,     0,    59,     0,     0,
-    58,    67,    19,    61,    41,     0,    58,    67,    19,    22,
-    61,    41,     0,    33,    65,    64,    19,    19,    37,    23,
-    19,    37,    23,    41,     0,    33,    65,    64,    19,    19,
-    37,    23,    41,     0,    33,    65,    64,    19,    19,     0,
-    19,    39,    19,    67,    40,     0,    19,     0,    39,    66,
-    40,     0,     0,    19,    43,    66,     0,    19,     0,    68,
-    72,     0,    68,     0,    69,     0,    19,     0,     5,    19,
-     0,    19,     5,     0,    71,    19,     0,     5,    71,    19,
-     0,    71,    19,     5,     0,    70,    69,     0,    21,    69,
-     0,     5,    69,     0,    21,     0,    21,     5,     0,    70,
-     0,    70,     5,     0,     6,     0,    18,     0,    14,     0,
-    15,     0,    13,     0,    16,     0,    17,     0,    11,     0,
-    12,     0,     7,     0,     8,     0,     9,     0,    44,     0,
-    44,     5,     0,    44,    72,     0,    44,     5,    72,     0,
-    19,    75,     0,    75,     0,    58,    19,    75,     0,    19,
-    58,    75,     0,    58,    75,     0,    73,     0,    19,    39,
-    76,    40,     0,    76,    45,    19,     0,    19,     0,    37,
-    23,     0,    41,     0,    35,    65,    74,    67,    19,    39,
-    81,    40,    79,    77,     0,    58,    35,    65,    73,    67,
-    19,    39,    81,    40,    79,    77,     0,    34,    58,    67,
-    19,    39,    81,    40,    79,    77,     0,    58,    34,    67,
-    19,    39,    81,    40,    79,    77,     0,    34,    67,    19,
-    39,    81,    40,    79,    77,     0,    36,    39,    21,    40,
-    67,    19,    39,    81,    40,    79,    77,     0,    58,    67,
-    19,    39,    81,    40,    79,    77,     0,    19,    39,    19,
-    40,    77,     0,    19,    80,     0,    19,    80,    19,    80,
-     0,     0,    87,     0,    37,    23,     0,     6,     0,    19,
-     0,    19,     5,     0,     5,    19,     0,    19,    45,    82,
-     0,    19,     5,    45,    82,     0,     5,    19,    45,    82,
-     0,    82,     0,    83,    45,    10,     0,    83,     0,    83,
-    45,    84,     0,    84,     0,    67,    19,     0,    67,    19,
-    22,     0,    67,    19,    39,    19,    85,    40,     0,    67,
-    19,    22,    39,    19,    85,    40,     0,    85,    86,     0,
-    86,     0,    19,     0,    46,    87,     0,    47,    87,     0,
-    46,    42,    87,     0,    47,    42,    87,     0,    42,    42,
-    87,     0,    48,    42,    87,     0,    20,     0,    49,    20,
-     0,    19,     0
+    21,    55,     0,     0,    39,    19,    19,    40,    55,     0,
+    39,    19,    20,    40,    55,     0,    56,    57,     0,    57,
+     0,    78,     0,    19,    78,     0,    62,     0,    63,     0,
+    41,     0,    29,     0,    30,     0,    31,     0,    32,     0,
+    19,    19,     0,    19,    37,    23,     0,    42,    87,     0,
+    42,    37,    23,     0,    59,    60,     0,    60,    59,     0,
+    60,     0,    59,     0,     0,    58,    67,    19,    61,    41,
+     0,    58,    67,    19,    22,    61,    41,     0,    33,    65,
+    64,    19,    19,    37,    23,    19,    37,    23,    41,     0,
+    33,    65,    64,    19,    19,    37,    23,    41,     0,    33,
+    65,    64,    19,    19,     0,    19,    39,    19,    67,    40,
+     0,    19,     0,    39,    66,    40,     0,     0,    19,    43,
+    66,     0,    19,     0,    68,    72,     0,    68,     0,    69,
+     0,    19,     0,     5,    19,     0,    19,     5,     0,    71,
+    19,     0,     5,    71,    19,     0,    71,    19,     5,     0,
+    70,    69,     0,    21,    69,     0,     5,    69,     0,    21,
+     0,    21,     5,     0,    70,     0,    70,     5,     0,     6,
+     0,    18,     0,    14,     0,    15,     0,    13,     0,    16,
+     0,    17,     0,    11,     0,    12,     0,     7,     0,     8,
+     0,     9,     0,    44,     0,    44,     5,     0,    44,    72,
+     0,    44,     5,    72,     0,    19,    75,     0,    75,     0,
+    58,    19,    75,     0,    19,    58,    75,     0,    58,    75,
+     0,    73,     0,    19,    39,    76,    40,     0,    76,    45,
+    19,     0,    19,     0,    37,    23,     0,    41,     0,    35,
+    65,    74,    67,    19,    39,    81,    40,    79,    77,     0,
+    58,    35,    65,    73,    67,    19,    39,    81,    40,    79,
+    77,     0,    34,    58,    67,    19,    39,    81,    40,    79,
+    77,     0,    58,    34,    67,    19,    39,    81,    40,    79,
+    77,     0,    34,    67,    19,    39,    81,    40,    79,    77,
+     0,    36,    39,    21,    40,    67,    19,    39,    81,    40,
+    79,    77,     0,    58,    67,    19,    39,    81,    40,    79,
+    77,     0,    19,    39,    19,    40,    77,     0,    19,    80,
+     0,    19,    80,    19,    80,     0,     0,    87,     0,    37,
+    23,     0,     6,     0,    19,     0,    19,     5,     0,     5,
+    19,     0,    19,    45,    82,     0,    19,     5,    45,    82,
+     0,     5,    19,    45,    82,     0,    82,     0,    83,    45,
+    10,     0,    83,     0,    83,    45,    84,     0,    84,     0,
+    67,    19,     0,    67,    19,    22,     0,    67,    19,    39,
+    19,    85,    40,     0,    67,    19,    22,    39,    19,    85,
+    40,     0,    85,    86,     0,    86,     0,    19,     0,    46,
+    87,     0,    47,    87,     0,    46,    42,    87,     0,    47,
+    42,    87,     0,    42,    42,    87,     0,    48,    42,    87,
+     0,    20,     0,    49,    20,     0,    19,     0
 };
 
 #endif
 
 #if YYDEBUG != 0
 static const short yyrline[] = { 0,
 };
 
 #endif
 
 #if YYDEBUG != 0
 static const short yyrline[] = { 0,
-   311,   312,   313,   314,   317,   323,   329,   335,   341,   347,
-   355,   356,   359,   364,   371,   376,   377,   385,   396,   397,
-   400,   401,   402,   403,   406,   407,   408,   409,   412,   425,
-   441,   445,   453,   454,   455,   456,   457,   463,   466,   470,
-   506,   535,   609,   618,   624,   625,   628,   631,   637,   641,
-   648,   651,   654,   658,   662,   666,   671,   679,   683,   688,
-   692,   695,   699,   702,   707,   708,   709,   710,   711,   712,
-   713,   714,   715,   718,   719,   720,   723,   724,   725,   729,
-   736,   748,   754,   766,   778,   781,   787,   792,   795,   800,
-   801,   805,   821,   837,   853,   869,   880,   886,   896,   919,
-   930,   949,   955,   956,   962,   963,   974,   985,   996,  1006,
-  1016,  1026,  1029,  1030,  1033,  1034,  1037,  1040,  1043,  1051,
-  1061,  1062,  1065,  1078,  1082,  1086,  1090,  1094,  1098,  1104,
-  1105,  1109
+   316,   317,   318,   319,   322,   328,   334,   340,   346,   352,
+   360,   361,   364,   369,   376,   382,   383,   395,   409,   410,
+   413,   414,   422,   423,   424,   427,   428,   429,   430,   433,
+   446,   462,   466,   474,   475,   476,   477,   478,   484,   487,
+   491,   527,   556,   628,   637,   643,   644,   647,   650,   656,
+   660,   667,   670,   673,   677,   681,   685,   690,   698,   702,
+   707,   711,   714,   718,   721,   726,   727,   728,   729,   730,
+   731,   732,   733,   734,   737,   738,   739,   742,   743,   744,
+   748,   755,   767,   773,   785,   797,   800,   806,   811,   814,
+   819,   820,   824,   840,   856,   872,   888,   899,   905,   915,
+   938,   949,   968,   974,   975,   981,   982,   993,  1004,  1015,
+  1025,  1035,  1045,  1048,  1049,  1052,  1053,  1056,  1059,  1062,
+  1070,  1080,  1081,  1084,  1097,  1101,  1105,  1109,  1113,  1117,
+  1123,  1124,  1128
 };
 #endif
 
 };
 #endif
 
@@ -469,7 +474,7 @@ static const char * const yytname[] = {   "$","error","$undefined.","CLASS",
 "CCODE","HTCODE","PHCODE","HCODE","ACODE","ATCODE","PUBLIC","PRIVATE","PROTECTED",
 "CLASSWIDE","ARGUMENT","VIRTUAL","SIGNAL","OVERRIDE","'{'","'}'","'('","')'",
 "';'","'='","'|'","'*'","','","'>'","'<'","'!'","'-'","prog","ccode","ccodes",
 "CCODE","HTCODE","PHCODE","HCODE","ACODE","ATCODE","PUBLIC","PRIVATE","PROTECTED",
 "CLASSWIDE","ARGUMENT","VIRTUAL","SIGNAL","OVERRIDE","'{'","'}'","'('","')'",
 "';'","'='","'|'","'*'","','","'>'","'<'","'!'","'-'","prog","ccode","ccodes",
-"class","classdec","chunk","classcode","thing","scope","destructor","initializer",
+"class","classdec","classflags","classcode","thing","scope","destructor","initializer",
 "varoptions","variable","argument","argtype","flags","flaglist","type","specifier_list",
 "spec_list","specifier","strunionenum","pointer","simplesigtype","fullsigtype",
 "sigtype","tokenlist","codenocode","method","returnvals","retcode","funcargs",
 "varoptions","variable","argument","argtype","flags","flaglist","type","specifier_list",
 "spec_list","specifier","strunionenum","pointer","simplesigtype","fullsigtype",
 "sigtype","tokenlist","codenocode","method","returnvals","retcode","funcargs",
@@ -480,203 +485,207 @@ static const char * const yytname[] = {   "$","error","$undefined.","CLASS",
 static const short yyr1[] = {     0,
     50,    50,    50,    50,    51,    51,    51,    51,    51,    51,
     52,    52,    53,    53,    54,    55,    55,    55,    56,    56,
 static const short yyr1[] = {     0,
     50,    50,    50,    50,    51,    51,    51,    51,    51,    51,
     52,    52,    53,    53,    54,    55,    55,    55,    56,    56,
-    57,    57,    57,    57,    58,    58,    58,    58,    59,    59,
-    60,    60,    61,    61,    61,    61,    61,    62,    62,    63,
-    63,    63,    64,    64,    65,    65,    66,    66,    67,    67,
-    68,    68,    68,    68,    68,    68,    68,    69,    69,    69,
-    69,    69,    69,    69,    70,    70,    70,    70,    70,    70,
-    70,    70,    70,    71,    71,    71,    72,    72,    72,    72,
-    73,    73,    74,    74,    74,    74,    75,    76,    76,    77,
-    77,    78,    78,    78,    78,    78,    78,    78,    78,    79,
-    79,    79,    80,    80,    81,    81,    81,    81,    81,    81,
-    81,    81,    82,    82,    83,    83,    84,    84,    84,    84,
-    85,    85,    86,    86,    86,    86,    86,    86,    86,    87,
-    87,    87
+    57,    57,    57,    57,    57,    58,    58,    58,    58,    59,
+    59,    60,    60,    61,    61,    61,    61,    61,    62,    62,
+    63,    63,    63,    64,    64,    65,    65,    66,    66,    67,
+    67,    68,    68,    68,    68,    68,    68,    68,    69,    69,
+    69,    69,    69,    69,    69,    70,    70,    70,    70,    70,
+    70,    70,    70,    70,    71,    71,    71,    72,    72,    72,
+    72,    73,    73,    74,    74,    74,    74,    75,    76,    76,
+    77,    77,    78,    78,    78,    78,    78,    78,    78,    78,
+    79,    79,    79,    80,    80,    81,    81,    81,    81,    81,
+    81,    81,    81,    82,    82,    83,    83,    84,    84,    84,
+    84,    85,    85,    86,    86,    86,    86,    86,    86,    86,
+    87,    87,    87
 };
 
 static const short yyr2[] = {     0,
      3,     2,     2,     1,     1,     1,     1,     1,     1,     1,
 };
 
 static const short yyr2[] = {     0,
      3,     2,     2,     1,     1,     1,     1,     1,     1,     1,
-     2,     1,     4,     3,     5,     0,     4,     4,     2,     1,
-     1,     1,     1,     1,     1,     1,     1,     1,     2,     3,
-     2,     3,     2,     2,     1,     1,     0,     5,     6,    11,
-     8,     5,     5,     1,     3,     0,     3,     1,     2,     1,
-     1,     1,     2,     2,     2,     3,     3,     2,     2,     2,
-     1,     2,     1,     2,     1,     1,     1,     1,     1,     1,
-     1,     1,     1,     1,     1,     1,     1,     2,     2,     3,
-     2,     1,     3,     3,     2,     1,     4,     3,     1,     2,
-     1,    10,    11,     9,     9,     8,    11,     8,     5,     2,
-     4,     0,     1,     2,     1,     1,     2,     2,     3,     4,
-     4,     1,     3,     1,     3,     1,     2,     3,     6,     7,
-     2,     1,     1,     2,     2,     3,     3,     3,     3,     1,
-     2,     1
+     2,     1,     4,     3,     5,     0,     5,     5,     2,     1,
+     1,     2,     1,     1,     1,     1,     1,     1,     1,     2,
+     3,     2,     3,     2,     2,     1,     1,     0,     5,     6,
+    11,     8,     5,     5,     1,     3,     0,     3,     1,     2,
+     1,     1,     1,     2,     2,     2,     3,     3,     2,     2,
+     2,     1,     2,     1,     2,     1,     1,     1,     1,     1,
+     1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
+     3,     2,     1,     3,     3,     2,     1,     4,     3,     1,
+     2,     1,    10,    11,     9,     9,     8,    11,     8,     5,
+     2,     4,     0,     1,     2,     1,     1,     2,     2,     3,
+     4,     4,     1,     3,     1,     3,     1,     2,     3,     6,
+     7,     2,     1,     1,     2,     2,     3,     3,     3,     3,
+     1,     2,     1
 };
 
 static const short yydefact[] = {     0,
      0,     5,     7,     8,     6,     9,    10,    12,     0,     4,
 };
 
 static const short yydefact[] = {     0,
      0,     5,     7,     8,     6,     9,    10,    12,     0,     4,
-     0,     0,    11,     3,     2,     0,     0,     1,     0,    25,
-    26,    27,    28,    46,     0,    46,     0,    14,    24,     0,
-    20,     0,    22,    23,    21,    16,     0,     0,     0,     0,
-    65,    74,    75,    76,    72,    73,    69,    67,    68,    70,
-    71,    66,    52,    61,     0,     0,    50,    51,    63,     0,
-     0,     0,    13,    19,     0,    46,     0,     0,    15,     0,
-    48,     0,    44,     0,     0,    53,    60,     0,    54,    62,
-    59,     0,     0,    77,    49,    64,    58,    55,     0,     0,
-    86,     0,    82,     0,     0,     0,    37,     0,     0,     0,
-    45,     0,     0,    56,     0,     0,    78,    79,    57,     0,
-     0,     0,    81,     0,    85,     0,     0,     0,     0,     0,
-     0,    37,     0,     0,    36,    35,     0,     0,     0,     0,
-    91,    99,    47,     0,    42,     0,     0,    65,    52,     0,
-     0,   112,   114,   116,    80,    89,     0,    84,    83,     0,
-     0,     0,     0,    29,     0,     0,     0,   132,   130,     0,
-     0,    31,    33,    34,    38,    17,    18,    90,     0,     0,
-     0,    53,    54,     0,   117,   102,     0,    87,     0,     0,
-     0,     0,     0,    30,    39,   102,    32,   131,    43,     0,
-   102,     0,     0,   109,   118,     0,     0,     0,   113,   115,
-    88,     0,     0,   102,     0,     0,     0,    41,     0,   111,
-   110,     0,     0,     0,   100,   103,    96,   102,     0,     0,
-     0,    98,     0,    94,     0,   123,     0,     0,     0,     0,
-     0,   122,   104,     0,     0,   102,    95,   102,     0,     0,
-     0,     0,   124,     0,   125,     0,   119,   121,   101,    92,
-     0,     0,    40,   120,   128,   126,   127,   129,    97,    93,
-     0,     0,     0
+     0,     0,    11,     3,     2,     0,     0,     1,     0,    26,
+    27,    28,    29,    47,     0,    47,     0,    14,    25,     0,
+    20,     0,    23,    24,    21,    16,     0,     0,     0,    22,
+     0,     0,     0,    66,    75,    76,    77,    73,    74,    70,
+    68,    69,    71,    72,    67,    53,    62,     0,     0,    51,
+    52,    64,     0,     0,     0,    13,    19,     0,    47,     0,
+     0,    15,     0,     0,    49,     0,    45,     0,     0,    54,
+    61,     0,    55,    63,    60,     0,     0,    78,    50,    65,
+    59,    56,     0,     0,    87,     0,    83,     0,     0,     0,
+    38,     0,     0,     0,     0,    46,     0,     0,    57,     0,
+     0,    79,    80,    58,     0,     0,     0,    82,     0,    86,
+     0,     0,     0,     0,     0,     0,    38,     0,     0,    37,
+    36,     0,     0,     0,     0,    92,   100,    48,     0,    43,
+     0,     0,    66,    53,     0,     0,   113,   115,   117,    81,
+    90,     0,    85,    84,     0,     0,     0,     0,    30,     0,
+     0,     0,   133,   131,     0,     0,    32,    34,    35,    39,
+    16,    16,    91,     0,     0,     0,    54,    55,     0,   118,
+   103,     0,    88,     0,     0,     0,     0,     0,    31,    40,
+   103,    33,   132,    17,    18,    44,     0,   103,     0,     0,
+   110,   119,     0,     0,     0,   114,   116,    89,     0,     0,
+   103,     0,     0,     0,    42,     0,   112,   111,     0,     0,
+     0,   101,   104,    97,   103,     0,     0,     0,    99,     0,
+    95,     0,   124,     0,     0,     0,     0,     0,   123,   105,
+     0,     0,   103,    96,   103,     0,     0,     0,     0,   125,
+     0,   126,     0,   120,   122,   102,    93,     0,     0,    41,
+   121,   129,   127,   128,   130,    98,    94,     0,     0,     0
 };
 
 };
 
-static const short yydefgoto[] = {   261,
-     8,     9,    10,    11,    69,    30,    31,    32,   125,   126,
-   127,    33,    34,    74,    39,    72,   140,    57,    58,    59,
-    60,    85,    91,    92,    93,   147,   132,    35,   198,   215,
-   141,   142,   143,   144,   231,   232,   216
+static const short yydefgoto[] = {   268,
+     8,     9,    10,    11,    72,    30,    31,    32,   130,   131,
+   132,    33,    34,    78,    42,    76,   145,    60,    61,    62,
+    63,    89,    95,    96,    97,   152,   137,    35,   205,   222,
+   146,   147,   148,   149,   238,   239,   223
 };
 
 };
 
-static const short yypact[] = {    88,
-   -12,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    88,   347,
-   -15,    15,-32768,   347,   347,   157,    18,   347,     7,-32768,
--32768,-32768,-32768,    25,   153,    25,    36,-32768,-32768,   175,
--32768,   118,-32768,-32768,-32768,    67,   102,   122,   135,   245,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,    22,   313,   262,   144,   131,-32768,   327,   160,
-   198,   159,-32768,-32768,   262,    25,   162,   180,-32768,   161,
-   171,   178,   164,   181,   341,-32768,-32768,   183,-32768,   341,
--32768,   196,   182,     8,-32768,   341,-32768,   214,   193,   201,
--32768,   262,-32768,   186,   212,   229,    48,    62,    57,   122,
--32768,   236,   246,-32768,   233,   279,   131,-32768,-32768,   243,
-   270,   280,-32768,    50,-32768,   287,   262,   277,    50,   262,
-    -1,     9,   279,    -5,   278,   302,   281,   283,   295,   314,
--32768,-32768,-32768,   262,   299,   279,   296,   309,     0,   331,
-   311,-32768,   316,-32768,-32768,-32768,    98,-32768,-32768,   324,
-   345,   279,   346,-32768,   344,   335,   328,-32768,-32768,   354,
-   358,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   339,   357,
-   342,   104,   105,   262,    38,   362,   228,-32768,   364,   279,
-   348,   349,   352,-32768,-32768,   362,-32768,-32768,-32768,    16,
-   362,   262,   262,-32768,   353,   365,    10,    57,-32768,-32768,
--32768,   350,   279,   362,   279,    57,   356,-32768,    57,-32768,
--32768,   366,   109,   363,   369,-32768,-32768,   362,   355,    57,
-   359,-32768,   371,-32768,   109,-32768,   360,    43,    53,   361,
-    61,-32768,-32768,    10,    57,   362,-32768,   362,   367,   100,
-     6,     6,-32768,     6,-32768,     6,-32768,-32768,-32768,-32768,
-    57,    57,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-   396,   397,-32768
+static const short yypact[] = {   172,
+    -4,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   172,   370,
+    -5,    93,-32768,   370,   370,   173,    87,   370,   209,-32768,
+-32768,-32768,-32768,    72,   155,    72,    84,-32768,-32768,   191,
+-32768,   120,-32768,-32768,-32768,   104,   107,   128,   120,-32768,
+   132,   133,   275,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,   151,   343,   292,   146,   135,
+-32768,   357,   158,   159,   160,-32768,-32768,   292,    72,   161,
+   163,-32768,   143,   174,   169,   154,   162,   194,   371,-32768,
+-32768,   196,-32768,   371,-32768,   197,   178,    16,-32768,   371,
+-32768,   213,   223,   200,-32768,   292,-32768,   190,   212,   214,
+    52,    11,    41,   195,   132,-32768,   216,   217,-32768,   198,
+   309,   135,-32768,-32768,   207,   228,   230,-32768,    61,-32768,
+   232,   292,   218,    61,   292,    68,     7,   309,     9,   219,
+   239,   237,   220,   245,   272,-32768,-32768,-32768,   292,   265,
+   309,   326,   279,    17,   293,   289,-32768,   291,-32768,-32768,
+-32768,   -20,-32768,-32768,   307,   331,   309,   332,-32768,   329,
+   312,   325,-32768,-32768,   344,   346,-32768,-32768,-32768,-32768,
+   104,   104,-32768,   339,   358,   340,    64,   100,   292,    -6,
+   372,   258,-32768,   380,   309,   351,   360,   362,-32768,-32768,
+   372,-32768,-32768,-32768,-32768,-32768,    45,   372,   292,   292,
+-32768,   363,   384,    28,    41,-32768,-32768,-32768,   364,   309,
+   372,   309,    41,   368,-32768,    41,-32768,-32768,   387,   111,
+   385,   388,-32768,-32768,   372,   369,    41,   373,-32768,   389,
+-32768,   111,-32768,   374,    34,    50,   375,    70,-32768,-32768,
+    28,    41,   372,-32768,   372,   377,   102,    18,    18,-32768,
+    18,-32768,    18,-32768,-32768,-32768,-32768,    41,    41,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,   410,   411,-32768
 };
 
 static const short yypgoto[] = {-32768,
 };
 
 static const short yypgoto[] = {-32768,
-   351,   163,   389,-32768,-32768,-32768,   370,   -18,   275,   282,
-   284,-32768,-32768,-32768,   -16,   304,   -24,-32768,   -38,-32768,
-   -37,   -10,   315,-32768,   -36,-32768,  -186,-32768,  -180,   176,
-  -119,     4,-32768,   232,   187,  -152,  -124
+   241,    71,   405,-32768,   -58,-32768,   390,   -14,   284,   294,
+   295,-32768,-32768,-32768,   -17,   314,   -24,-32768,   -39,-32768,
+   -40,   -76,   321,-32768,   -51,-32768,  -203,   404,  -184,   184,
+  -122,  -104,-32768,   244,   199,  -154,  -129
 };
 
 
 };
 
 
-#define        YYLAST          412
-
-
-static const short yytable[] = {   162,
-    56,    77,    78,   157,   173,   206,    55,    67,    12,    61,
-   209,   217,   107,   158,   159,    81,   171,   154,    17,   222,
-    87,    16,   224,   220,   158,   159,    79,   121,   158,   159,
-    82,   160,   182,   237,   207,   155,    77,   235,    36,  -106,
-    95,    77,    90,   161,   174,    37,   214,    77,   250,    96,
-   124,    84,   113,   115,   161,   251,   208,   252,   161,   195,
-   202,   158,   159,    38,   259,   260,   121,   116,   110,   122,
-   112,   158,   159,   108,    62,   148,   196,   149,   248,   226,
-   128,   129,   113,   219,   242,   221,   123,   248,   111,   124,
-     1,   161,   151,   130,   244,   153,   145,   131,    77,    78,
-   247,   161,   227,   243,   245,    68,   228,   229,   230,   169,
-     2,     3,     4,     5,     6,     7,   255,   256,   226,   257,
-    70,   258,    40,    41,    42,    43,    44,   226,    45,    46,
-    47,    48,    49,    50,    51,    52,    53,   178,    54,   254,
-    71,   227,   179,  -108,  -107,   228,   229,   230,   192,   193,
-   227,    65,    66,    73,   228,   229,   230,    40,    41,    42,
-    43,    44,    83,    45,    46,    47,    48,    49,    50,    51,
-    52,    53,    15,    54,    84,    19,    18,   194,    88,    94,
-    97,    20,    21,    22,    23,    20,    21,    22,    23,    24,
-    25,    26,    27,    19,    28,   210,   211,    29,    98,   103,
-    99,   104,   102,    20,    21,    22,    23,    24,    25,    26,
-    27,   110,    63,   100,   105,    29,    89,   101,   109,   114,
-   106,    20,    21,    22,    23,   117,    20,    21,    22,    23,
-   118,   111,    40,    41,    42,    43,    44,   199,    45,    46,
-    47,    48,    49,    50,    51,    52,    53,   119,    54,    75,
-    41,    42,    43,    44,   134,    45,    46,    47,    48,    49,
-    50,    51,    52,    76,   135,    54,    40,    41,    42,    43,
-    44,   136,    45,    46,    47,    48,    49,    50,    51,    52,
-    53,   111,    54,   137,   138,    42,    43,    44,   146,    45,
-    46,    47,    48,    49,    50,    51,    52,   139,   110,    54,
-    75,    41,    42,    43,    44,   150,    45,    46,    47,    48,
-    49,    50,    51,    52,   172,   152,    54,    80,    41,   124,
-   121,   165,   166,    45,    46,    47,    48,    49,    50,    51,
-    52,    86,    41,    54,   167,   170,   168,    45,    46,    47,
-    48,    49,    50,    51,    52,    75,    41,    54,  -105,   175,
-   176,    45,    46,    47,    48,    49,    50,    51,    52,    13,
-   177,    54,   180,   181,   183,    13,   184,   186,    13,     2,
-     3,     4,     5,     6,     7,   185,   187,   188,   189,   190,
-   197,   191,   201,   213,   225,   233,   203,   234,   204,   218,
-   205,   212,   223,   239,   236,   262,   263,    14,   238,    64,
-   164,   241,   246,   133,     0,   156,   163,   253,   200,   249,
-   120,   240
+#define        YYLAST          431
+
+
+static const short yytable[] = {   167,
+    59,   224,    82,    81,    39,   162,   213,    70,    64,   229,
+    58,   113,   231,   216,    74,   202,    12,    85,   176,   183,
+   112,   178,    91,   244,   184,   126,   227,   163,   164,   133,
+   134,    16,   203,    86,   187,   150,   163,   164,   257,    81,
+   242,   118,   120,    99,    81,   165,   163,   164,   129,    94,
+    81,   100,   163,   164,   266,   267,  -107,   166,   258,    88,
+   259,   179,   209,   214,   221,   153,   166,   154,   163,   164,
+   126,   121,   118,   127,   201,   249,   166,   135,   117,   115,
+    15,   136,   166,   255,    18,   215,   159,   226,   233,   228,
+   128,   251,   255,   129,   217,   218,    17,   156,   166,   116,
+   158,    82,    81,  -109,   160,   250,   252,    36,   199,   254,
+    41,   234,   194,   195,   174,   235,   236,   237,   262,   263,
+   233,   264,    65,   265,    43,    44,    45,    46,    47,   233,
+    48,    49,    50,    51,    52,    53,    54,    55,    56,  -108,
+    57,   261,    71,   234,   200,    38,    73,   235,   236,   237,
+    75,    77,   234,    68,    69,    83,   235,   236,   237,    43,
+    44,    45,    46,    47,    87,    48,    49,    50,    51,    52,
+    53,    54,    55,    56,     1,    57,    92,    93,    88,   101,
+    98,   102,   103,    20,    21,    22,    23,    20,    21,    22,
+    23,    19,   104,   106,     2,     3,     4,     5,     6,     7,
+   107,    20,    21,    22,    23,    24,    25,    26,    27,    19,
+    28,   105,   108,    29,   109,   110,   111,   114,   119,    20,
+    21,    22,    23,    24,    25,    26,    27,    37,    66,   122,
+   123,    29,   124,   128,   139,   140,   141,    20,    21,    22,
+    23,   115,    25,    26,    27,   116,   151,    38,   115,    13,
+   155,    20,    21,    22,    23,    13,   157,   126,    13,   171,
+   129,   116,    43,    44,    45,    46,    47,   206,    48,    49,
+    50,    51,    52,    53,    54,    55,    56,   170,    57,    79,
+    44,    45,    46,    47,   172,    48,    49,    50,    51,    52,
+    53,    54,    55,    80,   173,    57,    43,    44,    45,    46,
+    47,   175,    48,    49,    50,    51,    52,    53,    54,    55,
+    56,   180,    57,   142,   143,    45,    46,    47,  -106,    48,
+    49,    50,    51,    52,    53,    54,    55,   144,   181,    57,
+    79,    44,    45,    46,    47,   182,    48,    49,    50,    51,
+    52,    53,    54,    55,   177,   185,    57,    84,    44,   186,
+   188,   189,   190,    48,    49,    50,    51,    52,    53,    54,
+    55,    90,    44,    57,   191,   193,   192,    48,    49,    50,
+    51,    52,    53,    54,    55,    79,    44,    57,   196,   198,
+   197,    48,    49,    50,    51,    52,    53,    54,    55,   210,
+   204,    57,     2,     3,     4,     5,     6,     7,   208,   211,
+   212,   219,   220,   225,   230,   232,   241,   240,   243,   269,
+   270,   246,   245,    14,   169,   248,   253,   260,   138,    67,
+   125,   161,    40,   168,   256,   207,     0,     0,     0,     0,
+   247
 };
 
 };
 
-static const short yycheck[] = {   124,
-    25,    40,    40,   123,     5,   186,    25,    32,    21,    26,
-   191,   198,     5,    19,    20,    54,   136,    19,     4,   206,
-    59,    37,   209,   204,    19,    20,     5,    19,    19,    20,
-    55,    37,   152,   220,    19,    37,    75,   218,    21,    40,
-    65,    80,    61,    49,    45,    39,    37,    86,   235,    66,
-    42,    44,    89,    90,    49,   236,    41,   238,    49,    22,
-   180,    19,    20,    39,   251,   252,    19,    92,    19,    22,
-    89,    19,    20,    84,    39,   112,    39,   114,   231,    19,
-    19,    20,   119,   203,    42,   205,    39,   240,    39,    42,
-     3,    49,   117,    37,    42,   120,   107,    41,   137,   137,
-    40,    49,    42,   228,   229,    39,    46,    47,    48,   134,
-    23,    24,    25,    26,    27,    28,   241,   242,    19,   244,
-    19,   246,     5,     6,     7,     8,     9,    19,    11,    12,
-    13,    14,    15,    16,    17,    18,    19,    40,    21,    40,
-    19,    42,    45,    40,    40,    46,    47,    48,    45,    45,
-    42,    34,    35,    19,    46,    47,    48,     5,     6,     7,
-     8,     9,    19,    11,    12,    13,    14,    15,    16,    17,
-    18,    19,    10,    21,    44,    19,    14,   174,    19,    21,
-    19,    29,    30,    31,    32,    29,    30,    31,    32,    33,
-    34,    35,    36,    19,    38,   192,   193,    41,    19,    19,
-    40,    19,    39,    29,    30,    31,    32,    33,    34,    35,
-    36,    19,    38,    43,    19,    41,    19,    40,     5,    19,
-    39,    29,    30,    31,    32,    40,    29,    30,    31,    32,
-    19,    39,     5,     6,     7,     8,     9,    10,    11,    12,
-    13,    14,    15,    16,    17,    18,    19,    19,    21,     5,
+static const short yycheck[] = {   129,
+    25,   205,    43,    43,    19,   128,   191,    32,    26,   213,
+    25,    88,   216,   198,    39,    22,    21,    57,   141,    40,
+     5,     5,    62,   227,    45,    19,   211,    19,    20,    19,
+    20,    37,    39,    58,   157,   112,    19,    20,   242,    79,
+   225,    93,    94,    68,    84,    37,    19,    20,    42,    64,
+    90,    69,    19,    20,   258,   259,    40,    49,   243,    44,
+   245,    45,   185,    19,    37,   117,    49,   119,    19,    20,
+    19,    96,   124,    22,   179,    42,    49,    37,    93,    19,
+    10,    41,    49,   238,    14,    41,    19,   210,    19,   212,
+    39,    42,   247,    42,   199,   200,     4,   122,    49,    39,
+   125,   142,   142,    40,    37,   235,   236,    21,    45,    40,
+    39,    42,   171,   172,   139,    46,    47,    48,   248,   249,
+    19,   251,    39,   253,     5,     6,     7,     8,     9,    19,
+    11,    12,    13,    14,    15,    16,    17,    18,    19,    40,
+    21,    40,    39,    42,    45,    39,    19,    46,    47,    48,
+    19,    19,    42,    34,    35,     5,    46,    47,    48,     5,
      6,     7,     8,     9,    19,    11,    12,    13,    14,    15,
      6,     7,     8,     9,    19,    11,    12,    13,    14,    15,
-    16,    17,    18,    19,    19,    21,     5,     6,     7,     8,
-     9,    39,    11,    12,    13,    14,    15,    16,    17,    18,
-    19,    39,    21,     5,     6,     7,     8,     9,    19,    11,
-    12,    13,    14,    15,    16,    17,    18,    19,    19,    21,
-     5,     6,     7,     8,     9,    19,    11,    12,    13,    14,
-    15,    16,    17,    18,    19,    39,    21,     5,     6,    42,
-    19,    41,    40,    11,    12,    13,    14,    15,    16,    17,
-    18,     5,     6,    21,    40,    37,    23,    11,    12,    13,
-    14,    15,    16,    17,    18,     5,     6,    21,    40,    19,
-    40,    11,    12,    13,    14,    15,    16,    17,    18,     9,
-    45,    21,    39,    19,    19,    15,    23,    40,    18,    23,
-    24,    25,    26,    27,    28,    41,    23,    20,    40,    23,
-    19,    40,    19,    19,    19,    23,    39,    19,    40,    40,
-    39,    39,    37,    23,    40,     0,     0,     9,    40,    30,
-   126,    42,    42,   100,    -1,   122,   125,    41,   177,   234,
-    96,   225
+    16,    17,    18,    19,     3,    21,    19,    19,    44,    19,
+    21,    19,    40,    29,    30,    31,    32,    29,    30,    31,
+    32,    19,    19,    40,    23,    24,    25,    26,    27,    28,
+    39,    29,    30,    31,    32,    33,    34,    35,    36,    19,
+    38,    43,    19,    41,    19,    19,    39,     5,    19,    29,
+    30,    31,    32,    33,    34,    35,    36,    19,    38,    40,
+    19,    41,    19,    39,    19,    19,    39,    29,    30,    31,
+    32,    19,    34,    35,    36,    39,    19,    39,    19,     9,
+    19,    29,    30,    31,    32,    15,    39,    19,    18,    40,
+    42,    39,     5,     6,     7,     8,     9,    10,    11,    12,
+    13,    14,    15,    16,    17,    18,    19,    41,    21,     5,
+     6,     7,     8,     9,    40,    11,    12,    13,    14,    15,
+    16,    17,    18,    19,    23,    21,     5,     6,     7,     8,
+     9,    37,    11,    12,    13,    14,    15,    16,    17,    18,
+    19,    19,    21,     5,     6,     7,     8,     9,    40,    11,
+    12,    13,    14,    15,    16,    17,    18,    19,    40,    21,
+     5,     6,     7,     8,     9,    45,    11,    12,    13,    14,
+    15,    16,    17,    18,    19,    39,    21,     5,     6,    19,
+    19,    23,    41,    11,    12,    13,    14,    15,    16,    17,
+    18,     5,     6,    21,    40,    20,    23,    11,    12,    13,
+    14,    15,    16,    17,    18,     5,     6,    21,    40,    40,
+    23,    11,    12,    13,    14,    15,    16,    17,    18,    39,
+    19,    21,    23,    24,    25,    26,    27,    28,    19,    40,
+    39,    39,    19,    40,    37,    19,    19,    23,    40,     0,
+     0,    23,    40,     9,   131,    42,    42,    41,   105,    30,
+   100,   127,    19,   130,   241,   182,    -1,    -1,    -1,    -1,
+   232
 };
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 #line 3 "/usr/lib/bison.simple"
 };
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 #line 3 "/usr/lib/bison.simple"
@@ -1222,23 +1231,23 @@ yyreduce:
   switch (yyn) {
 
 case 1:
   switch (yyn) {
 
 case 1:
-#line 311 "parse.y"
+#line 316 "parse.y"
 { ; ;
     break;}
 case 2:
 { ; ;
     break;}
 case 2:
-#line 312 "parse.y"
+#line 317 "parse.y"
 { ; ;
     break;}
 case 3:
 { ; ;
     break;}
 case 3:
-#line 313 "parse.y"
+#line 318 "parse.y"
 { ; ;
     break;}
 case 4:
 { ; ;
     break;}
 case 4:
-#line 314 "parse.y"
+#line 319 "parse.y"
 { ; ;
     break;}
 case 5:
 { ; ;
     break;}
 case 5:
-#line 317 "parse.y"
+#line 322 "parse.y"
 {
                        Node *node = new_ccode(C_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
 {
                        Node *node = new_ccode(C_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
@@ -1247,7 +1256,7 @@ case 5:
                                        ;
     break;}
 case 6:
                                        ;
     break;}
 case 6:
-#line 323 "parse.y"
+#line 328 "parse.y"
 {
                        Node *node = new_ccode(H_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
 {
                        Node *node = new_ccode(H_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
@@ -1256,7 +1265,7 @@ case 6:
                                        ;
     break;}
 case 7:
                                        ;
     break;}
 case 7:
-#line 329 "parse.y"
+#line 334 "parse.y"
 {
                        Node *node = new_ccode(HT_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
 {
                        Node *node = new_ccode(HT_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
@@ -1265,7 +1274,7 @@ case 7:
                                        ;
     break;}
 case 8:
                                        ;
     break;}
 case 8:
-#line 335 "parse.y"
+#line 340 "parse.y"
 {
                        Node *node = new_ccode(PH_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
 {
                        Node *node = new_ccode(PH_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
@@ -1274,7 +1283,7 @@ case 8:
                                        ;
     break;}
 case 9:
                                        ;
     break;}
 case 9:
-#line 341 "parse.y"
+#line 346 "parse.y"
 {
                        Node *node = new_ccode(A_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
 {
                        Node *node = new_ccode(A_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
@@ -1283,7 +1292,7 @@ case 9:
                                        ;
     break;}
 case 10:
                                        ;
     break;}
 case 10:
-#line 347 "parse.y"
+#line 352 "parse.y"
 {
                        Node *node = new_ccode(AT_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
 {
                        Node *node = new_ccode(AT_CCODE,(yyvsp[0].cbuf)->str,
                                               ccode_line);
@@ -1292,15 +1301,15 @@ case 10:
                                        ;
     break;}
 case 11:
                                        ;
     break;}
 case 11:
-#line 355 "parse.y"
+#line 360 "parse.y"
 { ; ;
     break;}
 case 12:
 { ; ;
     break;}
 case 12:
-#line 356 "parse.y"
+#line 361 "parse.y"
 { ; ;
     break;}
 case 13:
 { ; ;
     break;}
 case 13:
-#line 359 "parse.y"
+#line 364 "parse.y"
 {
                        ((Class *)class)->nodes = class_nodes;
                        class_nodes = NULL;
 {
                        ((Class *)class)->nodes = class_nodes;
                        class_nodes = NULL;
@@ -1308,7 +1317,7 @@ case 13:
                                                ;
     break;}
 case 14:
                                                ;
     break;}
 case 14:
-#line 364 "parse.y"
+#line 369 "parse.y"
 {
                        ((Class *)class)->nodes = NULL;
                        class_nodes = NULL;
 {
                        ((Class *)class)->nodes = NULL;
                        class_nodes = NULL;
@@ -1316,16 +1325,21 @@ case 14:
                                                ;
     break;}
 case 15:
                                                ;
     break;}
 case 15:
-#line 371 "parse.y"
+#line 376 "parse.y"
 {
 {
-                       class = new_class(yyvsp[-3].id,yyvsp[-1].id,chunk_size,NULL);
+                       class = new_class (yyvsp[-3].id, yyvsp[-1].id,
+                                          bonobo_x_class, chunk_size, NULL);
                                                ;
     break;}
 case 17:
                                                ;
     break;}
 case 17:
-#line 377 "parse.y"
-{
-                       if(strcmp(yyvsp[-2].id,"chunks") == 0) {
-                                       chunk_size = g_strdup(yyvsp[0].id);
+#line 383 "parse.y"
+{
+                       if(strcmp(yyvsp[-3].id,"chunks") == 0) {
+                               g_free (chunk_size);
+                               chunk_size = g_strdup(yyvsp[-2].id);
+                       } else if(strcmp(yyvsp[-3].id,"BonoboX") == 0) {
+                               g_free (bonobo_x_class);
+                               bonobo_x_class = g_strdup(yyvsp[-2].id);
                        } else {
                                yyerror(_("parse error"));
                                YYERROR;
                        } else {
                                yyerror(_("parse error"));
                                YYERROR;
@@ -1333,11 +1347,14 @@ case 17:
                ;
     break;}
 case 18:
                ;
     break;}
 case 18:
-#line 385 "parse.y"
-{
-                       if(strcmp(yyvsp[-2].id,"chunks") == 0) {
-                               if(atoi(yyvsp[0].id) != 0)
-                                       chunk_size = g_strdup(yyvsp[0].id);
+#line 395 "parse.y"
+{
+                       if(strcmp(yyvsp[-3].id,"chunks") == 0) {
+                               g_free (chunk_size);
+                               if(atoi(yyvsp[-2].id) != 0)
+                                       chunk_size = g_strdup(yyvsp[-2].id);
+                               else
+                                       chunk_size = NULL;
                        } else {
                                yyerror(_("parse error"));
                                YYERROR;
                        } else {
                                yyerror(_("parse error"));
                                YYERROR;
@@ -1345,47 +1362,58 @@ case 18:
                ;
     break;}
 case 19:
                ;
     break;}
 case 19:
-#line 396 "parse.y"
+#line 409 "parse.y"
 { ; ;
     break;}
 case 20:
 { ; ;
     break;}
 case 20:
-#line 397 "parse.y"
+#line 410 "parse.y"
 { ; ;
     break;}
 case 21:
 { ; ;
     break;}
 case 21:
-#line 400 "parse.y"
+#line 413 "parse.y"
 { ; ;
     break;}
 case 22:
 { ; ;
     break;}
 case 22:
-#line 401 "parse.y"
-{ ; ;
+#line 414 "parse.y"
+{
+                       if (strcmp (yyvsp[-1].id, "BonoboX") != 0) {
+                               g_free(yyvsp[-1].id);
+                               yyerror(_("parse error"));
+                               YYERROR;
+                       }
+                       last_added_method->bonobo_x_func = TRUE;
+                                               ;
     break;}
 case 23:
     break;}
 case 23:
-#line 402 "parse.y"
+#line 422 "parse.y"
 { ; ;
     break;}
 case 24:
 { ; ;
     break;}
 case 24:
-#line 403 "parse.y"
+#line 423 "parse.y"
 { ; ;
     break;}
 case 25:
 { ; ;
     break;}
 case 25:
-#line 406 "parse.y"
-{ the_scope = PUBLIC_SCOPE; ;
+#line 424 "parse.y"
+{ ; ;
     break;}
 case 26:
     break;}
 case 26:
-#line 407 "parse.y"
-{ the_scope = PRIVATE_SCOPE; ;
+#line 427 "parse.y"
+{ the_scope = PUBLIC_SCOPE; ;
     break;}
 case 27:
     break;}
 case 27:
-#line 408 "parse.y"
-{ the_scope = PROTECTED_SCOPE; ;
+#line 428 "parse.y"
+{ the_scope = PRIVATE_SCOPE; ;
     break;}
 case 28:
     break;}
 case 28:
-#line 409 "parse.y"
-{ the_scope = CLASS_SCOPE; ;
+#line 429 "parse.y"
+{ the_scope = PROTECTED_SCOPE; ;
     break;}
 case 29:
     break;}
 case 29:
-#line 412 "parse.y"
+#line 430 "parse.y"
+{ the_scope = CLASS_SCOPE; ;
+    break;}
+case 30:
+#line 433 "parse.y"
 {
                        if(strcmp(yyvsp[-1].id, "destroywith")==0) {
                                g_free(yyvsp[-1].id);
 {
                        if(strcmp(yyvsp[-1].id, "destroywith")==0) {
                                g_free(yyvsp[-1].id);
@@ -1400,8 +1428,8 @@ case 29:
                        }
                                ;
     break;}
                        }
                                ;
     break;}
-case 30:
-#line 425 "parse.y"
+case 31:
+#line 446 "parse.y"
 {
                        if(strcmp(yyvsp[-2].id, "destroy")==0) {
                                g_free(yyvsp[-2].id);
 {
                        if(strcmp(yyvsp[-2].id, "destroy")==0) {
                                g_free(yyvsp[-2].id);
@@ -1417,58 +1445,58 @@ case 30:
                        }
                                        ;
     break;}
                        }
                                        ;
     break;}
-case 31:
-#line 441 "parse.y"
+case 32:
+#line 462 "parse.y"
 {
                        initializer = yyvsp[0].id;
                        initializer_line = ccode_line;
                                ;
     break;}
 {
                        initializer = yyvsp[0].id;
                        initializer_line = ccode_line;
                                ;
     break;}
-case 32:
-#line 445 "parse.y"
+case 33:
+#line 466 "parse.y"
 {
                        initializer = (yyvsp[0].cbuf)->str;
                        initializer_line = ccode_line;
                        g_string_free(yyvsp[0].cbuf, FALSE);
                                ;
     break;}
 {
                        initializer = (yyvsp[0].cbuf)->str;
                        initializer_line = ccode_line;
                        g_string_free(yyvsp[0].cbuf, FALSE);
                                ;
     break;}
-case 33:
-#line 453 "parse.y"
-{ ; ;
-    break;}
 case 34:
 case 34:
-#line 454 "parse.y"
+#line 474 "parse.y"
 { ; ;
     break;}
 case 35:
 { ; ;
     break;}
 case 35:
-#line 455 "parse.y"
-{ destructor = NULL; ;
+#line 475 "parse.y"
+{ ; ;
     break;}
 case 36:
     break;}
 case 36:
-#line 456 "parse.y"
-{ initializer = NULL; ;
+#line 476 "parse.y"
+{ destructor = NULL; ;
     break;}
 case 37:
     break;}
 case 37:
-#line 457 "parse.y"
+#line 477 "parse.y"
+{ initializer = NULL; ;
+    break;}
+case 38:
+#line 478 "parse.y"
 {
                        destructor = NULL;
                        initializer = NULL;
                                        ;
     break;}
 {
                        destructor = NULL;
                        initializer = NULL;
                                        ;
     break;}
-case 38:
-#line 463 "parse.y"
+case 39:
+#line 484 "parse.y"
 {
                        push_variable(yyvsp[-2].id, the_scope,yyvsp[-4].line, NULL);
                                                ;
     break;}
 {
                        push_variable(yyvsp[-2].id, the_scope,yyvsp[-4].line, NULL);
                                                ;
     break;}
-case 39:
-#line 466 "parse.y"
+case 40:
+#line 487 "parse.y"
 {
                        push_variable(yyvsp[-3].id, the_scope, yyvsp[-5].line, yyvsp[-2].id);
                                                ;
     break;}
 {
                        push_variable(yyvsp[-3].id, the_scope, yyvsp[-5].line, yyvsp[-2].id);
                                                ;
     break;}
-case 40:
-#line 470 "parse.y"
+case 41:
+#line 491 "parse.y"
 {
                        if(strcmp(yyvsp[-6].id,"get")==0 &&
                           strcmp(yyvsp[-3].id,"set")==0) {
 {
                        if(strcmp(yyvsp[-6].id,"get")==0 &&
                           strcmp(yyvsp[-3].id,"set")==0) {
@@ -1506,8 +1534,8 @@ case 40:
                        }
                                                ;
     break;}
                        }
                                                ;
     break;}
-case 41:
-#line 506 "parse.y"
+case 42:
+#line 527 "parse.y"
 {
                        if(strcmp(yyvsp[-3].id, "get") == 0) {
                                Node *node;
 {
                        if(strcmp(yyvsp[-3].id, "get") == 0) {
                                Node *node;
@@ -1538,8 +1566,8 @@ case 41:
                        }
                                                ;
     break;}
                        }
                                                ;
     break;}
-case 42:
-#line 535 "parse.y"
+case 43:
+#line 556 "parse.y"
 {
                        Node *node;
                        char *get, *set = NULL;
 {
                        Node *node;
                        char *get, *set = NULL;
@@ -1581,13 +1609,11 @@ case 42:
                                                      root, yyvsp[-1].id);
                        } else if(strcmp(yyvsp[0].id, "objectlink")==0) {
                                set = g_strdup_printf(
                                                      root, yyvsp[-1].id);
                        } else if(strcmp(yyvsp[0].id, "objectlink")==0) {
                                set = g_strdup_printf(
-                                 "if(%s->%s) "
-                                  "gtk_object_unref(GTK_OBJECT(%s->%s)); "
-                                 "%s->%s = ARG; "
-                                 "if(%s->%s) "
-                                  "gtk_object_ref(GTK_OBJECT(%s->%s));",
-                                 root, yyvsp[-1].id,
-                                 root, yyvsp[-1].id,
+                                 "if (ARG != NULL) "
+                                  "gtk_object_ref (GTK_OBJECT (ARG)); "
+                                 "if (%s->%s != NULL) "
+                                  "gtk_object_unref (GTK_OBJECT (%s->%s)); "
+                                 "%s->%s = ARG;",
                                  root, yyvsp[-1].id,
                                  root, yyvsp[-1].id,
                                  root, yyvsp[-1].id);
                                  root, yyvsp[-1].id,
                                  root, yyvsp[-1].id,
                                  root, yyvsp[-1].id);
@@ -1613,8 +1639,8 @@ case 42:
                        class_nodes = g_list_append(class_nodes,node);
                                                ;
     break;}
                        class_nodes = g_list_append(class_nodes,node);
                                                ;
     break;}
-case 43:
-#line 609 "parse.y"
+case 44:
+#line 628 "parse.y"
 {
                        if(strcmp(yyvsp[-2].id,"type")!=0) {
                                g_free(yyvsp[-4].id);
 {
                        if(strcmp(yyvsp[-2].id,"type")!=0) {
                                g_free(yyvsp[-4].id);
@@ -1625,215 +1651,215 @@ case 43:
                        yyval.id = yyvsp[-4].id;
                                                ;
     break;}
                        yyval.id = yyvsp[-4].id;
                                                ;
     break;}
-case 44:
-#line 618 "parse.y"
+case 45:
+#line 637 "parse.y"
 {
                        yyval.id = yyvsp[0].id;
                        typestack = g_list_prepend(typestack,NULL);
                                                ;
     break;}
 {
                        yyval.id = yyvsp[0].id;
                        typestack = g_list_prepend(typestack,NULL);
                                                ;
     break;}
-case 45:
-#line 624 "parse.y"
+case 46:
+#line 643 "parse.y"
 { yyval.list = yyvsp[-1].list; ;
     break;}
 { yyval.list = yyvsp[-1].list; ;
     break;}
-case 46:
-#line 625 "parse.y"
+case 47:
+#line 644 "parse.y"
 { yyval.list = NULL; ;
     break;}
 { yyval.list = NULL; ;
     break;}
-case 47:
-#line 628 "parse.y"
+case 48:
+#line 647 "parse.y"
 {
                        yyval.list = g_list_append(yyvsp[0].list,yyvsp[-2].id);
                                                ;
     break;}
 {
                        yyval.list = g_list_append(yyvsp[0].list,yyvsp[-2].id);
                                                ;
     break;}
-case 48:
-#line 631 "parse.y"
+case 49:
+#line 650 "parse.y"
 {
                        yyval.list = g_list_append(NULL,yyvsp[0].id);
                                                ;
     break;}
 {
                        yyval.list = g_list_append(NULL,yyvsp[0].id);
                                                ;
     break;}
-case 49:
-#line 637 "parse.y"
+case 50:
+#line 656 "parse.y"
 {
                        Node *node = new_type(yyvsp[-1].id, yyvsp[0].id, NULL);
                        typestack = g_list_prepend(typestack,node);
                                                        ;
     break;}
 {
                        Node *node = new_type(yyvsp[-1].id, yyvsp[0].id, NULL);
                        typestack = g_list_prepend(typestack,node);
                                                        ;
     break;}
-case 50:
-#line 641 "parse.y"
+case 51:
+#line 660 "parse.y"
 {
                        Node *node = new_type(yyvsp[0].id, NULL, NULL);
                        typestack = g_list_prepend(typestack,node);
                                                        ;
     break;}
 {
                        Node *node = new_type(yyvsp[0].id, NULL, NULL);
                        typestack = g_list_prepend(typestack,node);
                                                        ;
     break;}
-case 51:
-#line 648 "parse.y"
+case 52:
+#line 667 "parse.y"
 {
                        yyval.id = yyvsp[0].id;
                                                        ;
     break;}
 {
                        yyval.id = yyvsp[0].id;
                                                        ;
     break;}
-case 52:
-#line 651 "parse.y"
+case 53:
+#line 670 "parse.y"
 {
                        yyval.id = yyvsp[0].id;
                                                        ;
     break;}
 {
                        yyval.id = yyvsp[0].id;
                                                        ;
     break;}
-case 53:
-#line 654 "parse.y"
+case 54:
+#line 673 "parse.y"
 {
                        yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
-case 54:
-#line 658 "parse.y"
+case 55:
+#line 677 "parse.y"
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
                        g_free(yyvsp[-1].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
                        g_free(yyvsp[-1].id);
                                                        ;
     break;}
-case 55:
-#line 662 "parse.y"
+case 56:
+#line 681 "parse.y"
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
-case 56:
-#line 666 "parse.y"
+case 57:
+#line 685 "parse.y"
 {
                        yyval.id = g_strconcat("const ", yyvsp[-1].id, " ",
                                             yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat("const ", yyvsp[-1].id, " ",
                                             yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
-case 57:
-#line 671 "parse.y"
+case 58:
+#line 690 "parse.y"
 {
                        yyval.id = g_strconcat(yyvsp[-2].id, " ",
                                             yyvsp[-1].id, " const", NULL);
                        g_free(yyvsp[-1].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat(yyvsp[-2].id, " ",
                                             yyvsp[-1].id, " const", NULL);
                        g_free(yyvsp[-1].id);
                                                        ;
     break;}
-case 58:
-#line 679 "parse.y"
+case 59:
+#line 698 "parse.y"
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
-case 59:
-#line 683 "parse.y"
+case 60:
+#line 702 "parse.y"
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
                        g_free(yyvsp[-1].id);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
                        g_free(yyvsp[-1].id);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
-case 60:
-#line 688 "parse.y"
+case 61:
+#line 707 "parse.y"
 {
                        yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
                                                        ;
     break;}
-case 61:
-#line 692 "parse.y"
+case 62:
+#line 711 "parse.y"
 {
                        yyval.id = yyvsp[0].id;
                                                        ;
     break;}
 {
                        yyval.id = yyvsp[0].id;
                                                        ;
     break;}
-case 62:
-#line 695 "parse.y"
+case 63:
+#line 714 "parse.y"
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
                        g_free(yyvsp[-1].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
                        g_free(yyvsp[-1].id);
                                                        ;
     break;}
-case 63:
-#line 699 "parse.y"
+case 64:
+#line 718 "parse.y"
 {
                        yyval.id = g_strdup(yyvsp[0].id);
                                                        ;
     break;}
 {
                        yyval.id = g_strdup(yyvsp[0].id);
                                                        ;
     break;}
-case 64:
-#line 702 "parse.y"
+case 65:
+#line 721 "parse.y"
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
                                                        ;
     break;}
 {
                        yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
                                                        ;
     break;}
-case 65:
-#line 707 "parse.y"
+case 66:
+#line 726 "parse.y"
 { yyval.id = "void"; ;
     break;}
 { yyval.id = "void"; ;
     break;}
-case 66:
-#line 708 "parse.y"
+case 67:
+#line 727 "parse.y"
 { yyval.id = "char"; ;
     break;}
 { yyval.id = "char"; ;
     break;}
-case 67:
-#line 709 "parse.y"
+case 68:
+#line 728 "parse.y"
 { yyval.id = "short"; ;
     break;}
 { yyval.id = "short"; ;
     break;}
-case 68:
-#line 710 "parse.y"
+case 69:
+#line 729 "parse.y"
 { yyval.id = "int"; ;
     break;}
 { yyval.id = "int"; ;
     break;}
-case 69:
-#line 711 "parse.y"
+case 70:
+#line 730 "parse.y"
 { yyval.id = "long"; ;
     break;}
 { yyval.id = "long"; ;
     break;}
-case 70:
-#line 712 "parse.y"
+case 71:
+#line 731 "parse.y"
 { yyval.id = "float"; ;
     break;}
 { yyval.id = "float"; ;
     break;}
-case 71:
-#line 713 "parse.y"
+case 72:
+#line 732 "parse.y"
 { yyval.id = "double"; ;
     break;}
 { yyval.id = "double"; ;
     break;}
-case 72:
-#line 714 "parse.y"
+case 73:
+#line 733 "parse.y"
 { yyval.id = "signed"; ;
     break;}
 { yyval.id = "signed"; ;
     break;}
-case 73:
-#line 715 "parse.y"
+case 74:
+#line 734 "parse.y"
 { yyval.id = "unsigned"; ;
     break;}
 { yyval.id = "unsigned"; ;
     break;}
-case 74:
-#line 718 "parse.y"
+case 75:
+#line 737 "parse.y"
 { yyval.id = "struct"; ;
     break;}
 { yyval.id = "struct"; ;
     break;}
-case 75:
-#line 719 "parse.y"
+case 76:
+#line 738 "parse.y"
 { yyval.id = "union"; ;
     break;}
 { yyval.id = "union"; ;
     break;}
-case 76:
-#line 720 "parse.y"
+case 77:
+#line 739 "parse.y"
 { yyval.id = "enum"; ;
     break;}
 { yyval.id = "enum"; ;
     break;}
-case 77:
-#line 723 "parse.y"
+case 78:
+#line 742 "parse.y"
 { yyval.id = g_strdup("*"); ;
     break;}
 { yyval.id = g_strdup("*"); ;
     break;}
-case 78:
-#line 724 "parse.y"
+case 79:
+#line 743 "parse.y"
 { yyval.id = g_strdup("* const"); ;
     break;}
 { yyval.id = g_strdup("* const"); ;
     break;}
-case 79:
-#line 725 "parse.y"
+case 80:
+#line 744 "parse.y"
 {
                                yyval.id = g_strconcat("*", yyvsp[0].id, NULL);
                                g_free(yyvsp[0].id);
                                        ;
     break;}
 {
                                yyval.id = g_strconcat("*", yyvsp[0].id, NULL);
                                g_free(yyvsp[0].id);
                                        ;
     break;}
-case 80:
-#line 729 "parse.y"
+case 81:
+#line 748 "parse.y"
 {
                                yyval.id = g_strconcat("* const", yyvsp[0].id, NULL);
                                g_free(yyvsp[0].id);
                                        ;
     break;}
 {
                                yyval.id = g_strconcat("* const", yyvsp[0].id, NULL);
                                g_free(yyvsp[0].id);
                                        ;
     break;}
-case 81:
-#line 736 "parse.y"
+case 82:
+#line 755 "parse.y"
 {
                        if(strcmp(yyvsp[-1].id, "first")==0)
                                yyval.sigtype = SIGNAL_FIRST_METHOD;
 {
                        if(strcmp(yyvsp[-1].id, "first")==0)
                                yyval.sigtype = SIGNAL_FIRST_METHOD;
@@ -1847,14 +1873,14 @@ case 81:
                        g_free(yyvsp[-1].id);
                                        ;
     break;}
                        g_free(yyvsp[-1].id);
                                        ;
     break;}
-case 82:
-#line 748 "parse.y"
+case 83:
+#line 767 "parse.y"
 {
                        yyval.sigtype = SIGNAL_LAST_METHOD;
                                        ;
     break;}
 {
                        yyval.sigtype = SIGNAL_LAST_METHOD;
                                        ;
     break;}
-case 83:
-#line 754 "parse.y"
+case 84:
+#line 773 "parse.y"
 {
                        if(strcmp(yyvsp[-1].id,"first")==0)
                                yyval.sigtype = SIGNAL_FIRST_METHOD;
 {
                        if(strcmp(yyvsp[-1].id,"first")==0)
                                yyval.sigtype = SIGNAL_FIRST_METHOD;
@@ -1868,8 +1894,8 @@ case 83:
                        g_free(yyvsp[-1].id);
                                        ;
     break;}
                        g_free(yyvsp[-1].id);
                                        ;
     break;}
-case 84:
-#line 766 "parse.y"
+case 85:
+#line 785 "parse.y"
 {
                        if(strcmp(yyvsp[-2].id,"first")==0)
                                yyval.sigtype = SIGNAL_FIRST_METHOD;
 {
                        if(strcmp(yyvsp[-2].id,"first")==0)
                                yyval.sigtype = SIGNAL_FIRST_METHOD;
@@ -1883,47 +1909,47 @@ case 84:
                        g_free(yyvsp[-2].id);
                                        ;
     break;}
                        g_free(yyvsp[-2].id);
                                        ;
     break;}
-case 85:
-#line 778 "parse.y"
+case 86:
+#line 797 "parse.y"
 {
                        yyval.sigtype = SIGNAL_LAST_METHOD;
                                        ;
     break;}
 {
                        yyval.sigtype = SIGNAL_LAST_METHOD;
                                        ;
     break;}
-case 86:
-#line 781 "parse.y"
+case 87:
+#line 800 "parse.y"
 {
                        /* the_scope was default thus public */
                        the_scope = PUBLIC_SCOPE;
                                        ;
     break;}
 {
                        /* the_scope was default thus public */
                        the_scope = PUBLIC_SCOPE;
                                        ;
     break;}
-case 87:
-#line 787 "parse.y"
+case 88:
+#line 806 "parse.y"
 {
                        gtktypes = g_list_prepend(gtktypes, yyvsp[-3].id);
                                                ;
     break;}
 {
                        gtktypes = g_list_prepend(gtktypes, yyvsp[-3].id);
                                                ;
     break;}
-case 88:
-#line 792 "parse.y"
+case 89:
+#line 811 "parse.y"
 {
                        gtktypes = g_list_append(gtktypes, yyvsp[0].id);
                                                ;
     break;}
 {
                        gtktypes = g_list_append(gtktypes, yyvsp[0].id);
                                                ;
     break;}
-case 89:
-#line 795 "parse.y"
+case 90:
+#line 814 "parse.y"
 { 
                        gtktypes = g_list_append(gtktypes, yyvsp[0].id);
                                                        ;
     break;}
 { 
                        gtktypes = g_list_append(gtktypes, yyvsp[0].id);
                                                        ;
     break;}
-case 90:
-#line 800 "parse.y"
+case 91:
+#line 819 "parse.y"
 { yyval.cbuf = yyvsp[0].cbuf; ;
     break;}
 { yyval.cbuf = yyvsp[0].cbuf; ;
     break;}
-case 91:
-#line 801 "parse.y"
+case 92:
+#line 820 "parse.y"
 { yyval.cbuf = NULL; ;
     break;}
 { yyval.cbuf = NULL; ;
     break;}
-case 92:
-#line 805 "parse.y"
+case 93:
+#line 824 "parse.y"
 {
                        if(!has_self) {
                                yyerror(_("signal without 'self' as "
 {
                        if(!has_self) {
                                yyerror(_("signal without 'self' as "
@@ -1941,8 +1967,8 @@ case 92:
                                      ccode_line, vararg, yyvsp[-8].list);
                                                                        ;
     break;}
                                      ccode_line, vararg, yyvsp[-8].list);
                                                                        ;
     break;}
-case 93:
-#line 821 "parse.y"
+case 94:
+#line 840 "parse.y"
 {
                        if(!has_self) {
                                yyerror(_("signal without 'self' as "
 {
                        if(!has_self) {
                                yyerror(_("signal without 'self' as "
@@ -1960,8 +1986,8 @@ case 93:
                                      ccode_line, vararg, yyvsp[-8].list);
                                                                        ;
     break;}
                                      ccode_line, vararg, yyvsp[-8].list);
                                                                        ;
     break;}
-case 94:
-#line 837 "parse.y"
+case 95:
+#line 856 "parse.y"
 {
                        if(!has_self) {
                                yyerror(_("virtual method without 'self' as "
 {
                        if(!has_self) {
                                yyerror(_("virtual method without 'self' as "
@@ -1979,8 +2005,8 @@ case 94:
                                      ccode_line, vararg, NULL);
                                                                        ;
     break;}
                                      ccode_line, vararg, NULL);
                                                                        ;
     break;}
-case 95:
-#line 853 "parse.y"
+case 96:
+#line 872 "parse.y"
 {
                        if(!has_self) {
                                yyerror(_("virtual method without 'self' as "
 {
                        if(!has_self) {
                                yyerror(_("virtual method without 'self' as "
@@ -1998,8 +2024,8 @@ case 95:
                                      ccode_line, vararg, NULL);
                                                                        ;
     break;}
                                      ccode_line, vararg, NULL);
                                                                        ;
     break;}
-case 96:
-#line 869 "parse.y"
+case 97:
+#line 888 "parse.y"
 {
                        if(!has_self) {
                                yyerror(_("virtual method without 'self' as "
 {
                        if(!has_self) {
                                yyerror(_("virtual method without 'self' as "
@@ -2012,8 +2038,8 @@ case 96:
                                      ccode_line, vararg, NULL);
                                                                        ;
     break;}
                                      ccode_line, vararg, NULL);
                                                                        ;
     break;}
-case 97:
-#line 880 "parse.y"
+case 98:
+#line 899 "parse.y"
 {
                        push_function(NO_SCOPE, OVERRIDE_METHOD, yyvsp[-8].id,
                                      yyvsp[-5].id, yyvsp[0].cbuf,
 {
                        push_function(NO_SCOPE, OVERRIDE_METHOD, yyvsp[-8].id,
                                      yyvsp[-5].id, yyvsp[0].cbuf,
@@ -2021,8 +2047,8 @@ case 97:
                                      vararg, NULL);
                                                                        ;
     break;}
                                      vararg, NULL);
                                                                        ;
     break;}
-case 98:
-#line 886 "parse.y"
+case 99:
+#line 905 "parse.y"
 {
                        if(the_scope == CLASS_SCOPE) {
                                yyerror(_("a method cannot be of class scope"));
 {
                        if(the_scope == CLASS_SCOPE) {
                                yyerror(_("a method cannot be of class scope"));
@@ -2034,8 +2060,8 @@ case 98:
                                      vararg, NULL);
                                                                ;
     break;}
                                      vararg, NULL);
                                                                ;
     break;}
-case 99:
-#line 896 "parse.y"
+case 100:
+#line 915 "parse.y"
 {
                        if(strcmp(yyvsp[-4].id, "init")==0) {
                                push_init_arg(yyvsp[-2].id,FALSE);
 {
                        if(strcmp(yyvsp[-4].id, "init")==0) {
                                push_init_arg(yyvsp[-2].id,FALSE);
@@ -2058,8 +2084,8 @@ case 99:
                        }
                                                ;
     break;}
                        }
                                                ;
     break;}
-case 100:
-#line 919 "parse.y"
+case 101:
+#line 938 "parse.y"
 {
                        g_free(onerror); onerror = NULL;
                        g_free(defreturn); defreturn = NULL;
 {
                        g_free(onerror); onerror = NULL;
                        g_free(defreturn); defreturn = NULL;
@@ -2072,8 +2098,8 @@ case 100:
                        g_free(yyvsp[-1].id);
                                        ;
     break;}
                        g_free(yyvsp[-1].id);
                                        ;
     break;}
-case 101:
-#line 930 "parse.y"
+case 102:
+#line 949 "parse.y"
 {
                        g_free(onerror); onerror = NULL;
                        g_free(defreturn); defreturn = NULL;
 {
                        g_free(onerror); onerror = NULL;
                        g_free(defreturn); defreturn = NULL;
@@ -2094,30 +2120,30 @@ case 101:
                        g_free(yyvsp[-1].id);
                                                ;
     break;}
                        g_free(yyvsp[-1].id);
                                                ;
     break;}
-case 102:
-#line 949 "parse.y"
+case 103:
+#line 968 "parse.y"
 {
                        g_free(onerror); onerror = NULL;
                        g_free(defreturn); defreturn = NULL;
                                        ;
     break;}
 {
                        g_free(onerror); onerror = NULL;
                        g_free(defreturn); defreturn = NULL;
                                        ;
     break;}
-case 103:
-#line 955 "parse.y"
+case 104:
+#line 974 "parse.y"
 { yyval.id = yyvsp[0].id; ;
     break;}
 { yyval.id = yyvsp[0].id; ;
     break;}
-case 104:
-#line 956 "parse.y"
+case 105:
+#line 975 "parse.y"
 {
                        yyval.id = (yyvsp[1].cbuf)->str;
                        g_string_free(yyvsp[1].cbuf, FALSE);
                                        ;
     break;}
 {
                        yyval.id = (yyvsp[1].cbuf)->str;
                        g_string_free(yyvsp[1].cbuf, FALSE);
                                        ;
     break;}
-case 105:
-#line 962 "parse.y"
+case 106:
+#line 981 "parse.y"
 { vararg = FALSE; has_self = FALSE; ;
     break;}
 { vararg = FALSE; has_self = FALSE; ;
     break;}
-case 106:
-#line 963 "parse.y"
+case 107:
+#line 982 "parse.y"
 {
                        vararg = FALSE;
                        has_self = TRUE;
 {
                        vararg = FALSE;
                        has_self = TRUE;
@@ -2130,8 +2156,8 @@ case 106:
                        }
                                                ;
     break;}
                        }
                                                ;
     break;}
-case 107:
-#line 974 "parse.y"
+case 108:
+#line 993 "parse.y"
 {
                        vararg = FALSE;
                        has_self = TRUE;
 {
                        vararg = FALSE;
                        has_self = TRUE;
@@ -2144,8 +2170,8 @@ case 107:
                        }
                                                ;
     break;}
                        }
                                                ;
     break;}
-case 108:
-#line 985 "parse.y"
+case 109:
+#line 1004 "parse.y"
 {
                        vararg = FALSE;
                        has_self = TRUE;
 {
                        vararg = FALSE;
                        has_self = TRUE;
@@ -2158,8 +2184,8 @@ case 108:
                        }
                                                ;
     break;}
                        }
                                                ;
     break;}
-case 109:
-#line 996 "parse.y"
+case 110:
+#line 1015 "parse.y"
 {
                        has_self = TRUE;
                        if(strcmp(yyvsp[-2].id,"self")==0)
 {
                        has_self = TRUE;
                        if(strcmp(yyvsp[-2].id,"self")==0)
@@ -2171,8 +2197,8 @@ case 109:
                        }
                                        ;
     break;}
                        }
                                        ;
     break;}
-case 110:
-#line 1006 "parse.y"
+case 111:
+#line 1025 "parse.y"
 {
                        has_self = TRUE;
                        if(strcmp(yyvsp[-3].id,"self")==0)
 {
                        has_self = TRUE;
                        if(strcmp(yyvsp[-3].id,"self")==0)
@@ -2184,8 +2210,8 @@ case 110:
                        }
                                        ;
     break;}
                        }
                                        ;
     break;}
-case 111:
-#line 1016 "parse.y"
+case 112:
+#line 1035 "parse.y"
 {
                        has_self = TRUE;
                        if(strcmp(yyvsp[-2].id,"self")==0)
 {
                        has_self = TRUE;
                        if(strcmp(yyvsp[-2].id,"self")==0)
@@ -2197,40 +2223,40 @@ case 111:
                        }
                                        ;
     break;}
                        }
                                        ;
     break;}
-case 112:
-#line 1026 "parse.y"
-{ has_self = FALSE; ;
-    break;}
 case 113:
 case 113:
-#line 1029 "parse.y"
-{ vararg = TRUE; ;
+#line 1045 "parse.y"
+{ has_self = FALSE; ;
     break;}
 case 114:
     break;}
 case 114:
-#line 1030 "parse.y"
-{ vararg = FALSE; ;
+#line 1048 "parse.y"
+{ vararg = TRUE; ;
     break;}
 case 115:
     break;}
 case 115:
-#line 1033 "parse.y"
-{ ; ;
+#line 1049 "parse.y"
+{ vararg = FALSE; ;
     break;}
 case 116:
     break;}
 case 116:
-#line 1034 "parse.y"
+#line 1052 "parse.y"
 { ; ;
     break;}
 case 117:
 { ; ;
     break;}
 case 117:
-#line 1037 "parse.y"
+#line 1053 "parse.y"
+{ ; ;
+    break;}
+case 118:
+#line 1056 "parse.y"
 {
                        push_funcarg(yyvsp[0].id,NULL);
                                                                ;
     break;}
 {
                        push_funcarg(yyvsp[0].id,NULL);
                                                                ;
     break;}
-case 118:
-#line 1040 "parse.y"
+case 119:
+#line 1059 "parse.y"
 {
                        push_funcarg(yyvsp[-1].id,yyvsp[0].id);
                                                                ;
     break;}
 {
                        push_funcarg(yyvsp[-1].id,yyvsp[0].id);
                                                                ;
     break;}
-case 119:
-#line 1043 "parse.y"
+case 120:
+#line 1062 "parse.y"
 {
                        if(strcmp(yyvsp[-2].id,"check")!=0) {
                                yyerror(_("parse error"));
 {
                        if(strcmp(yyvsp[-2].id,"check")!=0) {
                                yyerror(_("parse error"));
@@ -2240,8 +2266,8 @@ case 119:
                        push_funcarg(yyvsp[-4].id,NULL);
                                                                ;
     break;}
                        push_funcarg(yyvsp[-4].id,NULL);
                                                                ;
     break;}
-case 120:
-#line 1051 "parse.y"
+case 121:
+#line 1070 "parse.y"
 {
                        if(strcmp(yyvsp[-2].id,"check")!=0) {
                                yyerror(_("parse error"));
 {
                        if(strcmp(yyvsp[-2].id,"check")!=0) {
                                yyerror(_("parse error"));
@@ -2251,16 +2277,16 @@ case 120:
                        push_funcarg(yyvsp[-5].id,yyvsp[-4].id);
                                                                ;
     break;}
                        push_funcarg(yyvsp[-5].id,yyvsp[-4].id);
                                                                ;
     break;}
-case 121:
-#line 1061 "parse.y"
-{ ; ;
-    break;}
 case 122:
 case 122:
-#line 1062 "parse.y"
+#line 1080 "parse.y"
 { ; ;
     break;}
 case 123:
 { ; ;
     break;}
 case 123:
-#line 1065 "parse.y"
+#line 1081 "parse.y"
+{ ; ;
+    break;}
+case 124:
+#line 1084 "parse.y"
 {
                        if(strcmp(yyvsp[0].id,"type")==0) {
                                Node *node = new_check(TYPE_CHECK,NULL);
 {
                        if(strcmp(yyvsp[0].id,"type")==0) {
                                Node *node = new_check(TYPE_CHECK,NULL);
@@ -2275,61 +2301,61 @@ case 123:
                        g_free(yyvsp[0].id);
                                        ;
     break;}
                        g_free(yyvsp[0].id);
                                        ;
     break;}
-case 124:
-#line 1078 "parse.y"
+case 125:
+#line 1097 "parse.y"
 {
                        Node *node = new_check(GT_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
 {
                        Node *node = new_check(GT_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
-case 125:
-#line 1082 "parse.y"
+case 126:
+#line 1101 "parse.y"
 {
                        Node *node = new_check(LT_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
 {
                        Node *node = new_check(LT_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
-case 126:
-#line 1086 "parse.y"
+case 127:
+#line 1105 "parse.y"
 {
                        Node *node = new_check(GE_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
 {
                        Node *node = new_check(GE_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
-case 127:
-#line 1090 "parse.y"
+case 128:
+#line 1109 "parse.y"
 {
                        Node *node = new_check(LE_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
 {
                        Node *node = new_check(LE_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
-case 128:
-#line 1094 "parse.y"
+case 129:
+#line 1113 "parse.y"
 {
                        Node *node = new_check(EQ_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
 {
                        Node *node = new_check(EQ_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
-case 129:
-#line 1098 "parse.y"
+case 130:
+#line 1117 "parse.y"
 {
                        Node *node = new_check(NE_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
 {
                        Node *node = new_check(NE_CHECK,yyvsp[0].id);
                        checks = g_list_append(checks,node);
                                        ;
     break;}
-case 130:
-#line 1104 "parse.y"
+case 131:
+#line 1123 "parse.y"
 { yyval.id = yyvsp[0].id; ;
     break;}
 { yyval.id = yyvsp[0].id; ;
     break;}
-case 131:
-#line 1105 "parse.y"
+case 132:
+#line 1124 "parse.y"
 {
                        yyval.id = g_strconcat("-",yyvsp[0].id,NULL);
                        g_free(yyvsp[0].id);
                                        ;
     break;}
 {
                        yyval.id = g_strconcat("-",yyvsp[0].id,NULL);
                        g_free(yyvsp[0].id);
                                        ;
     break;}
-case 132:
-#line 1109 "parse.y"
+case 133:
+#line 1128 "parse.y"
 { yyval.id = yyvsp[0].id; ;
     break;}
 }
 { yyval.id = yyvsp[0].id; ;
     break;}
 }
@@ -2554,5 +2580,5 @@ yyerrhandle:
     }
   return 1;
 }
     }
   return 1;
 }
-#line 1112 "parse.y"
+#line 1131 "parse.y"
 
 
index ba4615b50c16a3f04f5c22a23c307be3d8799ceb..47fdcf2aa98c0af79f4e6305fa682988539aa30d 100644 (file)
@@ -36,13 +36,15 @@ GList *nodes = NULL;
 
 static GList *class_nodes = NULL;
 Node *class = NULL;
 
 static GList *class_nodes = NULL;
 Node *class = NULL;
-char *chunk_size = NULL;
 
 
+static char *chunk_size = NULL;
+static char *bonobo_x_class = NULL;
 static GList *typestack = NULL;
 static GList *funcargs = NULL;
 static GList *checks = NULL;
 static int has_self = FALSE;
 static int vararg = FALSE;
 static GList *typestack = NULL;
 static GList *funcargs = NULL;
 static GList *checks = NULL;
 static int has_self = FALSE;
 static int vararg = FALSE;
+static Method *last_added_method = NULL;
 
 /* destructor and initializer for variables */
 static char *destructor = NULL;
 
 /* destructor and initializer for variables */
 static char *destructor = NULL;
@@ -168,7 +170,10 @@ push_function(int scope, int method, char *oid, char *id,
 
        node = new_method(scope, method, type, oid, gtktypes, flags,
                          id, funcargs, onerror, defreturn, c_cbuf, line_no,
 
        node = new_method(scope, method, type, oid, gtktypes, flags,
                          id, funcargs, onerror, defreturn, c_cbuf, line_no,
-                         ccode_line, vararg, method_unique_id++);
+                         ccode_line, vararg, method_unique_id++,
+                         FALSE);
+
+       last_added_method = (Method *)node;
 
        if(cbuf)
                g_string_free(cbuf,
 
        if(cbuf)
                g_string_free(cbuf,
@@ -368,24 +373,32 @@ class:            classdec '{' classcode '}'      {
                                                }
        ;
 
                                                }
        ;
 
-classdec:      CLASS TYPETOKEN FROM TYPETOKEN  chunk {
-                       class = new_class($<id>2,$<id>4,chunk_size,NULL);
+classdec:      CLASS TYPETOKEN FROM TYPETOKEN  classflags {
+                       class = new_class ($<id>2, $<id>4,
+                                          bonobo_x_class, chunk_size, NULL);
                                                }
        ;
 
                                                }
        ;
 
-chunk:
-       | '(' TOKEN TOKEN ')' {
+classflags:
+       | '(' TOKEN TOKEN ')' classflags {
                        if(strcmp($<id>2,"chunks") == 0) {
                        if(strcmp($<id>2,"chunks") == 0) {
-                                       chunk_size = g_strdup($<id>4);
+                               g_free (chunk_size);
+                               chunk_size = g_strdup($<id>3);
+                       } else if(strcmp($<id>2,"BonoboX") == 0) {
+                               g_free (bonobo_x_class);
+                               bonobo_x_class = g_strdup($<id>3);
                        } else {
                                yyerror(_("parse error"));
                                YYERROR;
                        }
                }
                        } else {
                                yyerror(_("parse error"));
                                YYERROR;
                        }
                }
-       | '(' TOKEN NUMBER ')' {
+       | '(' TOKEN NUMBER ')' classflags {
                        if(strcmp($<id>2,"chunks") == 0) {
                        if(strcmp($<id>2,"chunks") == 0) {
-                               if(atoi($<id>4) != 0)
-                                       chunk_size = g_strdup($<id>4);
+                               g_free (chunk_size);
+                               if(atoi($<id>3) != 0)
+                                       chunk_size = g_strdup($<id>3);
+                               else
+                                       chunk_size = NULL;
                        } else {
                                yyerror(_("parse error"));
                                YYERROR;
                        } else {
                                yyerror(_("parse error"));
                                YYERROR;
@@ -398,6 +411,14 @@ classcode: classcode thing                 { ; }
        ;
 
 thing:                 method                          { ; }
        ;
 
 thing:                 method                          { ; }
+       |       TOKEN method                    {
+                       if (strcmp ($<id>1, "BonoboX") != 0) {
+                               g_free($<id>1);
+                               yyerror(_("parse error"));
+                               YYERROR;
+                       }
+                       last_added_method->bonobo_x_func = TRUE;
+                                               }
        |       variable                        { ; }
        |       argument                        { ; }
        |       ';'                             { ; }
        |       variable                        { ; }
        |       argument                        { ; }
        |       ';'                             { ; }
@@ -573,13 +594,11 @@ argument: ARGUMENT flags argtype TOKEN TOKEN '{' CCODE TOKEN '{' CCODE ';' {
                                                      root, $<id>4);
                        } else if(strcmp($<id>5, "objectlink")==0) {
                                set = g_strdup_printf(
                                                      root, $<id>4);
                        } else if(strcmp($<id>5, "objectlink")==0) {
                                set = g_strdup_printf(
-                                 "if(%s->%s) "
-                                  "gtk_object_unref(GTK_OBJECT(%s->%s)); "
-                                 "%s->%s = ARG; "
-                                 "if(%s->%s) "
-                                  "gtk_object_ref(GTK_OBJECT(%s->%s));",
-                                 root, $<id>4,
-                                 root, $<id>4,
+                                 "if (ARG != NULL) "
+                                  "gtk_object_ref (GTK_OBJECT (ARG)); "
+                                 "if (%s->%s != NULL) "
+                                  "gtk_object_unref (GTK_OBJECT (%s->%s)); "
+                                 "%s->%s = ARG;",
                                  root, $<id>4,
                                  root, $<id>4,
                                  root, $<id>4);
                                  root, $<id>4,
                                  root, $<id>4,
                                  root, $<id>4);
index e424df35e863c2d1e14a9ea31dc9d2ed80f994b1..84aef6e385e39f55ff20d844b49aaf9406c757bc 100644 (file)
@@ -41,12 +41,13 @@ Node * new_check (int chtype, char * number)
        return (Node *)self;
 }
 
        return (Node *)self;
 }
 
-Node * new_class (char * otype, char * ptype, char * chunk_size, GList * nodes)
+Node * new_class (char * otype, char * ptype, char * bonobo_x_class, char * chunk_size, GList * nodes)
 {
        Class * self = g_new0(Class, 1);
        self->type = CLASS_NODE;
        self->otype = otype;
        self->ptype = ptype;
 {
        Class * self = g_new0(Class, 1);
        self->type = CLASS_NODE;
        self->otype = otype;
        self->ptype = ptype;
+       self->bonobo_x_class = bonobo_x_class;
        self->chunk_size = chunk_size;
        self->nodes = nodes;
        return (Node *)self;
        self->chunk_size = chunk_size;
        self->nodes = nodes;
        return (Node *)self;
@@ -62,7 +63,7 @@ Node * new_funcarg (Type * atype, char * name, GList * checks)
        return (Node *)self;
 }
 
        return (Node *)self;
 }
 
-Node * new_method (int scope, int method, Type * mtype, char * otype, GList * gtktypes, GList * flags, char * id, GList * args, char * onerror, char * defreturn, char * cbuf, int line_no, int ccode_line, gboolean vararg, int unique_id)
+Node * new_method (int scope, int method, Type * mtype, char * otype, GList * gtktypes, GList * flags, char * id, GList * args, char * onerror, char * defreturn, char * cbuf, int line_no, int ccode_line, gboolean vararg, int unique_id, gboolean bonobo_x_func)
 {
        Method * self = g_new0(Method, 1);
        self->type = METHOD_NODE;
 {
        Method * self = g_new0(Method, 1);
        self->type = METHOD_NODE;
@@ -81,6 +82,7 @@ Node * new_method (int scope, int method, Type * mtype, char * otype, GList * gt
        self->ccode_line = ccode_line;
        self->vararg = vararg;
        self->unique_id = unique_id;
        self->ccode_line = ccode_line;
        self->vararg = vararg;
        self->unique_id = unique_id;
+       self->bonobo_x_func = bonobo_x_func;
        return (Node *)self;
 }
 
        return (Node *)self;
 }
 
@@ -163,6 +165,7 @@ Class * copy_class (Class * self)
        new->type = CLASS_NODE;
        new->otype = g_strdup(self->otype);
        new->ptype = g_strdup(self->ptype);
        new->type = CLASS_NODE;
        new->otype = g_strdup(self->otype);
        new->ptype = g_strdup(self->ptype);
+       new->bonobo_x_class = g_strdup(self->bonobo_x_class);
        new->chunk_size = g_strdup(self->chunk_size);
        new->nodes = copy_node_list(self->nodes);
        return new;
        new->chunk_size = g_strdup(self->chunk_size);
        new->nodes = copy_node_list(self->nodes);
        return new;
@@ -203,6 +206,7 @@ Method * copy_method (Method * self)
        new->ccode_line = self->ccode_line;
        new->vararg = self->vararg;
        new->unique_id = self->unique_id;
        new->ccode_line = self->ccode_line;
        new->vararg = self->vararg;
        new->unique_id = self->unique_id;
+       new->bonobo_x_func = self->bonobo_x_func;
        return new;
 }
 
        return new;
 }
 
@@ -273,6 +277,7 @@ void free_class (Class * self)
        g_return_if_fail(self->type == CLASS_NODE);
        g_free(self->otype);
        g_free(self->ptype);
        g_return_if_fail(self->type == CLASS_NODE);
        g_free(self->otype);
        g_free(self->ptype);
+       g_free(self->bonobo_x_class);
        g_free(self->chunk_size);
        free_node_list(self->nodes);
        g_free(self);
        g_free(self->chunk_size);
        free_node_list(self->nodes);
        g_free(self);
index e7a16b001b47d8455822756ff75f340869aabcca..c0e8fcf6873a26f8ca4b7350c17350025ed66c8d 100644 (file)
@@ -45,6 +45,7 @@ ENDHEADER
 CLASS Class
   STRING       otype   # this object class type
   STRING       ptype   # parent class type
 CLASS Class
   STRING       otype   # this object class type
   STRING       ptype   # parent class type
+  STRING       bonobo_x_class # Class for BonoboXObject
   STRING       chunk_size # if the object should be allocated with mem_chunks
   NODELIST     nodes
 ENDCLASS
   STRING       chunk_size # if the object should be allocated with mem_chunks
   NODELIST     nodes
 ENDCLASS
@@ -100,6 +101,7 @@ CLASS Method
   INT          ccode_line
   BOOL         vararg
   INT          unique_id       # A unique id for new methods
   INT          ccode_line
   BOOL         vararg
   INT          unique_id       # A unique id for new methods
+  BOOL         bonobo_x_func   # Function for BonoboXObject
 ENDCLASS
 
 CLASS Variable
 ENDCLASS
 
 CLASS Variable
index 4d60558645f4d406444c7d3dac1acd4271d44471..c53ae234876f5174c17e5163d1d3e384f70929ea 100644 (file)
@@ -102,6 +102,7 @@ struct _Class {
        int type;
        char * otype;
        char * ptype;
        int type;
        char * otype;
        char * ptype;
+       char * bonobo_x_class;
        char * chunk_size;
        GList * nodes;
 };
        char * chunk_size;
        GList * nodes;
 };
@@ -130,6 +131,7 @@ struct _Method {
        int ccode_line;
        gboolean vararg;
        int unique_id;
        int ccode_line;
        gboolean vararg;
        int unique_id;
+       gboolean bonobo_x_func;
 };
 
 struct _Type {
 };
 
 struct _Type {
@@ -168,9 +170,9 @@ union _Node {
 Node * new_argument (char * gtktype, Type * atype, GList * flags, char * name, char * get, int get_line, char * set, int set_line, int line_no);
 Node * new_ccode (int cctype, char * cbuf, int line_no);
 Node * new_check (int chtype, char * number);
 Node * new_argument (char * gtktype, Type * atype, GList * flags, char * name, char * get, int get_line, char * set, int set_line, int line_no);
 Node * new_ccode (int cctype, char * cbuf, int line_no);
 Node * new_check (int chtype, char * number);
-Node * new_class (char * otype, char * ptype, char * chunk_size, GList * nodes);
+Node * new_class (char * otype, char * ptype, char * bonobo_x_class, char * chunk_size, GList * nodes);
 Node * new_funcarg (Type * atype, char * name, GList * checks);
 Node * new_funcarg (Type * atype, char * name, GList * checks);
-Node * new_method (int scope, int method, Type * mtype, char * otype, GList * gtktypes, GList * flags, char * id, GList * args, char * onerror, char * defreturn, char * cbuf, int line_no, int ccode_line, gboolean vararg, int unique_id);
+Node * new_method (int scope, int method, Type * mtype, char * otype, GList * gtktypes, GList * flags, char * id, GList * args, char * onerror, char * defreturn, char * cbuf, int line_no, int ccode_line, gboolean vararg, int unique_id, gboolean bonobo_x_func);
 Node * new_type (char * name, char * pointer, char * postfix);
 Node * new_variable (int scope, Type * vtype, char * id, int line_no, char * destructor, int destructor_line, gboolean destructor_simple, char * initializer, int initializer_line);
 
 Node * new_type (char * name, char * pointer, char * postfix);
 Node * new_variable (int scope, Type * vtype, char * id, int line_no, char * destructor, int destructor_line, gboolean destructor_simple, char * initializer, int initializer_line);