]> git.draconx.ca Git - gob-dx.git/commitdiff
Release 0.92.3 v0.92.3
authorGeorge Lebl <jirka@5z.com>
Mon, 7 Feb 2000 20:14:00 +0000 (12:14 -0800)
committerNick Bowler <nbowler@draconx.ca>
Tue, 19 Feb 2019 17:19:11 +0000 (12:19 -0500)
16 files changed:
ChangeLog
Makefile.am
Makefile.in
NEWS
configure
configure.in
doc/gob.1.in
examples/README
examples/gtk-button-count.gob
gob.m4 [new file with mode: 0644]
gob.spec
gob.spec.in
src/lexer.c
src/lexer.l
src/main.c
src/test.gob

index f8eb15f70c29010c510417410aaa5106fe6b3854..62036a73bed05dae64fbe8b422ddbbee2d1c32a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+Mon Feb 07 03:02:48 2000  George Lebl <jirka@5z.com>
+
+       * Release 0.92.3
+
+Mon Feb 07 02:50:11 2000  George Lebl <jirka@5z.com>
+
+       * src/lexer.l: error on multiple classes
+
+       * src/main.c: nicer header output
+
+       * src/{lexer.l,main.c}: Eat out gtk-doc like inline doc entries
+         and stuff them into the output files where appropriate
+
+       * doc/gob.1.in: added docs for gtk-doc like inline doc stuff
+
+       * examples/{README, gtk-button-count.gob}: added inline docs
+
+Fri Feb 04 01:07:54 2000  George Lebl <jirka@5z.com>
+
+       * src/main.c: use G_GNUC_UNUSED rather then our own macro for a
+         very slightly cleaner looking output file
+
+2000-01-31  Eskil Heyn Olsen  <deity@eskil.dk>
+
+       * gob.m4: checks for gob binary, GOB_CHECK([version [,
+       action_if_found[, action_if_not_found]]]).  
+
+       * Makefile.am: Install gob in $prefix/share/aclocal
+
+Thu Jan 27 17:50:11 2000  George Lebl <jirka@5z.com>
+
+       * src/main.c: add #include <stdlib.h>
+
 Mon Jan 24 22:52:47 2000  George Lebl <jirka@5z.com>
 
        * Release 0.92.2
index 4a796946a3904d944fcf1415756a8f06360ef46d..4809e57e654309e4f6991125fd39973371d4d0d8 100644 (file)
@@ -1,7 +1,10 @@
 SUBDIRS = @SUBDIRS@
 DIST_SUBDIRS = src doc examples
 
-EXTRA_DIST = gob.spec.in
+m4dir=$(datadir)/aclocal
+m4_DATA=gob.m4
+
+EXTRA_DIST = gob.spec.in $(m4_DATA)
 
 dist-hook: gob.spec
        cp gob.spec $(distdir)
index 5b29e9af5057eb28dc0aa4d8c99afd17f9e98703..d25d6d4f4fdd436c7f41b3581cfb605f38896028 100644 (file)
@@ -80,11 +80,16 @@ YACC = @YACC@
 SUBDIRS = @SUBDIRS@
 DIST_SUBDIRS = src doc examples
 
-EXTRA_DIST = gob.spec.in
+m4dir = $(datadir)/aclocal
+m4_DATA = gob.m4
+
+EXTRA_DIST = gob.spec.in $(m4_DATA)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =  gob.spec
+DATA =  $(m4_DATA)
+
 DIST_COMMON =  README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
 Makefile.am Makefile.in NEWS TODO aclocal.m4 config.h.in configure \
 configure.in gob.spec.in install-sh missing mkinstalldirs
@@ -140,6 +145,25 @@ maintainer-clean-hdr:
 gob.spec: $(top_builddir)/config.status gob.spec.in
        cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
+install-m4DATA: $(m4_DATA)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(m4dir)
+       @list='$(m4_DATA)'; for p in $$list; do \
+         if test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(m4dir)/$$p"; \
+           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(m4dir)/$$p; \
+         else if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(m4dir)/$$p"; \
+           $(INSTALL_DATA) $$p $(DESTDIR)$(m4dir)/$$p; \
+         fi; fi; \
+       done
+
+uninstall-m4DATA:
+       @$(NORMAL_UNINSTALL)
+       list='$(m4_DATA)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(m4dir)/$$p; \
+       done
+
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -302,20 +326,21 @@ all-recursive-am: config.h
 install-exec-am:
 install-exec: install-exec-recursive
 
-install-data-am:
+install-data-am: install-m4DATA
 install-data: install-data-recursive
 
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 install: install-recursive
-uninstall-am:
+uninstall-am: uninstall-m4DATA
 uninstall: uninstall-recursive
-all-am: Makefile config.h
+all-am: Makefile $(DATA) config.h
 all-redirect: all-recursive-am
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs: installdirs-recursive
 installdirs-am:
+       $(mkinstalldirs)  $(DESTDIR)$(m4dir)
 
 
 mostlyclean-generic:
@@ -349,7 +374,8 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f config.status
 
 .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-install-data-recursive uninstall-data-recursive install-exec-recursive \
+uninstall-m4DATA install-m4DATA install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
 uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
 all-recursive check-recursive installcheck-recursive info-recursive \
 dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
diff --git a/NEWS b/NEWS
index dacb5f3d91e5b04f7cae6fcc1d4642107c2e25e9..306d9a4c961f62a85739e296e42618f31b7b3a01 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+0.92.3
+       * inline documentation support
+       * standard m4 autoconf macro
+       * cleanups
+
 0.92.2
        * more header code sections
        * some code restructuring
index b81bbf6e7fea0e13cce0d558feb80ce503d3e5a3..141721042878e148241cde7fb52694250b961efe 100755 (executable)
--- a/configure
+++ b/configure
@@ -703,7 +703,7 @@ fi
 
 PACKAGE=gob
 
-VERSION=0.92.2
+VERSION=0.92.3
 
 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 c38fbb1806fb8d8224bcf4748b2b7a56948af495..a116ad840e6abfe239718e80fe5432d221ac8dae 100644 (file)
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.2)
 AC_INIT(src/tree.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(gob,0.92.2)
+AM_INIT_AUTOMAKE(gob,0.92.3)
 
 if test -f ../NOINST_GOB ; then
   DOINSTGOB=
index 40916fd87335d3b33ccdc8456dad984225724bb5..22c39f01837e05b63d0437d6107e98b409a081c0 100644 (file)
@@ -10,9 +10,9 @@
 GOB \- The GTK+ Object Builder
 .SH SYNOPSIS
 .PP
-.B gob [-?] [-h] [--help] [--version] [-w] [--exit-on-warn]
-[--no-exit-on-warn] [--for-cpp] [--no-gnu] [--always-private-header]
-[--no-private-header] [--no-touch-headers] file
+.B gob
+[ option ] ...
+file
 .SH DESCRIPTION
 .PP
 GTK+ Object Builder is a simple preprocessor for easily creating
@@ -548,6 +548,42 @@ argument lists and virtual and signal method names as it might confuse the
 PARENT_HANDLER macro.  In fact avoiding all names with three underscores is
 the best policy when working with gob.
 
+.SH USING GTK-DOC STYLE INLINE DOCUMENTATION
+.PP
+If you want to use gtk-doc style inline documentation for your objects, you
+can do one of two things.  First, you could include the inline documentation
+comments in your %{ %} section which will then be put verbatim into the
+output source file.  This is the way you should use for functions you define
+outside of the class.
+.PP
+For class methods, you should use a gtk+ style comment, however it can be
+indented any number of tabs or spaces and you can use the short method name
+without the type prefix.  Gob will automatically try to extract these and
+translate to full names and put them in the output source file.  An example
+would be:
+.fi
+
+  class Gtk:Button:Example from Gtk:Button {
+          /**
+           * new:
+           *
+           * Makes a new #GtkButtonExample widget
+           *
+           * Returns: a new widget
+           **/
+          public
+          GtkWidget *
+          new(void)
+          {
+                  return GTK_WIDGET(GET_NEW);
+          }
+  } 
+
+.fi
+If the function you are documenting is a signal or a virtual then it will
+be documentating the wrapper that starts that virtual function or emits
+that signal.
+
 .SH DEALING WITH CIRCULAR HEADERS
 .PP
 Sometimes you may need to use an object of type MyObjectA in the MyObjectB
index bcaf20cb968ee53a379caf39fd21adf1983d15e3..d5be66583e83893726fab703c5cb9212041f4837 100644 (file)
@@ -5,7 +5,9 @@ gtk-button-count.gob    An example showing how simple it is to derive
                        a "click counting" on a GtkButton.  It defines
                        an argument for getting and setting the count
                        and it overrides the "clicked" default handler
-                       to count clicks
+                       to count clicks.  It also has inline documentation
+                       in gtk-doc style which gob 0.92.3+ can translate
+                       and stuff into the source file for you.
 
 my-person.gob          A simple file which can store some identity
                        information about a person, it shows arguments,
index 0d039dc602817a7ce7a69c538b8a78d0536a33a2..1982146e8fe11ab629667a8206012e2c231c7721 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * This is an example button widget which counts the number of clicks
+ *
+ * It is also showing how you can use inline gtk-doc like documentation
+ * which will be correctly translated and put into the resulting source
+ * file
+ */
 class Gtk:Button:Count from Gtk:Button {
        public int count;
 
@@ -14,6 +21,13 @@ class Gtk:Button:Count from Gtk:Button {
                button->count = 0;
        }
 
+       /**
+        * new:
+        *
+        * Makes a new #GtkButtonCount widget
+        *
+        * Returns: a new widget
+        **/
        public
        GtkWidget *
        new(void)
@@ -21,8 +35,14 @@ class Gtk:Button:Count from Gtk:Button {
                return GTK_WIDGET(GET_NEW);
        }
 
-       /* new button but with a label inside it already, the 'label'
-          argument must not be NULL or we will return NULL */
+       /**
+        * new_with_label:
+        * @label: the label text
+        *
+        * Makes a new #GtkButtonCount widget with a label
+        *
+        * Returns: a new widget
+        **/
        public
        GtkWidget *
        new_with_label(char *label (check null)) onerror NULL
diff --git a/gob.m4 b/gob.m4
new file mode 100644 (file)
index 0000000..25c45d4
--- /dev/null
+++ b/gob.m4
@@ -0,0 +1,59 @@
+dnl
+dnl GOB_HOOK(script if found, fail)
+dnl if fail = "failure", abort if GOB not found
+dnl
+
+
+AC_DEFUN([GOB_HOOK],[
+       AC_PATH_PROG(GOB,gob,no)
+       if test ! x$GOB = x; then       
+               if test ! x$1 = x; then 
+                       AC_MSG_CHECKING(for gob >= $1)
+                       g_r_ve=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+                       g_r_ma=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+                       g_r_mi=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+                       g_ve=`$GOB --version 2>&1|sed 's/Gob version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+                       g_ma=`$GOB --version 2>&1|sed 's/Gob version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+                       g_mi=`$GOB --version 2>&1|sed 's/Gob version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+                       if test $g_ve -eq $g_r_ve; then
+                               if test $g_ma -ge $g_r_ma; then
+                                       if test $g_mi -ge $g_r_mi; then
+                                               AC_MSG_RESULT(ok)
+                                       else
+                                               if test $g_ma -gt $g_r_ma; then
+                                                       AC_MSG_RESULT(ok)
+                                               else
+                                                       AC_MSG_ERROR("found $g_ve.$g_ma.$g_mi requires $g_r_ve.$g_r_ma.$g_r_mi")
+                                               fi
+                                       fi
+                               else
+                                       AC_MSG_ERROR("found $g_ve.$g_ma.$g_mi requires $g_r_ve.$g_r_ma.$g_r_mi")
+                               fi
+                       else
+                               if test $g_ve -gt $g_r_ve; then
+                                       AC_MSG_RESULT(ok)
+                               else
+                                       AC_MSG_ERROR(major version $g_ve found but $g_r_ve required)
+                               fi
+                       fi
+       
+                       unset gob_version
+                       unset g_ve
+                       unset g_ma
+                       unset g_mi
+                       unset g_r_ve
+                       unset g_r_ma
+                       unset g_r_mi
+               fi
+               AC_SUBST(GOB)
+               $2
+       else            
+               AC_MSG_ERROR("Cannot find gob")
+               $3
+       fi
+])
+
+AC_DEFUN([GOB_CHECK],[
+       GOB_HOOK($1,[],[])
+])
index d1a0ba9add20987e4883c5d5c2866bbd3876ef41..5d8810388433ada9cf39cafd1ff4d51c8c84942c 100644 (file)
--- a/gob.spec
+++ b/gob.spec
@@ -1,4 +1,4 @@
-%define  ver     0.92.2
+%define  ver     0.92.3
 %define  rel     1
 %define  prefix  /usr
 
@@ -19,6 +19,8 @@ from a single file which has inline C code so that you don't have to edit
 the generated files.  Syntax is somewhat inspired by java and yacc.
 
 %changelog
+* Tue Feb 7 2000  George Lebl <jirka@5z.com>
+- added %{prefix}/share/aclocal/* to %files
 * Tue Dec 14 1999  George Lebl <jirka@5z.com>
 - added the examples dir to the %doc
 * Mon Aug 16 1999  George Lebl <jirka@5z.com>
@@ -53,3 +55,4 @@ rm -rf $RPM_BUILD_ROOT
 
 %{prefix}/bin/*
 %{prefix}/man/man1/*
+%{prefix}/share/aclocal/*
index 9f93d21202300a64f0b8822e6798203a83d272e8..c4ed4e749f231d351a37842e99a11093609ea505 100644 (file)
@@ -19,6 +19,8 @@ from a single file which has inline C code so that you don't have to edit
 the generated files.  Syntax is somewhat inspired by java and yacc.
 
 %changelog
+* Tue Feb 7 2000  George Lebl <jirka@5z.com>
+- added %{prefix}/share/aclocal/* to %files
 * Tue Dec 14 1999  George Lebl <jirka@5z.com>
 - added the examples dir to the %doc
 * Mon Aug 16 1999  George Lebl <jirka@5z.com>
@@ -53,3 +55,4 @@ rm -rf $RPM_BUILD_ROOT
 
 %{prefix}/bin/*
 %{prefix}/man/man1/*
+%{prefix}/share/aclocal/*
index d9990cdc352045fbc4746bdc1a9a44532bc32a63..2f0c7169824a07be2c86915e3fbe93c4d8c12599 100644 (file)
@@ -284,88 +284,101 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
        *yy_cp = '\0'; \
        yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 72
-#define YY_END_OF_BUFFER 73
-static yyconst short int yy_acclist[359] =
+#define YY_NUM_RULES 85
+#define YY_END_OF_BUFFER 86
+static yyconst short int yy_acclist[422] =
     {   0,
-       73,   70,   72,   69,   70,   72,    1,   71,   72,   70,
-       71,   72,   70,   72,   70,   72,   70,   72,   69,   70,
-       72,   70,   72,   70,   72,   13,   70,   72,    1,   14,
-       71,   72,   13,   70,   71,   72,   13,   70,   72,   13,
-       70,   72,   34,   70,   72,    1,   35,   71,   72,   34,
-       70,   71,   72,   27,   34,   70,   72,   34,   70,   72,
-       34,   70,   72,   34,   70,   72,   34,   70,   72,   32,
-       34,   70,   72,   33,   34,   70,   72,   34,   70,   72,
-       34,   70,   72,   30,   70,   72,    1,   31,   71,   72,
-       30,   70,   71,   72,   29,   30,   70,   72,   30,   70,
-
-       72,   30,   70,   72,   70,   72,   70,   72,   64,   70,
-       72,   64,   70,   72,   64,   70,   72,   64,   70,   72,
-       64,   70,   72,   66,   70,   72,   70,   72,   70,   72,
-       62,   70,   72,   62,   70,   72,   70,   72,   64,   70,
-       72,   64,   70,   72,   64,   70,   72,   64,   70,   72,
-       64,   70,   72,   64,   70,   72,   64,   70,   72,   64,
-       70,   72,   64,   70,   72,   64,   70,   72,   64,   70,
-       72,   64,   70,   72,   67,   70,   72,   68,   70,   72,
-        8,   18,   12,    9,   26,   19,   28,   10,   64,   63,
-       64,   64,   64,   64,   62,   11,   62,   62,   65,   64,
-
-       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
-       64,   64,   64,   64,   64,   64,   64,    3,   17,   24,
-       20,   22,    5,    6,   63,   64,   64,   64,   64,   53,
-       62,    7,   62,   62,   64,   64,   64,   64,   64,   64,
-       48,   64,   64,   64,   64,   64,   64,   64,   64,   64,
-       64,   64,   64,   64,   64,   15,   16,   25,   21,   23,
-       64,   64,   39,   64,   38,   64,   64,   51,   64,   64,
-       64,   43,   64,   64,   46,   64,   64,   64,   64,   64,
-       64,   64,   64,   64,   64,   64,   64,   40,   64,   36,
-       64,   64,   52,   64,   64,   49,   64,   64,   64,   64,
-
-       64,   64,   47,   64,   64,   64,   64,   42,   64,   64,
-       64,   64,   64,   50,   64,   64,   64,   64,   64,   54,
-       64,   59,   64,   44,   64,   41,   64,   64,   64,   64,
-       64,   61,   64,   64,   55,   64,   64,   64,   58,   64,
-       64,   57,   64,   60,   64,   64,   45,   64,   64,   56,
-       64,   64,    4,   64,    2,    2,   64,   37
+       86,   83,   85,   82,   83,   85,    1,   84,   85,   83,
+       84,   85,   83,   85,   83,   85,   83,   85,   82,   83,
+       85,   83,   85,   83,   85,   26,   83,   85,    1,   27,
+       84,   85,   26,   83,   84,   85,   26,   83,   85,   26,
+       83,   85,   47,   83,   85,    1,   48,   84,   85,   47,
+       83,   84,   85,   40,   47,   83,   85,   47,   83,   85,
+       47,   83,   85,   47,   83,   85,   47,   83,   85,   45,
+       47,   83,   85,   46,   47,   83,   85,   47,   83,   85,
+       47,   83,   85,   43,   83,   85,    1,   44,   84,   85,
+       43,   83,   84,   85,   42,   43,   83,   85,   43,   83,
+
+       85,   43,   83,   85,   83,   85,   83,   85,   77,   83,
+       85,   77,   83,   85,   77,   83,   85,   77,   83,   85,
+       77,   83,   85,   79,   83,   85,   83,   85,   83,   85,
+       75,   83,   85,   75,   83,   85,   83,   85,   77,   83,
+       85,   77,   83,   85,   77,   83,   85,   77,   83,   85,
+       77,   83,   85,   77,   83,   85,   77,   83,   85,   77,
+       83,   85,   77,   83,   85,   77,   83,   85,   77,   83,
+       85,   77,   83,   85,   80,   83,   85,   81,   83,   85,
+        9,   83,   85,    9,   83,   84,   85,    9,   83,   85,
+        9,   83,   85,    9,   83,   85,    9,   83,   85,   14,
+
+       83,   85,   14,   83,   84,   85,   14,   83,   85,   14,
+       83,   85,   14,   83,   85,   14,   83,   85,   17,   83,
+       85,   17,   83,   84,   85,   17,   83,   85,   17,   83,
+       85,   21,   31,   25,   22,   39,   32,   41,   23,   77,
+       76,   77,   77,   77,   77,   75,   24,   75,   75,   78,
+       77,   77,   77,   77,   77,   77,   77,   77,   77,   77,
+       77,   77,   77,   77,   77,   77,   77,   77,    8,    6,
+       13,   10,   12,   11,   13,   16,   15,    3,   30,   37,
+       33,   35,   18,   19,   76,   77,   77,   77,   77,   66,
+       75,   20,   75,   75,   77,   77,   77,   77,   77,   77,
+
+       61,   77,   77,   77,   77,   77,   77,   77,   77,   77,
+       77,   77,   77,   77,   77,   11,   28,   29,   38,   34,
+       36,   77,   77,   52,   77,   51,   77,    5,   77,   64,
+       77,   77,   77,   56,   77,   77,   59,   77,   77,   77,
+       77,   77,   77,   77,   77,   77,   77,   77,   77,   53,
+       77,    7,   49,   77,   77,   65,   77,   77,   62,   77,
+       77,   77,   77,   77,   77,   60,   77,   77,   77,   77,
+       55,   77,   77,   77,   77,   77,   63,   77,   77,   77,
+       77,   77,   67,   77,   72,   77,   57,   77,   54,   77,
+       77,   77,   77,   77,   74,   77,   77,   68,   77,   77,
+
+       77,   71,   77,   77,   70,   77,   73,   77,   77,   58,
+       77,   77,   69,   77,   77,    4,   77,    2,    2,   77,
+       50
     } ;
 
-static yyconst short int yy_accept[315] =
+static yyconst short int yy_accept[362] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    2,    4,    7,   10,   13,   15,   17,
-       19,   22,   24,   26,   29,   33,   37,   40,   43,   46,
-       50,   54,   58,   61,   64,   67,   70,   74,   78,   81,
-       84,   87,   91,   95,   99,  102,  105,  107,  109,  112,
-      115,  118,  121,  124,  127,  129,  131,  134,  137,  139,
-      142,  145,  148,  151,  154,  157,  160,  163,  166,  169,
-      172,  175,  178,  181,  182,  182,  182,  182,  182,  182,
-      182,  182,  183,  183,  184,  184,  184,  184,  184,  185,
-      185,  186,  186,  186,  187,  188,  189,  189,  189,  190,
-
-      191,  192,  193,  194,  195,  195,  196,  197,  197,  197,
-      198,  198,  198,  199,  199,  200,  201,  202,  203,  204,
-      205,  206,  207,  208,  209,  210,  211,  212,  213,  214,
-      215,  216,  217,  218,  218,  219,  219,  219,  219,  219,
-      220,  220,  220,  220,  221,  221,  221,  221,  222,  223,
-      223,  224,  224,  224,  225,  225,  226,  227,  228,  229,
-      230,  231,  232,  232,  233,  234,  235,  235,  236,  237,
-      238,  239,  240,  241,  243,  244,  245,  246,  247,  248,
-      249,  250,  251,  252,  253,  254,  255,  256,  256,  256,
-      256,  257,  258,  258,  258,  259,  260,  261,  261,  262,
-
-      263,  265,  267,  268,  270,  271,  272,  274,  275,  277,
-      278,  279,  280,  281,  282,  283,  284,  285,  286,  287,
-      288,  290,  290,  291,  291,  291,  291,  291,  292,  293,
-      295,  296,  298,  299,  300,  301,  302,  303,  305,  306,
-      307,  308,  310,  311,  312,  312,  312,  312,  312,  312,
-      313,  314,  316,  317,  318,  319,  320,  322,  324,  326,
-      328,  329,  330,  330,  330,  330,  330,  330,  331,  332,
-      334,  335,  337,  338,  339,  341,  341,  341,  341,  341,
-      341,  342,  344,  346,  347,  349,  349,  349,  349,  349,
-      349,  350,  352,  352,  352,  352,  352,  353,  353,  353,
-
-      353,  353,  354,  355,  356,  356,  356,  358,  358,  358,
-      358,  358,  359,  359
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
+        4,    7,   10,   13,   15,   17,   19,   22,   24,   26,
+       29,   33,   37,   40,   43,   46,   50,   54,   58,   61,
+       64,   67,   70,   74,   78,   81,   84,   87,   91,   95,
+       99,  102,  105,  107,  109,  112,  115,  118,  121,  124,
+      127,  129,  131,  134,  137,  139,  142,  145,  148,  151,
+      154,  157,  160,  163,  166,  169,  172,  175,  178,  181,
+      184,  188,  191,  194,  197,  200,  203,  207,  210,  213,
+      216,  219,  222,  226,  229,  232,  233,  233,  233,  233,
+
+      233,  233,  233,  233,  234,  234,  235,  235,  235,  235,
+      235,  236,  236,  237,  237,  237,  238,  239,  240,  240,
+      240,  241,  242,  243,  244,  245,  246,  246,  247,  248,
+      248,  248,  249,  249,  249,  250,  250,  251,  252,  253,
+      254,  255,  256,  257,  258,  259,  260,  261,  262,  263,
+      264,  265,  266,  267,  268,  269,  270,  270,  270,  270,
+      271,  271,  272,  272,  272,  272,  273,  274,  274,  276,
+      277,  278,  278,  279,  279,  279,  279,  279,  280,  280,
+      280,  280,  281,  281,  281,  281,  282,  283,  283,  284,
+      284,  284,  285,  285,  286,  287,  288,  289,  290,  291,
+
+      292,  292,  292,  293,  294,  295,  295,  296,  297,  298,
+      299,  300,  301,  303,  304,  305,  306,  307,  308,  309,
+      310,  311,  312,  313,  314,  315,  316,  316,  317,  317,
+      317,  317,  318,  319,  319,  319,  320,  321,  322,  322,
+      323,  324,  326,  328,  328,  329,  330,  332,  333,  334,
+      336,  337,  339,  340,  341,  342,  343,  344,  345,  346,
+      347,  348,  349,  350,  352,  352,  353,  353,  353,  353,
+      354,  354,  354,  354,  354,  355,  356,  358,  359,  361,
+      362,  363,  364,  365,  366,  368,  369,  370,  371,  373,
+      374,  375,  375,  375,  375,  375,  375,  376,  377,  379,
+
+      380,  381,  382,  383,  385,  387,  389,  391,  392,  393,
+      393,  393,  393,  393,  393,  394,  395,  397,  398,  400,
+      401,  402,  404,  404,  404,  404,  404,  404,  405,  407,
+      409,  410,  412,  412,  412,  412,  412,  412,  413,  415,
+      415,  415,  415,  415,  416,  416,  416,  416,  416,  417,
+      418,  419,  419,  419,  421,  421,  421,  421,  421,  422,
+      422
     } ;
 
 static yyconst int yy_ec[256] =
@@ -373,17 +386,17 @@ static yyconst int yy_ec[256] =
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    1,    5,    6,    1,    7,    1,    8,    1,
-        1,    9,    1,    1,    1,   10,   11,   12,   13,   13,
-       13,   13,   13,   13,   13,   14,   14,   15,    1,   16,
-        1,   17,    1,    1,   18,   18,   19,   18,   20,   21,
-       22,   23,   22,   22,   24,   22,   25,   22,   26,   22,
-       22,   27,   22,   28,   29,   22,   22,   22,   22,   22,
-       30,   31,   32,    1,   22,    1,   33,   34,   35,   36,
-
-       37,   38,   39,   40,   41,   22,   22,   42,   43,   44,
-       45,   46,   47,   48,   49,   50,   51,   52,   22,   53,
-       22,   22,   54,    1,   55,    1,    1,    1,    1,    1,
+        1,    5,    1,    6,    7,    1,    8,    1,    9,    1,
+        1,   10,    1,    1,    1,   11,   12,   13,   14,   14,
+       14,   14,   14,   14,   14,   15,   15,   16,    1,   17,
+        1,   18,    1,    1,   19,   19,   20,   19,   21,   22,
+       23,   24,   23,   23,   25,   23,   26,   23,   27,   23,
+       23,   28,   23,   29,   30,   23,   23,   23,   23,   23,
+       31,   32,   33,    1,   23,    1,   34,   35,   36,   37,
+
+       38,   39,   40,   41,   42,   23,   23,   43,   44,   45,
+       46,   47,   48,   49,   50,   51,   52,   53,   23,   54,
+       23,   23,   55,    1,   56,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -400,258 +413,304 @@ static yyconst int yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static yyconst int yy_meta[56] =
+static yyconst int yy_meta[57] =
     {   0,
-        1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
-        1,    3,    3,    3,    4,    1,    1,    5,    5,    5,
-        5,    6,    6,    6,    6,    6,    6,    6,    6,    1,
-        1,    1,    5,    5,    5,    5,    5,    5,    6,    6,
-        6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
-        6,    6,    6,    1,    1
+        1,    2,    3,    1,    2,    1,    1,    1,    1,    1,
+        1,    1,    4,    4,    4,    5,    1,    1,    6,    6,
+        6,    6,    7,    7,    7,    7,    7,    7,    7,    7,
+        1,    1,    1,    6,    6,    6,    6,    6,    6,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    1,    1
     } ;
 
-static yyconst short int yy_base[330] =
+static yyconst short int yy_base[382] =
     {   0,
-        0,    3,    9,   12,   49,  102,   19,   36,  157,    0,
-      203,    0,  650,  651,  651,  651,  651,    8,  623,  606,
-        7,    2,  610,  651,  651,  651,  635,  619,  651,  651,
-      651,  651,   15,   18,  618,    0,  651,  651,    6,  588,
-      651,  651,  651,  651,  616,    0,   21,    0,  626,   47,
-       16,   11,   28,  651,   65,   54,   71,   76,   79,   18,
-       56,   49,   72,   30,   82,   67,   84,   87,   80,   85,
-       99,  651,  651,  651,  637,  611,  605,   74,  600,   95,
-       75,  651,  589,  651,  627,  213,  626,  625,  651,  629,
-      651,  218,  587,  651,  651,  651,  627,  614,  613,  612,
-
-       21,  104,  102,  110,  616,  129,  651,  622,  140,  209,
-      214,    0,  250,  218,  594,  116,  210,  222,  214,  219,
-      103,  227,  231,  232,  236,  238,  246,  241,  256,  257,
-      259,  261,  263,  620,  651,  599,  572,  587,  565,  651,
-      564,  576,  565,  651,  607,  606,  605,  651,  651,  609,
-      651,  576,  607,  651,  594,  593,  266,  267,  269,  270,
-      651,  278,  604,  651,  284,    0,  289,  272,  278,  273,
-      279,  284,  291,  591,  292,  295,  296,  299,  300,  303,
-      305,  302,  310,  313,  314,  315,  318,  585,  555,  567,
-      651,  651,  550,  560,  651,  651,  651,  558,  119,  317,
-
-      584,  583,  319,  582,  320,  321,  581,  322,  580,  323,
-      325,  324,  327,  326,  332,  341,  333,  337,  344,  334,
-      579,  566,  651,  555,  558,  542,  538,  360,  354,  573,
-      361,  572,  345,  362,  364,  365,  369,  571,  371,  373,
-      374,  570,  377,  378,  563,  535,  532,  544,  544,  380,
-      379,  564,  381,  382,  390,  384,  563,  562,  561,  560,
-      391,  393,  545,   96,  536,  523,  534,  387,  392,  555,
-      395,  554,  400,  397,  553,  548,  521,  525,  562,  561,
-      407,  547,  542,  402,  539,  486,  458,  438,  434,  414,
-      416,  459,  453,  439,  431,  434,  405,  444,  434,  440,
-
-      444,  651,  435,  651,  423,  445,  441,  187,  451,  464,
-      466,  651,  651,  478,  484,  490,  496,  502,  508,  510,
-      514,  520,  526,  532,  536,  540,  546,  550,  555
+        0,   35,    3,    5,   82,  136,   16,   24,  192,    0,
+      238,    0,    7,   49,   31,   63,   66,   77,  806,  807,
+      807,  807,  807,    4,  778,  761,   44,   17,  765,  807,
+      807,  807,  790,  774,  807,  807,  807,  807,   68,   11,
+      773,    0,  807,  807,   77,  743,  807,  807,  807,  807,
+      771,    0,   50,    0,  781,   28,    2,   47,   61,  807,
+       84,   94,   96,  102,  113,   85,   89,   74,   67,  106,
+      102,  105,  113,  115,  136,  109,  117,  807,  807,  807,
+      807,  784,  768,  151,  167,  807,  807,  782,  766,  155,
+      171,  789,  788,  168,  251,  807,  787,  760,  754,  253,
+
+      749,  228,  141,  807,  738,  807,  776,  130,  775,  774,
+      807,  779,  807,  254,  736,  807,  807,  807,  777,  763,
+      762,  761,  159,  248,  241,  244,  765,  248,  765,  771,
+      284,  290,  295,    0,  300,  303,  742,  249,  291,  139,
+      276,  279,  254,  296,  303,  304,  305,  307,  306,  308,
+      310,  311,  313,  316,  314,  807,  335,  356,  364,  807,
+      368,  807,  370,  374,  380,  807,  385,  760,  807,  807,
+      807,  768,  807,  746,  719,  734,  712,  807,  711,  723,
+      712,  807,  754,  753,  752,  807,  807,  757,  807,  723,
+      755,  807,  741,  740,    8,  318,  330,  328,  807,  378,
+
+      392,  752,  807,  385,    0,  388,  365,  373,  346,  317,
+      388,  323,  738,  389,  390,  391,  392,  393,  394,  397,
+      319,  395,  396,  399,  398,  411,  448,  807,  732,  702,
+      714,  807,  807,  697,  707,  807,  807,  807,  705,  252,
+      402,  731,  730,  421,  807,  412,  729,  403,  400,  728,
+      404,  727,  409,  414,  441,  422,  417,  415,  445,  446,
+      420,  451,  418,  726,  466,  807,  471,  475,  713,  807,
+      702,  705,  689,  685,  456,  465,  720,  469,  719,  470,
+      472,  473,  474,  476,  718,  477,  478,  479,  717,  480,
+      483,  710,  682,  679,  691,  691,  482,  481,  711,  484,
+
+      485,  489,  486,  710,  709,  708,  707,  490,  492,  692,
+      216,  679,  656,  667,  493,  495,  685,  502,  637,  503,
+      497,  630,  571,  544,  548,  527,  534,  522,  571,  567,
+      515,  562,  552,  523,  515,  542,  537,  533,  535,  500,
+      401,  548,  542,  529,  323,  301,  551,  561,  807,  552,
+      807,  151,  558,  125,   29,  561,  579,  583,  807,  807,
+      594,  601,  608,  615,  622,  629,  636,  643,  650,  652,
+      656,  663,  670,  677,  681,  685,  692,  696,  701,  707,
+      714
     } ;
 
-static yyconst short int yy_def[330] =
+static yyconst short int yy_def[382] =
     {   0,
-      314,  314,  315,  315,  316,  316,  317,  317,  313,    9,
-        9,   11,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  318,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  319,  313,  320,  321,  321,
-      321,  321,  321,  313,  313,  313,  313,  313,  313,  321,
-      321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
-      321,  313,  313,  313,  322,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  323,
-      313,  313,  313,  313,  313,  313,  324,  325,  321,  326,
-
-      321,  321,  321,  321,  313,  313,  313,  327,  313,  313,
-      313,  328,  313,  313,  313,  321,  321,  321,  321,  321,
-      321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
-      321,  321,  321,  322,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  323,
-      313,  313,  324,  313,  325,  326,  321,  321,  321,  321,
-      313,  313,  327,  313,  313,  328,  313,  321,  321,  321,
-      321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
-      321,  321,  321,  321,  321,  321,  321,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  321,  321,
-
-      321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
-      321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
-      321,  313,  313,  313,  313,  313,  313,  321,  321,  321,
-      321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
-      321,  321,  321,  321,  313,  313,  313,  313,  313,  321,
-      321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
-      321,  321,  313,  313,  313,  313,  313,  321,  321,  321,
-      321,  321,  321,  321,  321,  313,  313,  313,  313,  313,
-      321,  321,  321,  321,  321,  313,  313,  313,  313,  313,
-      321,  321,  313,  313,  313,  329,  321,  313,  313,  313,
-
-      329,  313,  321,  313,  313,  313,  321,  313,  313,  313,
-      313,  313,    0,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313
+      361,  361,  362,  362,  363,  363,  364,  364,  360,    9,
+        9,   11,  365,  365,  366,  366,  367,  367,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  368,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  369,  360,  370,  371,  371,  371,  371,  371,  360,
+      360,  360,  360,  360,  360,  371,  371,  371,  371,  371,
+      371,  371,  371,  371,  371,  371,  371,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  372,  360,  360,  360,
+
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  373,  360,  360,  360,  360,  360,  360,  374,  375,
+      371,  376,  371,  371,  371,  371,  360,  360,  360,  377,
+      360,  360,  360,  378,  360,  360,  360,  371,  371,  371,
+      371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
+      371,  371,  371,  371,  371,  360,  360,  360,  360,  360,
+      379,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  372,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  373,  360,  360,
+      374,  360,  375,  376,  371,  371,  371,  371,  360,  360,
+
+      360,  377,  360,  360,  378,  360,  371,  371,  371,  371,
+      371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
+      371,  371,  371,  371,  371,  371,  380,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  371,
+      371,  371,  371,  360,  360,  371,  371,  371,  371,  371,
+      371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
+      371,  371,  371,  371,  360,  360,  380,  360,  360,  360,
+      360,  360,  360,  360,  371,  371,  371,  371,  371,  371,
+      371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
+      371,  360,  360,  360,  360,  360,  371,  371,  371,  371,
+
+      371,  371,  371,  371,  371,  371,  371,  371,  371,  360,
+      360,  360,  360,  360,  371,  371,  371,  371,  371,  371,
+      371,  371,  360,  360,  360,  360,  360,  371,  371,  371,
+      371,  371,  360,  360,  360,  360,  360,  371,  371,  360,
+      360,  360,  381,  371,  360,  360,  360,  381,  360,  371,
+      360,  360,  360,  371,  360,  360,  360,  360,  360,    0,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360
     } ;
 
-static yyconst short int yy_nxt[707] =
+static yyconst short int yy_nxt[864] =
     {   0,
-      313,   15,   16,   17,   21,   16,   17,   92,   78,   22,
-       18,   25,   26,   18,   25,   26,   74,   27,   75,   85,
-       27,   42,   43,   44,   19,  100,   89,   19,   90,   96,
-      100,   97,  100,   28,   20,  100,   28,   20,   42,   43,
-       44,   80,  100,   45,  100,   86,   93,   81,  157,   46,
-       23,   30,   31,   32,   79,   82,   33,  102,  103,   34,
-       45,  100,  107,  100,  108,  116,   46,  104,   87,   88,
-      100,  121,  101,   35,  105,   78,  106,  106,  106,   36,
-      109,  100,  110,  110,  111,  109,  100,  113,  113,  113,
-      114,  114,  114,  119,  100,  117,  100,  102,  100,  100,
-
-      118,  100,   37,   38,   30,   31,   32,   39,   40,   33,
-      115,  123,   34,  100,  141,  120,  100,  100,  100,  128,
-      129,   79,  142,  112,  100,  122,   35,  124,  131,  130,
-      100,  138,   36,  100,  126,  125,  158,  127,  228,  132,
-      162,  162,  162,  133,  139,  277,  159,  173,  140,  140,
-      160,  165,  165,  165,  168,   37,   38,   14,   15,   16,
-       17,   14,   14,   14,   14,   14,   14,   47,   14,   14,
-       14,   48,   14,   14,   49,   49,   49,   49,   49,   49,
-       49,   50,   49,   49,   49,   49,   14,   14,   14,   49,
-       49,   51,   49,   49,   52,   49,   49,   49,   49,   49,
-
-       49,   49,   49,   49,   49,   49,   53,   49,   49,   49,
-       54,   14,   55,   56,   57,   58,   58,  145,  109,   92,
-      110,  110,  111,  109,  100,  111,  111,  111,  100,  114,
-      114,  114,   59,  100,  141,   60,  100,   61,   62,   63,
-       64,  100,  169,   65,   66,  100,  100,   67,   68,  115,
-      100,   69,  100,   70,   71,  100,   72,   73,   93,  109,
-      100,  113,  113,  113,  171,  170,  146,  147,  176,  172,
-      100,  100,  177,  100,  175,  100,  174,  100,  178,  180,
-      100,  100,  179,  100,  100,  181,  100,  100,  199,  162,
-      162,  162,  100,  100,  182,  165,  165,  165,  100,  184,
-
-      114,  114,  114,  187,  183,  100,  100,  185,  186,  100,
-      100,  201,  206,  100,  100,  200,  100,  100,  202,  100,
-      115,  205,  203,  208,  100,  204,  207,  100,  100,  100,
-      209,  100,  100,  100,  100,  100,  100,  100,  100,  100,
-      100,  100,  210,  211,  214,  216,  100,  100,  100,  213,
-      212,  100,  215,  221,  219,  100,  235,  218,  100,  100,
-      217,  229,  231,  236,  220,  202,  237,  241,  100,  230,
-      233,  232,  234,  239,  100,  100,  100,  240,  100,  100,
-      242,  238,  243,  100,  244,  100,  250,  100,  100,  253,
-      251,  100,  100,  100,  100,  100,  100,  252,  100,  256,
-
-      268,  100,  254,  257,  100,  100,  100,  100,  259,  100,
-      262,  100,  258,  255,  100,  281,  100,  271,  296,  100,
-      261,  100,  269,  260,  303,  291,  272,  274,  270,  296,
-      100,  283,  285,  273,  275,  289,  284,  292,  302,  297,
-      300,  282,  295,  295,  295,  295,  295,  295,  302,  100,
-      302,  306,  306,  306,  309,  100,  306,  306,  306,  308,
-      302,  307,  310,  310,  310,  311,  312,  311,  312,  305,
-      304,  299,  298,  100,  294,  310,  310,  310,   14,   14,
-       14,   14,   14,   14,   24,   24,   24,   24,   24,   24,
-       29,   29,   29,   29,   29,   29,   41,   41,   41,   41,
-
-       41,   41,   91,  139,   91,   91,   91,   91,   95,  293,
-       95,   95,   95,   95,   98,   98,   99,   99,   99,   99,
-      134,  134,  134,  134,  134,  134,  150,  150,  150,  150,
-      150,  150,  153,  153,  153,  153,  153,  153,  155,  155,
-      155,  155,  156,  156,  156,  156,  163,  163,  163,  163,
-      163,  163,  166,  100,  166,  301,  100,  301,  301,  301,
-      301,  100,  290,  289,  288,  287,  286,  100,  100,  100,
-      280,  279,  278,  276,  100,  100,  100,  100,  100,  267,
-      266,  265,  264,  263,  100,  100,  100,  100,  249,  248,
-      247,  246,  245,  100,  100,  100,  100,  100,  100,  227,
-
-      226,  225,  224,  223,  222,  100,  164,  100,  100,  154,
-      198,  151,  197,  196,  195,  194,  193,  192,  191,  190,
-      189,  188,  135,  167,  164,  161,  100,  100,  100,  154,
-      152,  151,  149,  148,  144,  143,   83,  137,  136,  135,
-      100,   76,   94,   76,   76,   84,   83,   77,   76,  313,
-       13,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-
-      313,  313,  313,  313,  313,  313
+      360,   21,   22,   23,   21,   31,   32,   31,   32,   22,
+       81,   24,   33,   96,   33,   97,   82,  122,   48,   49,
+      111,   50,  112,  122,  360,   25,   48,   49,   34,   50,
+       34,  240,   83,   22,   87,   26,   27,   22,   23,   27,
+       88,   51,   28,  122,  124,  100,   24,   52,  100,   51,
+       84,   22,   81,   84,  123,   52,   89,  102,   85,  118,
+       25,  119,  122,  103,   90,   22,   87,   90,   22,   93,
+       26,  104,   91,  107,   83,   94,  122,  179,  114,   22,
+       93,  114,  122,   29,   36,   37,   94,   38,   89,  122,
+       39,   95,  101,   40,  127,  125,  128,  128,  128,  108,
+
+      122,  126,   95,  129,  122,  130,  131,   41,  132,  132,
+      133,  142,  131,   42,  135,  135,  135,  122,  115,  141,
+      122,  122,  109,  110,  122,  136,  136,  136,  122,  139,
+      122,  124,  122,  138,  140,  183,   43,   44,   36,   37,
+      122,   38,   45,   46,   39,  137,  144,   40,  143,  134,
+      145,  122,  157,  153,  122,  157,  163,  146,  154,  163,
+      158,   41,  155,  148,  164,  147,  149,   42,  159,  160,
+      170,  161,  165,  166,  122,  167,  150,  151,  156,  171,
+      168,  179,  169,  209,  184,  185,  152,  195,  355,  180,
+       43,   44,   20,   21,   22,   23,   21,   20,   20,   20,
+
+       20,   20,   20,   53,   20,   20,   20,   54,   20,   20,
+       55,   55,   55,   55,   55,   55,   55,   56,   55,   55,
+       55,   55,   20,   20,   20,   55,   55,   57,   55,   55,
+       58,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   59,   55,   55,   55,   60,   20,   61,   62,
+       63,   64,   64,  170,  100,  114,  122,  100,  114,  122,
+      200,  200,  200,  122,  122,  176,  324,  122,   65,  122,
+      178,   66,  275,   67,   68,   69,   70,   98,  177,   71,
+       72,  196,  178,   73,   74,  198,  197,   75,  207,   76,
+       77,  122,   78,   79,  122,  115,  204,  204,  204,  212,
+
+      131,  101,  132,  132,  133,  131,  122,  133,  133,  133,
+      131,  122,  135,  135,  135,  136,  136,  136,  122,  122,
+      122,  122,  122,  122,  208,  122,  122,  210,  122,  122,
+      211,  122,  122,  122,  122,  137,  157,  352,  122,  157,
+      219,  215,  216,  122,  158,  122,  213,  214,  217,  221,
+      351,  249,  218,  220,  223,  226,  251,  159,  160,  222,
+      161,  122,  224,  259,  225,  159,  160,  241,  159,  159,
+      160,  163,  159,  242,  163,  165,  166,  243,  167,  164,
+      122,  165,  166,  168,  165,  228,  165,  166,  122,  165,
+      200,  200,  200,  244,  245,  248,  244,  204,  204,  204,
+
+      136,  136,  136,  122,  122,  122,  122,  122,  122,  122,
+      122,  122,  122,  122,  122,  122,  246,  122,  122,  122,
+      137,  247,  244,  245,  122,  244,  122,  122,  252,  122,
+      122,  250,  122,  122,  346,  122,  257,  122,  253,  254,
+      262,  261,  278,  256,  255,  258,  260,  264,  263,  265,
+      266,  243,  265,  277,  279,  276,  122,  280,  284,  283,
+      122,  122,  281,  268,  289,  285,  122,  265,  266,  291,
+      265,  122,  265,  266,  282,  265,  265,  266,  286,  265,
+      122,  288,  287,  297,  122,  122,  268,  122,  122,  122,
+      290,  122,  122,  122,  122,  122,  122,  122,  122,  122,
+
+      122,  122,  298,  315,  122,  122,  299,  122,  122,  303,
+      122,  304,  122,  301,  306,  300,  309,  122,  122,  305,
+      345,  318,  328,  302,  308,  316,  319,  321,  336,  307,
+      122,  336,  317,  332,  322,  337,  320,  122,  337,  330,
+      331,  338,  343,  336,  122,  329,  336,  349,  122,  350,
+      122,  339,  341,  343,  342,  342,  342,  344,  347,  349,
+      342,  342,  342,  353,  353,  353,  349,  122,  356,  177,
+      353,  353,  353,  357,  357,  357,  340,  122,  349,  354,
+      358,  359,  122,  358,  358,  359,  122,  358,  335,  334,
+      333,  357,  357,  357,   20,   20,   20,   20,   20,   20,
+
+       20,   30,   30,   30,   30,   30,   30,   30,   35,   35,
+       35,   35,   35,   35,   35,   47,   47,   47,   47,   47,
+       47,   47,   80,   80,   80,   80,   80,   80,   80,   86,
+       86,   86,   86,   86,   86,   86,   92,   92,   92,   92,
+       92,   92,   92,  113,  113,  122,  113,  113,  113,  113,
+      117,  117,  122,  117,  117,  117,  117,  120,  120,  121,
+      121,  121,  121,  172,  172,  172,  172,  172,  172,  172,
+      188,  188,  188,  188,  188,  188,  188,  191,  191,  191,
+      191,  191,  191,  191,  193,  193,  193,  193,  194,  194,
+      194,  194,  202,  202,  202,  202,  202,  202,  202,  205,
+
+      122,  205,  227,  227,  327,  326,  227,  227,  267,  267,
+      267,  267,  267,  267,  348,  348,  325,  348,  348,  348,
+      348,  323,  122,  122,  122,  122,  122,  314,  313,  312,
+      311,  310,  122,  122,  122,  122,  296,  295,  294,  293,
+      292,  122,  122,  122,  122,  122,  122,  274,  273,  272,
+      271,  270,  269,  122,  203,  122,  122,  192,  239,  189,
+      238,  237,  236,  235,  234,  233,  232,  231,  230,  229,
+      173,  228,  206,  203,  201,  199,  122,  122,  122,  192,
+      190,  189,  187,  186,  182,  181,  105,  175,  174,  173,
+      170,  170,   98,  162,   98,  156,  122,   98,  116,   98,
+
+       98,  106,  105,   99,   98,  360,   19,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360
     } ;
 
-static yyconst short int yy_chk[707] =
+static yyconst short int yy_chk[864] =
     {   0,
-        0,    1,    1,    1,    2,    2,    2,   39,   21,    2,
-        1,    3,    3,    2,    4,    4,   18,    3,   18,   33,
-        4,    7,    7,    7,    1,   52,   34,    2,   34,   47,
-       51,   47,   60,    3,    1,  101,    4,    2,    8,    8,
-        8,   22,   53,    7,   64,   33,   39,   22,  101,    7,
-        2,    5,    5,    5,   21,   22,    5,   51,   52,    5,
-        8,   50,   56,   62,   56,   60,    8,   53,   33,   33,
-       61,   64,   50,    5,   55,   78,   55,   55,   55,    5,
-       57,   66,   57,   57,   57,   58,   63,   58,   58,   58,
-       59,   59,   59,   62,   69,   61,   65,   61,   67,   70,
-
-       61,   68,    5,    5,    6,    6,    6,    6,    6,    6,
-       59,   66,    6,   71,   81,   63,  103,  121,  102,   69,
-       69,   78,   81,   57,  104,   65,    6,   67,   70,   69,
-      116,   80,    6,  199,   68,   67,  102,   68,  199,   71,
-      106,  106,  106,   71,   80,  264,  103,  121,   80,  264,
-      104,  109,  109,  109,  116,    6,    6,    9,    9,    9,
-        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
+        0,    1,    1,    1,    1,    3,    3,    4,    4,   13,
+       13,    1,    3,   24,    4,   24,   13,   57,    7,    7,
+       40,    7,   40,  195,    0,    1,    8,    8,    3,    8,
+        4,  195,   13,   15,   15,    1,    2,    2,    2,    2,
+       15,    7,    2,   56,   57,   27,    2,    7,   27,    8,
+       14,   14,   14,   14,   56,    8,   15,   28,   14,   53,
+        2,   53,   58,   28,   16,   16,   16,   16,   17,   17,
+        2,   28,   16,   39,   14,   17,   59,  355,   45,   18,
+       18,   45,   69,    2,    5,    5,   18,    5,   16,   68,
+        5,   17,   27,    5,   61,   58,   61,   61,   61,   39,
+
+       66,   59,   18,   62,   67,   62,   63,    5,   63,   63,
+       63,   69,   64,    5,   64,   64,   64,   71,   45,   68,
+       72,   70,   39,   39,   76,   65,   65,   65,   73,   67,
+       74,   67,   77,   66,   67,  108,    5,    5,    6,    6,
+      354,    6,    6,    6,    6,   65,   71,    6,   70,   63,
+       72,   75,   84,   76,  140,   84,   90,   73,   77,   90,
+       84,    6,   77,   74,   90,   73,   74,    6,   85,   85,
+       94,   85,   91,   91,  123,   91,   75,   75,   85,   94,
+       91,  103,   91,  140,  108,  108,   75,  123,  352,  103,
+        6,    6,    9,    9,    9,    9,    9,    9,    9,    9,
+
         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
-
         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
-        9,    9,   11,   11,   11,   11,   11,   86,  110,   92,
-      110,  110,  110,  111,  117,  111,  111,  111,  119,  114,
-      114,  114,   11,  120,  308,   11,  118,   11,   11,   11,
-       11,  122,  117,   11,   11,  123,  124,   11,   11,  114,
-      125,   11,  126,   11,   11,  128,   11,   11,   92,  113,
-      127,  113,  113,  113,  119,  118,   86,   86,  124,  120,
-      129,  130,  125,  131,  123,  132,  122,  133,  126,  127,
-      157,  158,  126,  159,  160,  128,  168,  170,  157,  162,
-      162,  162,  169,  171,  129,  165,  165,  165,  172,  131,
-
-      167,  167,  167,  133,  130,  173,  175,  131,  132,  176,
-      177,  159,  171,  178,  179,  158,  182,  180,  160,  181,
-      167,  170,  168,  173,  183,  169,  172,  184,  185,  186,
-      175,  200,  187,  203,  205,  206,  208,  210,  212,  211,
-      214,  213,  176,  177,  180,  182,  215,  217,  220,  179,
-      178,  218,  181,  187,  185,  216,  212,  184,  219,  233,
-      183,  203,  206,  213,  186,  200,  214,  217,  229,  205,
-      210,  208,  211,  216,  228,  231,  234,  216,  235,  236,
-      218,  215,  219,  237,  220,  239,  228,  240,  241,  233,
-      229,  243,  244,  251,  250,  253,  254,  231,  256,  236,
-
-      250,  268,  234,  237,  255,  261,  269,  262,  240,  271,
-      244,  274,  239,  235,  273,  268,  284,  254,  290,  297,
-      243,  281,  251,  241,  297,  281,  255,  261,  253,  290,
-      291,  271,  274,  256,  262,  289,  273,  284,  296,  291,
-      295,  269,  295,  295,  295,  289,  289,  289,  301,  303,
-      296,  300,  300,  300,  306,  307,  306,  306,  306,  305,
-      301,  303,  309,  309,  309,  310,  310,  311,  311,  299,
-      298,  294,  293,  292,  288,  310,  310,  310,  314,  314,
-      314,  314,  314,  314,  315,  315,  315,  315,  315,  315,
-      316,  316,  316,  316,  316,  316,  317,  317,  317,  317,
-
-      317,  317,  318,  287,  318,  318,  318,  318,  319,  286,
-      319,  319,  319,  319,  320,  320,  321,  321,  321,  321,
-      322,  322,  322,  322,  322,  322,  323,  323,  323,  323,
-      323,  323,  324,  324,  324,  324,  324,  324,  325,  325,
-      325,  325,  326,  326,  326,  326,  327,  327,  327,  327,
-      327,  327,  328,  285,  328,  329,  283,  329,  329,  329,
-      329,  282,  280,  279,  278,  277,  276,  275,  272,  270,
-      267,  266,  265,  263,  260,  259,  258,  257,  252,  249,
-      248,  247,  246,  245,  242,  238,  232,  230,  227,  226,
-      225,  224,  222,  221,  209,  207,  204,  202,  201,  198,
-
-      194,  193,  190,  189,  188,  174,  163,  156,  155,  153,
-      152,  150,  147,  146,  145,  143,  142,  141,  139,  138,
-      137,  136,  134,  115,  108,  105,  100,   99,   98,   97,
-       93,   90,   88,   87,   85,   83,   79,   77,   76,   75,
-       49,   45,   40,   35,   28,   27,   23,   20,   19,   13,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
-
-      313,  313,  313,  313,  313,  313
+        9,    9,    9,    9,    9,    9,    9,    9,   11,   11,
+       11,   11,   11,   95,  100,  114,  125,  100,  114,  126,
+      128,  128,  128,  124,  138,  102,  311,  240,   11,  143,
+      311,   11,  240,   11,   11,   11,   11,   95,  102,   11,
+       11,  124,  102,   11,   11,  126,  125,   11,  138,   11,
+       11,  141,   11,   11,  142,  114,  131,  131,  131,  143,
+
+      132,  100,  132,  132,  132,  133,  139,  133,  133,  133,
+      135,  144,  135,  135,  135,  136,  136,  136,  145,  146,
+      147,  149,  148,  150,  139,  151,  152,  141,  153,  155,
+      142,  154,  210,  196,  221,  136,  157,  346,  212,  157,
+      149,  146,  147,  198,  157,  197,  144,  145,  148,  151,
+      345,  210,  148,  150,  153,  155,  212,  158,  158,  152,
+      158,  209,  153,  221,  154,  159,  159,  196,  159,  161,
+      161,  163,  161,  197,  163,  164,  164,  198,  164,  163,
+      207,  165,  165,  164,  165,  164,  167,  167,  208,  167,
+      200,  200,  200,  201,  201,  209,  201,  204,  204,  204,
+
+      206,  206,  206,  211,  214,  215,  216,  217,  218,  219,
+      222,  223,  220,  225,  224,  249,  207,  241,  248,  251,
+      206,  208,  244,  244,  253,  244,  226,  246,  214,  254,
+      258,  211,  257,  263,  341,  261,  219,  256,  215,  216,
+      224,  223,  249,  218,  217,  220,  222,  226,  225,  227,
+      227,  241,  227,  248,  251,  246,  255,  253,  257,  256,
+      259,  260,  254,  227,  261,  258,  262,  265,  265,  263,
+      265,  275,  267,  267,  255,  267,  268,  268,  259,  268,
+      276,  260,  259,  275,  278,  280,  267,  281,  282,  283,
+      262,  284,  286,  287,  288,  290,  298,  297,  291,  300,
+
+      301,  303,  276,  297,  302,  308,  278,  309,  315,  283,
+      316,  284,  321,  281,  287,  280,  291,  318,  320,  286,
+      340,  301,  315,  282,  290,  298,  302,  308,  326,  288,
+      331,  326,  300,  321,  309,  327,  303,  328,  327,  318,
+      320,  328,  337,  336,  344,  316,  336,  343,  338,  344,
+      339,  331,  335,  337,  336,  336,  336,  338,  342,  343,
+      342,  342,  342,  347,  347,  347,  348,  350,  353,  334,
+      353,  353,  353,  356,  356,  356,  333,  332,  348,  350,
+      357,  357,  330,  357,  358,  358,  329,  358,  325,  324,
+      323,  357,  357,  357,  361,  361,  361,  361,  361,  361,
+
+      361,  362,  362,  362,  362,  362,  362,  362,  363,  363,
+      363,  363,  363,  363,  363,  364,  364,  364,  364,  364,
+      364,  364,  365,  365,  365,  365,  365,  365,  365,  366,
+      366,  366,  366,  366,  366,  366,  367,  367,  367,  367,
+      367,  367,  367,  368,  368,  322,  368,  368,  368,  368,
+      369,  369,  319,  369,  369,  369,  369,  370,  370,  371,
+      371,  371,  371,  372,  372,  372,  372,  372,  372,  372,
+      373,  373,  373,  373,  373,  373,  373,  374,  374,  374,
+      374,  374,  374,  374,  375,  375,  375,  375,  376,  376,
+      376,  376,  377,  377,  377,  377,  377,  377,  377,  378,
+
+      317,  378,  379,  379,  314,  313,  379,  379,  380,  380,
+      380,  380,  380,  380,  381,  381,  312,  381,  381,  381,
+      381,  310,  307,  306,  305,  304,  299,  296,  295,  294,
+      293,  292,  289,  285,  279,  277,  274,  273,  272,  271,
+      269,  264,  252,  250,  247,  243,  242,  239,  235,  234,
+      231,  230,  229,  213,  202,  194,  193,  191,  190,  188,
+      185,  184,  183,  181,  180,  179,  177,  176,  175,  174,
+      172,  168,  137,  130,  129,  127,  122,  121,  120,  119,
+      115,  112,  110,  109,  107,  105,  101,   99,   98,   97,
+       93,   92,   89,   88,   83,   82,   55,   51,   46,   41,
+
+       34,   33,   29,   26,   25,   19,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360
     } ;
 
 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
@@ -705,6 +764,10 @@ static int before_comment = INITIAL;
 static gboolean class_after_c = FALSE;
 static int code_type = CCODE;
 
+/* GTK+ doc stuff */
+static char *gtk_doc_func = NULL; /* current gtk-doc func */
+GHashTable *gtk_doc_hash = NULL;
+
 static GString *cbuf = NULL;
 int ccode_line = 1;
 
@@ -734,6 +797,21 @@ add_to_cbuf(char *s)
        }
 }
 
+static void
+add_gtk_doc_func(void)
+{
+       if(!gtk_doc_func)
+               return;
+
+       if(!gtk_doc_hash)
+               gtk_doc_hash = g_hash_table_new(g_str_hash, g_str_equal);
+       g_hash_table_insert(gtk_doc_hash, gtk_doc_func, g_strdup(cbuf->str));
+       clear_cbuf();
+
+       gtk_doc_func = NULL;
+}
+
+
 #define COMMENT 1
 
 #define C_CODE 2
@@ -744,7 +822,13 @@ add_to_cbuf(char *s)
 
 #define CLASS_CODE_I 5
 
-#line 748 "lex.yy.c"
+#define GTK_DOC_BEFORE_NAME 6
+
+#define GTK_DOC 7
+
+#define GTK_DOC_LINE 8
+
+#line 832 "lex.yy.c"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -898,10 +982,10 @@ YY_DECL
        register char *yy_cp = NULL, *yy_bp = NULL;
        register int yy_act;
 
-#line 73 "lexer.l"
+#line 95 "lexer.l"
 
 
-#line 905 "lex.yy.c"
+#line 989 "lex.yy.c"
 
        if ( yy_init )
                {
@@ -950,14 +1034,14 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 314 )
+                               if ( yy_current_state >= 361 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        *yy_state_ptr++ = yy_current_state;
                        ++yy_cp;
                        }
-               while ( yy_base[yy_current_state] != 651 );
+               while ( yy_base[yy_current_state] != 807 );
 
 yy_find_action:
                yy_current_state = *--yy_state_ptr;
@@ -988,12 +1072,12 @@ do_action:       /* This label is used only to access EOF actions. */
        { /* beginning of action switch */
 case 1:
 YY_RULE_SETUP
-#line 75 "lexer.l"
+#line 97 "lexer.l"
 { line_no++; REJECT; }
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 77 "lexer.l"
+#line 99 "lexer.l"
 { fprintf(stderr,"You are a bad bad person!\n"); REJECT; }
        YY_BREAK
 case 3:
@@ -1001,12 +1085,12 @@ case 3:
 yy_c_buf_p = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 79 "lexer.l"
+#line 101 "lexer.l"
 { ; /*comment, ignore*/ }
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 80 "lexer.l"
+#line 102 "lexer.l"
 {
        if(look_for_includes==1) {
                char *p;
@@ -1029,76 +1113,203 @@ case 5:
 yy_c_buf_p = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 97 "lexer.l"
-{ add_to_cbuf(yytext); /*comment, ignore*/ }
+#line 119 "lexer.l"
+{
+                       /* eat out gtk doc stuff */
+                       BEGIN(GTK_DOC_BEFORE_NAME);
+                       clear_cbuf();
+               }
        YY_BREAK
 case 6:
 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
 yy_c_buf_p = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 98 "lexer.l"
-{ ; /*comment, ignore*/ }
+#line 124 "lexer.l"
+{
+                       /* empty doc lines */
+                       ;
+               }       
        YY_BREAK
 case 7:
 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
 yy_c_buf_p = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 99 "lexer.l"
-{ ; /*comment, ignore*/ }
+#line 128 "lexer.l"
+{
+                       char *p;
+                       BEGIN(GTK_DOC);
+                       p = strchr(yytext, '*');
+                       g_free(gtk_doc_func);
+                       gtk_doc_func = g_strdup(p+2);
+                       p = strchr(gtk_doc_func, ':');
+                       if(p) *p='\0';
+                       g_strstrip(gtk_doc_func);
+               }
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 100 "lexer.l"
-{BEGIN(COMMENT); before_comment = INITIAL; }
+#line 138 "lexer.l"
+{
+                       BEGIN(CLASS_CODE_I);
+               }
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 101 "lexer.l"
+#line 141 "lexer.l"
+{
+                       BEGIN(COMMENT);
+                       before_comment = CLASS_CODE_I;
+               }
+       YY_BREAK
+case 10:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 145 "lexer.l"
+{
+                       /* empty doc lines */
+                       add_to_cbuf(" *\n");
+               }       
+       YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 149 "lexer.l"
+{
+                       BEGIN(CLASS_CODE_I);
+                       add_gtk_doc_func();
+               }
+       YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 153 "lexer.l"
+{
+                       fflush(stdout);
+                       add_to_cbuf(" * ");
+                       BEGIN(GTK_DOC_LINE);
+               }
+       YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 158 "lexer.l"
+{
+                       BEGIN(CLASS_CODE_I);
+               }
+       YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 161 "lexer.l"
+{
+                       BEGIN(COMMENT);
+                       before_comment = CLASS_CODE_I;
+               }
+       YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 165 "lexer.l"
+{
+                       BEGIN(CLASS_CODE_I);
+                       add_to_cbuf("\n");
+                       add_gtk_doc_func();
+               }
+       YY_BREAK
+case 16:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 170 "lexer.l"
+{
+                       BEGIN(GTK_DOC);
+                       add_to_cbuf(yytext);
+                       add_to_cbuf("\n");
+               }
+       YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 175 "lexer.l"
+{
+                       fflush(stdout);
+                       add_to_cbuf(yytext);
+               }
+       YY_BREAK
+case 18:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 180 "lexer.l"
+{ add_to_cbuf(yytext); /*comment, ignore*/ }
+       YY_BREAK
+case 19:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 181 "lexer.l"
+{ ; /*comment, ignore*/ }
+       YY_BREAK
+case 20:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 182 "lexer.l"
+{ ; /*comment, ignore*/ }
+       YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 183 "lexer.l"
+{BEGIN(COMMENT); before_comment = INITIAL; }
+       YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 184 "lexer.l"
 {
        add_to_cbuf(yytext);
        BEGIN(COMMENT);
        before_comment = C_CODE;
 }
        YY_BREAK
-case 10:
+case 23:
 YY_RULE_SETUP
-#line 106 "lexer.l"
+#line 189 "lexer.l"
 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
        YY_BREAK
-case 11:
+case 24:
 YY_RULE_SETUP
-#line 107 "lexer.l"
+#line 190 "lexer.l"
 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
        YY_BREAK
-case 12:
+case 25:
 YY_RULE_SETUP
-#line 108 "lexer.l"
+#line 191 "lexer.l"
 {
        if(before_comment == C_CODE) add_to_cbuf(yytext);
        BEGIN(before_comment);
                }
        YY_BREAK
-case 13:
+case 26:
 YY_RULE_SETUP
-#line 112 "lexer.l"
+#line 195 "lexer.l"
 {
        /* comment, ignore */
        if(before_comment == C_CODE) add_to_cbuf(yytext);
                }
        YY_BREAK
-case 14:
+case 27:
 YY_RULE_SETUP
-#line 116 "lexer.l"
+#line 199 "lexer.l"
 {
        /* comment, ignore */
        if(before_comment == C_CODE) add_to_cbuf(yytext);
                }
        YY_BREAK
-case 15:
+case 28:
 YY_RULE_SETUP
-#line 121 "lexer.l"
+#line 204 "lexer.l"
 {
                        BEGIN(C_CODE);
                        parenth_depth = 1;
@@ -1108,9 +1319,9 @@ YY_RULE_SETUP
                        ccode_line = line_no;
                }
        YY_BREAK
-case 16:
+case 29:
 YY_RULE_SETUP
-#line 129 "lexer.l"
+#line 212 "lexer.l"
 {
                        BEGIN(C_CODE);
                        parenth_depth = 1;
@@ -1120,9 +1331,9 @@ YY_RULE_SETUP
                        ccode_line = line_no;
                }
        YY_BREAK
-case 17:
+case 30:
 YY_RULE_SETUP
-#line 137 "lexer.l"
+#line 220 "lexer.l"
 {
                        BEGIN(C_CODE);
                        parenth_depth = 1;
@@ -1132,9 +1343,9 @@ YY_RULE_SETUP
                        ccode_line = line_no;
                }
        YY_BREAK
-case 18:
+case 31:
 YY_RULE_SETUP
-#line 145 "lexer.l"
+#line 228 "lexer.l"
 {
                        BEGIN(C_CODE);
                        parenth_depth = 1;
@@ -1146,9 +1357,9 @@ YY_RULE_SETUP
                                look_for_includes=1;
                }
        YY_BREAK
-case 19:
+case 32:
 YY_RULE_SETUP
-#line 155 "lexer.l"
+#line 238 "lexer.l"
 {
                        BEGIN(INITIAL);
                        yylval.cbuf = cbuf;
@@ -1158,83 +1369,83 @@ YY_RULE_SETUP
                        return code_type;
                }
        YY_BREAK
-case 20:
+case 33:
 YY_RULE_SETUP
-#line 164 "lexer.l"
+#line 247 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 21:
+case 34:
 YY_RULE_SETUP
-#line 165 "lexer.l"
+#line 248 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 22:
+case 35:
 YY_RULE_SETUP
-#line 166 "lexer.l"
+#line 249 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 23:
+case 36:
 YY_RULE_SETUP
-#line 167 "lexer.l"
+#line 250 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 24:
+case 37:
 YY_RULE_SETUP
-#line 168 "lexer.l"
+#line 251 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 25:
+case 38:
 YY_RULE_SETUP
-#line 169 "lexer.l"
+#line 252 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 26:
+case 39:
 YY_RULE_SETUP
-#line 171 "lexer.l"
+#line 254 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 27:
+case 40:
 YY_RULE_SETUP
-#line 172 "lexer.l"
+#line 255 "lexer.l"
 {
                        BEGIN(C_CODE_STRING);
                        add_to_cbuf(yytext);
                }
        YY_BREAK
-case 28:
+case 41:
 YY_RULE_SETUP
-#line 176 "lexer.l"
+#line 259 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 29:
+case 42:
 YY_RULE_SETUP
-#line 177 "lexer.l"
+#line 260 "lexer.l"
 {
                                BEGIN(C_CODE);
                                add_to_cbuf(yytext);
                        }
        YY_BREAK
-case 30:
+case 43:
 YY_RULE_SETUP
-#line 181 "lexer.l"
+#line 264 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 31:
+case 44:
 YY_RULE_SETUP
-#line 182 "lexer.l"
+#line 265 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 32:
+case 45:
 YY_RULE_SETUP
-#line 184 "lexer.l"
+#line 267 "lexer.l"
 {
                        parenth_depth++;
                        add_to_cbuf(yytext);
                }
        YY_BREAK
-case 33:
+case 46:
 YY_RULE_SETUP
-#line 188 "lexer.l"
+#line 271 "lexer.l"
 {
                        parenth_depth--;
                        if(parenth_depth<0) {
@@ -1248,31 +1459,39 @@ YY_RULE_SETUP
                        add_to_cbuf(yytext);
                }
        YY_BREAK
-case 34:
+case 47:
 YY_RULE_SETUP
-#line 201 "lexer.l"
+#line 284 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 35:
+case 48:
 YY_RULE_SETUP
-#line 202 "lexer.l"
+#line 285 "lexer.l"
 { add_to_cbuf(yytext); }
        YY_BREAK
-case 36:
+case 49:
 YY_RULE_SETUP
-#line 204 "lexer.l"
+#line 287 "lexer.l"
 {
+                       static int found_classes = 0;
                        look_for_includes = 2;
                        BEGIN(CLASS_CODE);
+
+                       if(++found_classes > 1) {
+                               print_error(FALSE, 
+                                           "Only one class per file allowed",
+                                           line_no);
+                       }
+
                        return CLASS;
                }
        YY_BREAK
-case 37:
+case 50:
 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
 yy_c_buf_p = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 210 "lexer.l"
+#line 301 "lexer.l"
 {
                        int maj = 0,min = 0,pl = 0;
                        int rmaj = 0,rmin = 0,rpl = 0;
@@ -1292,184 +1511,184 @@ YY_RULE_SETUP
                                    "To upgrade your gob, see: "
                                    "http://www.5z.com/jirka/gob.html",
                                    maj,min,pl,VERSION);
-                               print_error(FALSE,s, line_no);
+                               print_error(FALSE, s, line_no);
                                g_free(s);
                        }
                }
        YY_BREAK
-case 38:
+case 51:
 YY_RULE_SETUP
-#line 234 "lexer.l"
+#line 325 "lexer.l"
 {
                        if(for_cpp) {
                                char *s;
                                s = g_strdup_printf("'%s' keyword should not "
                                                    "be used when generating "
                                                    "C++ code",yytext);
-                               print_error(TRUE,s, line_no);
+                               print_error(TRUE, s, line_no);
                                g_free(s);
                        }
                        REJECT;
                }
        YY_BREAK
-case 39:
+case 52:
 YY_RULE_SETUP
-#line 246 "lexer.l"
+#line 337 "lexer.l"
 {return FROM;}
        YY_BREAK
-case 40:
+case 53:
 YY_RULE_SETUP
-#line 248 "lexer.l"
+#line 339 "lexer.l"
 {return VOID;}
        YY_BREAK
-case 41:
+case 54:
 YY_RULE_SETUP
-#line 249 "lexer.l"
+#line 340 "lexer.l"
 {return STRUCT;}
        YY_BREAK
-case 42:
+case 55:
 YY_RULE_SETUP
-#line 250 "lexer.l"
+#line 341 "lexer.l"
 {return UNION;}
        YY_BREAK
-case 43:
+case 56:
 YY_RULE_SETUP
-#line 251 "lexer.l"
+#line 342 "lexer.l"
 {return ENUM;}
        YY_BREAK
-case 44:
+case 57:
 YY_RULE_SETUP
-#line 252 "lexer.l"
+#line 343 "lexer.l"
 {return SIGNED;}
        YY_BREAK
-case 45:
+case 58:
 YY_RULE_SETUP
-#line 253 "lexer.l"
+#line 344 "lexer.l"
 {return UNSIGNED;}
        YY_BREAK
-case 46:
+case 59:
 YY_RULE_SETUP
-#line 254 "lexer.l"
+#line 345 "lexer.l"
 {return LONG;}
        YY_BREAK
-case 47:
+case 60:
 YY_RULE_SETUP
-#line 255 "lexer.l"
+#line 346 "lexer.l"
 {return SHORT;}
        YY_BREAK
-case 48:
+case 61:
 YY_RULE_SETUP
-#line 256 "lexer.l"
+#line 347 "lexer.l"
 {return INT;}
        YY_BREAK
-case 49:
+case 62:
 YY_RULE_SETUP
-#line 257 "lexer.l"
+#line 348 "lexer.l"
 {return FLOAT;}
        YY_BREAK
-case 50:
+case 63:
 YY_RULE_SETUP
-#line 258 "lexer.l"
+#line 349 "lexer.l"
 {return DOUBLE;}
        YY_BREAK
-case 51:
+case 64:
 YY_RULE_SETUP
-#line 259 "lexer.l"
+#line 350 "lexer.l"
 {return CHAR;}
        YY_BREAK
-case 52:
+case 65:
 YY_RULE_SETUP
-#line 260 "lexer.l"
+#line 351 "lexer.l"
 {return CONST;}
        YY_BREAK
-case 53:
+case 66:
 YY_RULE_SETUP
-#line 262 "lexer.l"
+#line 353 "lexer.l"
 {return THREEDOTS;}
        YY_BREAK
-case 54:
+case 67:
 YY_RULE_SETUP
-#line 264 "lexer.l"
+#line 355 "lexer.l"
 {yylval.line = line_no; return PUBLIC;}
        YY_BREAK
-case 55:
+case 68:
 YY_RULE_SETUP
-#line 265 "lexer.l"
+#line 356 "lexer.l"
 {yylval.line = line_no; return PRIVATE;}
        YY_BREAK
-case 56:
+case 69:
 YY_RULE_SETUP
-#line 266 "lexer.l"
+#line 357 "lexer.l"
 {yylval.line = line_no; return PROTECTED;}
        YY_BREAK
-case 57:
+case 70:
 YY_RULE_SETUP
-#line 267 "lexer.l"
+#line 358 "lexer.l"
 {yylval.line = line_no; return ARGUMENT;}
        YY_BREAK
-case 58:
+case 71:
 YY_RULE_SETUP
-#line 268 "lexer.l"
+#line 359 "lexer.l"
 {yylval.line = line_no; return VIRTUAL;}
        YY_BREAK
-case 59:
+case 72:
 YY_RULE_SETUP
-#line 269 "lexer.l"
+#line 360 "lexer.l"
 {yylval.line = line_no; return SIGNAL;}
        YY_BREAK
-case 60:
+case 73:
 YY_RULE_SETUP
-#line 270 "lexer.l"
+#line 361 "lexer.l"
 {yylval.line = line_no; return OVERRIDE;}
        YY_BREAK
-case 61:
+case 74:
 YY_RULE_SETUP
-#line 271 "lexer.l"
+#line 362 "lexer.l"
 {return ONERROR;}
        YY_BREAK
-case 62:
+case 75:
 YY_RULE_SETUP
-#line 272 "lexer.l"
+#line 363 "lexer.l"
 {
                        yylval.id = g_strdup(yytext);
                        return NUMBER;
                }
        YY_BREAK
-case 63:
+case 76:
 YY_RULE_SETUP
-#line 276 "lexer.l"
+#line 367 "lexer.l"
 {
                        yylval.id = g_strdup(yytext);
                        return TYPETOKEN;
                }
        YY_BREAK
-case 64:
+case 77:
 YY_RULE_SETUP
-#line 280 "lexer.l"
+#line 371 "lexer.l"
 {
                        yylval.id = g_strdup(yytext);
                        return TOKEN;
                }
        YY_BREAK
-case 65:
+case 78:
 YY_RULE_SETUP
-#line 285 "lexer.l"
+#line 376 "lexer.l"
 {
                        yylval.id = g_strdup(yytext);
                        return ARRAY_DIM;
                }
        YY_BREAK
-case 66:
+case 79:
 YY_RULE_SETUP
-#line 290 "lexer.l"
+#line 381 "lexer.l"
 {
                        BEGIN(CLASS_CODE_I);
                        return '{';
                }
        YY_BREAK
-case 67:
+case 80:
 YY_RULE_SETUP
-#line 294 "lexer.l"
+#line 385 "lexer.l"
 {
                        BEGIN(C_CODE);
                        parenth_depth=1;
@@ -1480,44 +1699,47 @@ YY_RULE_SETUP
                        return '{';
                }
        YY_BREAK
-case 68:
+case 81:
 YY_RULE_SETUP
-#line 303 "lexer.l"
+#line 394 "lexer.l"
 {
                                BEGIN(INITIAL);
                                return '}';
                        }
        YY_BREAK
-case 69:
+case 82:
 YY_RULE_SETUP
-#line 308 "lexer.l"
+#line 399 "lexer.l"
 ;  /*ignore*/
        YY_BREAK
-case 70:
+case 83:
 YY_RULE_SETUP
-#line 310 "lexer.l"
+#line 401 "lexer.l"
 {
                        yylval.line = line_no;
                        return yytext[0];
                }
        YY_BREAK
-case 71:
+case 84:
 YY_RULE_SETUP
-#line 315 "lexer.l"
+#line 406 "lexer.l"
 ;  /*ignore*/
        YY_BREAK
-case 72:
+case 85:
 YY_RULE_SETUP
-#line 316 "lexer.l"
+#line 407 "lexer.l"
 ECHO;
        YY_BREAK
-#line 1515 "lex.yy.c"
+#line 1734 "lex.yy.c"
                        case YY_STATE_EOF(INITIAL):
                        case YY_STATE_EOF(COMMENT):
                        case YY_STATE_EOF(C_CODE):
                        case YY_STATE_EOF(C_CODE_STRING):
                        case YY_STATE_EOF(CLASS_CODE):
                        case YY_STATE_EOF(CLASS_CODE_I):
+                       case YY_STATE_EOF(GTK_DOC_BEFORE_NAME):
+                       case YY_STATE_EOF(GTK_DOC):
+                       case YY_STATE_EOF(GTK_DOC_LINE):
                                yyterminate();
 
        case YY_END_OF_BUFFER:
@@ -1806,7 +2028,7 @@ static yy_state_type yy_get_previous_state()
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 314 )
+                       if ( yy_current_state >= 361 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1836,11 +2058,11 @@ yy_state_type yy_current_state;
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 314 )
+               if ( yy_current_state >= 361 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-       yy_is_jam = (yy_current_state == 313);
+       yy_is_jam = (yy_current_state == 360);
        if ( ! yy_is_jam )
                *yy_state_ptr++ = yy_current_state;
 
@@ -2398,4 +2620,4 @@ int main()
        return 0;
        }
 #endif
-#line 316 "lexer.l"
+#line 407 "lexer.l"
index d896eb2f4b504e997ae87ab60081eb68b1da441c..68bafd020eba981874ce6b990a026989742eb1cd 100644 (file)
@@ -33,6 +33,10 @@ static int before_comment = INITIAL;
 static gboolean class_after_c = FALSE;
 static int code_type = CCODE;
 
+/* GTK+ doc stuff */
+static char *gtk_doc_func = NULL; /* current gtk-doc func */
+GHashTable *gtk_doc_hash = NULL;
+
 static GString *cbuf = NULL;
 int ccode_line = 1;
 
@@ -62,6 +66,21 @@ add_to_cbuf(char *s)
        }
 }
 
+static void
+add_gtk_doc_func(void)
+{
+       if(!gtk_doc_func)
+               return;
+
+       if(!gtk_doc_hash)
+               gtk_doc_hash = g_hash_table_new(g_str_hash, g_str_equal);
+       g_hash_table_insert(gtk_doc_hash, gtk_doc_func, g_strdup(cbuf->str));
+       clear_cbuf();
+
+       gtk_doc_func = NULL;
+}
+
+
 %}
 
 %x COMMENT
@@ -69,6 +88,9 @@ add_to_cbuf(char *s)
 %x C_CODE_STRING
 %x CLASS_CODE
 %x CLASS_CODE_I
+%x GTK_DOC_BEFORE_NAME
+%x GTK_DOC
+%x GTK_DOC_LINE
 
 %%
 
@@ -94,6 +116,67 @@ add_to_cbuf(char *s)
        REJECT;
 }
 
+<CLASS_CODE_I>\/\*\*[ \t]*$    {
+                       /* eat out gtk doc stuff */
+                       BEGIN(GTK_DOC_BEFORE_NAME);
+                       clear_cbuf();
+               }
+<GTK_DOC_BEFORE_NAME>^[ \t]*\*[ \t]*$  {
+                       /* empty doc lines */
+                       ;
+               }       
+<GTK_DOC_BEFORE_NAME>^[ \t]*\*\ [_a-zA-Z][_a-zA-Z0-9]*:?[ \t]*$        {
+                       char *p;
+                       BEGIN(GTK_DOC);
+                       p = strchr(yytext, '*');
+                       g_free(gtk_doc_func);
+                       gtk_doc_func = g_strdup(p+2);
+                       p = strchr(gtk_doc_func, ':');
+                       if(p) *p='\0';
+                       g_strstrip(gtk_doc_func);
+               }
+<GTK_DOC_BEFORE_NAME>\*\/      {
+                       BEGIN(CLASS_CODE_I);
+               }
+<GTK_DOC_BEFORE_NAME>. {
+                       BEGIN(COMMENT);
+                       before_comment = CLASS_CODE_I;
+               }
+<GTK_DOC>^[ \t]*\*[ \t]*$      {
+                       /* empty doc lines */
+                       add_to_cbuf(" *\n");
+               }       
+<GTK_DOC>^[ \t]*\*?\*\/        {
+                       BEGIN(CLASS_CODE_I);
+                       add_gtk_doc_func();
+               }
+<GTK_DOC>^[ \t]*\*\    {
+                       fflush(stdout);
+                       add_to_cbuf(" * ");
+                       BEGIN(GTK_DOC_LINE);
+               }
+<GTK_DOC>\*\/  {
+                       BEGIN(CLASS_CODE_I);
+               }
+<GTK_DOC>.     {
+                       BEGIN(COMMENT);
+                       before_comment = CLASS_CODE_I;
+               }
+<GTK_DOC_LINE>\*\/     {
+                       BEGIN(CLASS_CODE_I);
+                       add_to_cbuf("\n");
+                       add_gtk_doc_func();
+               }
+<GTK_DOC_LINE>.$       {
+                       BEGIN(GTK_DOC);
+                       add_to_cbuf(yytext);
+                       add_to_cbuf("\n");
+               }
+<GTK_DOC_LINE>.        {
+                       fflush(stdout);
+                       add_to_cbuf(yytext);
+               }
+
 <C_CODE>\/\/.*$                { add_to_cbuf(yytext); /*comment, ignore*/ }
 <CLASS_CODE>\/\/.*$    { ; /*comment, ignore*/ }
 <CLASS_CODE_I>\/\/.*$  { ; /*comment, ignore*/ }
@@ -202,8 +285,16 @@ add_to_cbuf(char *s)
 <C_CODE>\n     { add_to_cbuf(yytext); }
 
 class          {
+                       static int found_classes = 0;
                        look_for_includes = 2;
                        BEGIN(CLASS_CODE);
+
+                       if(++found_classes > 1) {
+                               print_error(FALSE, 
+                                           "Only one class per file allowed",
+                                           line_no);
+                       }
+
                        return CLASS;
                }
 
@@ -226,7 +317,7 @@ class               {
                                    "To upgrade your gob, see: "
                                    "http://www.5z.com/jirka/gob.html",
                                    maj,min,pl,VERSION);
-                               print_error(FALSE,s, line_no);
+                               print_error(FALSE, s, line_no);
                                g_free(s);
                        }
                }
@@ -237,7 +328,7 @@ class               {
                                s = g_strdup_printf("'%s' keyword should not "
                                                    "be used when generating "
                                                    "C++ code",yytext);
-                               print_error(TRUE,s, line_no);
+                               print_error(TRUE, s, line_no);
                                g_free(s);
                        }
                        REJECT;
index d86697d83cd8b2852fce037ce075f5740f21628a..d5d299e28a268e64673c09794866d4628d23d4eb 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <sys/stat.h>
 
 #include "tree.h"
@@ -46,6 +47,8 @@ extern GList *nodes;
 
 extern GList *include_files;
 
+extern GHashTable *gtk_doc_hash;
+
 char *filebase;
 static char *funcbase;
 static char *pfuncbase;
@@ -135,6 +138,27 @@ get_type(Type *t, gboolean postfix_to_stars)
        return s;
 }
 
+static char *
+get_gtk_doc(char *id)
+{
+       char *val, *s;
+
+       if(!gtk_doc_hash)
+               return NULL;
+
+       val = g_hash_table_lookup(gtk_doc_hash, id);
+       if(val)
+               return g_strdup_printf("/**\n * %s_%s:\n%s **/\n",
+                                      funcbase, id, val);
+       s = g_strconcat(funcbase, "_", id, NULL);
+       val = g_hash_table_lookup(gtk_doc_hash, s);
+       g_free(s);
+       if(val)
+               return g_strdup_printf("/**\n * %s_%s:\n%s **/\n",
+                                      funcbase, id, val);
+       return NULL;
+}
+
 static void
 print_type(FILE *fp, Type *t, gboolean postfix_to_stars)
 {
@@ -148,7 +172,9 @@ print_type(FILE *fp, Type *t, gboolean postfix_to_stars)
 
 static void
 print_method(FILE *fp, char *typeprefix, char *nameprefix,
-            char *namepostfix,char *postfix, Method *m,
+            char *subnameprefix,
+            char *namepostfix, char *postfix, Method *m,
+            gboolean one_arg_per_line,
             gboolean no_funcbase)
 {
        GList *li;
@@ -156,27 +182,30 @@ print_method(FILE *fp, char *typeprefix, char *nameprefix,
        out_printf(fp,"%s",typeprefix); 
        print_type(fp,m->mtype,TRUE);
        if(no_funcbase)
-               out_printf(fp,"%s%s%s(",
-                          nameprefix,m->id,namepostfix); 
+               out_printf(fp,"%s%s%s%s(",
+                          nameprefix,subnameprefix,m->id,namepostfix); 
        else
-               out_printf(fp,"%s%s_%s%s(",
-                          nameprefix,funcbase,m->id,namepostfix); 
+               out_printf(fp,"%s%s_%s%s%s(",
+                          nameprefix,funcbase,subnameprefix,m->id,
+                          namepostfix); 
        
        if(m->args) {
                for(li=m->args;li;li=g_list_next(li)) {
                        FuncArg *arg = li->data;
                        print_type(fp,arg->atype,FALSE);
                        if(li->next)
-                               out_printf(fp,"%s%s, ",arg->name,
+                               out_printf(fp,"%s%s,%s",arg->name,
                                           arg->atype->postfix?
-                                          arg->atype->postfix:""); 
+                                          arg->atype->postfix:"",
+                                          one_arg_per_line?"\n\t\t\t\t\t":" ");
                        else
                                out_printf(fp,"%s%s",arg->name,
                                           arg->atype->postfix?
                                           arg->atype->postfix:""); 
                }
                if(m->vararg)
-                       out_printf(fp,", ..."); 
+                       out_printf(fp,",%s...",
+                                  one_arg_per_line?"\n\t\t\t\t\t":" "); 
        } else {
                out_printf(fp,"void"); 
        }
@@ -232,7 +261,7 @@ make_method_nongnu_aliases(Class *c)
                        if(for_cpp && strcmp(m->id,"new")==0)
                                continue;
 
-                       print_method(out,"static ","(* ",") ","",m,TRUE);
+                       print_method(out,"static ","(* ","",") ","",m,FALSE,TRUE);
                        out_printf(out," = %s_%s;\n",funcbase,m->id);
 
                        made_aliases = TRUE;
@@ -306,7 +335,12 @@ put_vs_method(Method *m)
           m->method != VIRTUAL_METHOD)
                return;
 
-       print_method(outh,"\t","(* ",") ",";\n",m,TRUE);
+       /* if a signal mark it as such */
+       if(m->method != VIRTUAL_METHOD)
+               print_method(outh,"\t/*signal*/","(* ","",") ",";\n",m,
+                            FALSE,TRUE);
+       else
+               print_method(outh,"\t","(* ","",") ",";\n",m,FALSE,TRUE);
 }
 
 static void
@@ -315,9 +349,47 @@ put_pub_method(Method *m)
        if(m->scope != PUBLIC_SCOPE)
                return;
 
-       print_method(outh,"","\t","\t",";\n",m,FALSE);
+       print_method(outh,"","\t","","\t",";\n",m,TRUE,FALSE);
 }
 
+/* I'm starting not to like this idea */
+#if 0
+static void
+put_signal_connect(Method *m)
+{
+       if(m->method != SIGNAL_LAST_METHOD &&
+          m->method != SIGNAL_FIRST_METHOD)
+               return;
+
+       out_printf(outh, "guint \t%s_%s__connect_full\t(%s *object,\n"
+                  "\t\t\t\t\tconst char *name,\n"
+                  "\t\t\t\t\tGtkSignalFunc func,\n"
+                  "\t\t\t\t\tGtkCallbackMarshal marshal,\n"
+                  "\t\t\t\t\tgpointer data,\n"
+                  "\t\t\t\t\tGtkDestroyNotify destroy_func,\n"
+                  "\t\t\t\t\tgboolean object_signal,\n"
+                  "\t\t\t\t\tgboolean after);\n",
+                  funcbase, m->id, typebase);
+
+       out_printf(outh, "#define %s_%s__connect(object,name,func,data) "
+                  "%s_%s__connect_full((object),(name),(func),NULL,"
+                  "(data),NULL,FALSE,FALSE)\n",
+                  funcbase, m->id, funcbase, m->id);
+       out_printf(outh, "#define %s_%s__connect_after(object,name,func,data) "
+                  "%s__connect_%s_full((object),(name),(func),NULL,"
+                  "(data),NULL,FALSE,TRUE)\n",
+                  funcbase, m->id, funcbase, m->id);
+
+       out_printf(outh, "guint \t%s_%s__connect_while_alive\t(%s *object,\n"
+                  "\t\t\t\t\tconst char *name,\n"
+                  "\t\t\t\t\tGtkSignalFunc func,\n"
+                  "\t\t\t\t\tgpointer data,\n"
+                  "\t\t\t\t\tGtkObject *alive_object);\n\n",
+                  funcbase, m->id, typebase);
+}
+#endif
+
+
 static void
 put_prot_method(Method *m)
 {
@@ -325,9 +397,9 @@ put_prot_method(Method *m)
                return;
 
        if(outph)
-               print_method(outph,"","\t","\t",";\n",m,FALSE);
+               print_method(outph,"","\t","","\t",";\n",m,FALSE,FALSE);
        else
-               print_method(out,"","\t","\t",";\n",m,FALSE);
+               print_method(out,"","\t","","\t",";\n",m,FALSE,FALSE);
 }
 
 static void
@@ -337,7 +409,9 @@ put_priv_method_prot(Method *m)
           m->method == SIGNAL_FIRST_METHOD ||
           m->method == VIRTUAL_METHOD) {
                if(m->cbuf)
-                       print_method(out,"static ","___real_"," ",";\n",m,FALSE);
+                       print_method(out,
+                                    "static ", "___real_", "", " ", ";\n",
+                                    m, FALSE, FALSE);
        }
 
        if(m->scope == PRIVATE_SCOPE ||
@@ -345,9 +419,9 @@ put_priv_method_prot(Method *m)
           m->method == CLASS_INIT_METHOD ||
           (m->method == OVERRIDE_METHOD &&
            m->cbuf))
-               print_method(out,"static ",""," ",
-                            no_gnu?";\n":" ___NO_UNUSED_WARNING;\n"
-                            ,m,FALSE);
+               print_method(out, "static ", "", "", " ",
+                            no_gnu?";\n":" G_GNUC_UNUSED;\n",
+                            m, FALSE, FALSE);
 }
 
 static GList *
@@ -646,12 +720,12 @@ add_overrides(Class *c, char *oname, gboolean did_gtk_obj)
        GHashTable *done;
        char *s;
        
-       done = g_hash_table_new(g_str_hash,g_str_equal);
+       done = g_hash_table_new(g_str_hash, g_str_equal);
        if(did_gtk_obj) {
                s = g_strdup("GtkObject"); /* This was already done */
-               g_hash_table_insert(done,s,s);
+               g_hash_table_insert(done, s, s);
        }
-       for(li=c->nodes;li;li=g_list_next(li)) {
+       for(li=c->nodes; li; li=g_list_next(li)) {
                Node *n = li->data;
                char *f;
                Method *m = (Method *)n;
@@ -866,7 +940,8 @@ add_inits(Class *c)
                if(m->method == INIT_METHOD) {
                        if(m->line_no>0)
                                out_addline_infile(out,m->line_no);
-                       print_method(out,"static ","\n"," ","\n",m,FALSE);
+                       print_method(out, "static ", "\n", "", " ", "\n",
+                                    m, FALSE, FALSE);
                        if(m->line_no>0)
                                out_addline_outfile(out);
                        out_printf(out,"{\n");
@@ -878,8 +953,9 @@ add_inits(Class *c)
                        }
                } else if(m->method == CLASS_INIT_METHOD) {
                        if(m->line_no>0)
-                               out_addline_infile(out,m->line_no);
-                       print_method(out,"static ","\n"," ","\n",m,FALSE);
+                               out_addline_infile(out, m->line_no);
+                       print_method(out, "static ", "\n", "", " ", "\n",
+                                    m, FALSE, FALSE);
                        if(m->line_no>0)
                                out_addline_outfile(out);
                        out_printf(out,"{\n");
@@ -1135,19 +1211,26 @@ get_arg_names_for_macro(Method *m)
 static void
 put_method(Method *m)
 {
-       char *s,*args;
+       char *s,*args,*doc;
        gboolean is_void;
        is_void = (strcmp(m->mtype->name,"void")==0 &&
                   m->mtype->stars == 0);
        out_printf(out,"\n");
+       doc = get_gtk_doc(m->id);
+       if(doc) {
+               out_printf(out, "%s", doc);
+               g_free(doc);
+       }
        switch(m->method) {
        case REGULAR_METHOD:
                if(m->line_no>0)
                        out_addline_infile(out,m->line_no);
                if(m->scope == PRIVATE_SCOPE)
-                       print_method(out,"static ","\n"," ","\n",m,FALSE);
+                       print_method(out,"static ","\n",""," ","\n",
+                                    m,FALSE,FALSE);
                else /* PUBLIC, PROTECTED */
-                       print_method(out,"","\n"," ","\n",m,FALSE);
+                       print_method(out, "", "\n", "", " ", "\n",
+                                    m, FALSE, FALSE);
                print_method_body(m,TRUE);
                break;
        case SIGNAL_FIRST_METHOD:
@@ -1155,9 +1238,10 @@ put_method(Method *m)
                if(m->line_no>0)
                        out_addline_infile(out,m->line_no);
                if(m->scope == PRIVATE_SCOPE)
-                       print_method(out,"static ","\n"," ","\n",m,FALSE);
-               else
-                       print_method(out,"","\n"," ","\n",m,FALSE);
+                       print_method(out,"static ","\n",""," ","\n",
+                                    m,FALSE,FALSE);
+               else /* PUBLIC, PROTECTED */
+                       print_method(out,"","\n",""," ","\n",m,FALSE,FALSE);
                out_addline_outfile(out);
                out_printf(out,"{\n");
                s = g_strdup(m->id);
@@ -1188,16 +1272,18 @@ put_method(Method *m)
                        break;
                if(m->line_no>0)
                        out_addline_infile(out,m->line_no);
-               print_method(out,"static ","\n___real_"," ","\n",m,FALSE);
+               print_method(out,"static ","\n___real_",""," ","\n",
+                            m,FALSE,FALSE);
                print_method_body(m,FALSE);
                break;
        case VIRTUAL_METHOD:
                if(m->line_no>0)
                        out_addline_infile(out,m->line_no);
                if(m->scope==PRIVATE_SCOPE)
-                       print_method(out,"static ","\n"," ","\n",m,FALSE);
-               else
-                       print_method(out,"","\n"," ","\n",m,FALSE);
+                       print_method(out,"static ","\n",""," ","\n",
+                                    m,FALSE,FALSE);
+               else /* PUBLIC, PROTECTED */
+                       print_method(out,"","\n",""," ","\n",m,FALSE,FALSE);
                out_addline_outfile(out);
                out_printf(out,"{\n"
                        "\t%sClass *klass;\n",typebase);
@@ -1235,7 +1321,8 @@ put_method(Method *m)
                        break;
                if(m->line_no>0)
                        out_addline_infile(out,m->line_no);
-               print_method(out,"static ","\n___real_"," ","\n",m,FALSE);
+               print_method(out,"static ","\n___real_",""," ","\n",
+                            m,FALSE,FALSE);
                print_method_body(m,FALSE);
                break;
        case OVERRIDE_METHOD:
@@ -1243,7 +1330,8 @@ put_method(Method *m)
                        break;
                if(m->line_no>0)
                        out_addline_infile(out,m->line_no);
-               print_method(out,"static ","\n"," ","\n",m,FALSE);
+               print_method(out,"static ","\n",""," ","\n",
+                            m,FALSE,FALSE);
                s = replace_sep(m->otype,'_');
                g_strup(s);
                args = get_arg_names_for_macro(m);
@@ -1449,7 +1537,10 @@ print_class_block(Class *c)
                   "gpointer c; "
                   "} ___threepointertype;\n");
 
-       out_printf(outh,"\n#define %s\t"
+       out_printf(outh, "\n/*\n"
+                  " * Type checking and casting macros\n"
+                  " */\n");
+       out_printf(outh,"#define %s\t"
                   "(%s_get_type())\n",
                   macrotype,funcbase);
        out_printf(outh,"#define %s(obj)\t"
@@ -1462,20 +1553,15 @@ print_class_block(Class *c)
                   "GTK_CHECK_TYPE((obj), %s_get_type ())\n\n",
                   macrois,funcbase);
 
-       /* argument wrapping macros */
-       if(arguments>0 && !no_gnu) {
-               out_printf(outh,"\n#ifdef __GNUC__\n");
-               put_argument_gnu_wrappers(c);
-               out_printf(outh,"#else /* __GNUC__ */\n");
-               put_argument_nongnu_wrappers(c);
-               out_printf(outh,"#endif /* __GNUC__ */\n\n");
-       } else if(arguments>0 && no_gnu) {
-               put_argument_nongnu_wrappers(c);
+       if(privates>0) {
+               out_printf(outh, "\n/* Private structure type */\n");
+               out_printf(outh,"typedef struct _%sPrivate %sPrivate;\n",
+                          typebase,typebase);
        }
 
-       if(privates>0)
-               out_printf(outh,"\ntypedef struct _%sPrivate %sPrivate;\n",typebase,typebase);
-
+       out_printf(outh, "\n/*\n"
+                  " * Main object structure\n"
+                  " */\n");
        s = replace_sep(c->otype,'_');
        g_strup(s);
        out_printf(outh,"#ifndef __TYPEDEF_%s__\n"
@@ -1530,7 +1616,10 @@ print_class_block(Class *c)
                out_printf(outfp,"};\n");
        }
 
-       out_printf(outh,"\ntypedef struct _%sClass %sClass;\n",
+       out_printf(outh, "\n/*\n"
+                  " * Class definition\n"
+                  " */\n");
+       out_printf(outh,"typedef struct _%sClass %sClass;\n",
                   typebase,typebase);
        out_printf(outh,
                   "struct _%sClass {\n\t%sClass __parent__;\n",
@@ -1542,17 +1631,7 @@ print_class_block(Class *c)
        }
        out_printf(outh,"};\n\n");
 
-       out_printf(outh,"guint\t%s_get_type\t(void);\n",funcbase);
-
        out_printf(out,"/* here are local prototypes */\n");
-       if(!no_gnu) {
-               out_printf(out,"#ifdef __GNUC__\n"
-                          "#define ___NO_UNUSED_WARNING "
-                          "__attribute__ ((__unused__))\n"
-                          "#else /* __GNUC__ */\n"
-                          "#define ___NO_UNUSED_WARNING\n"
-                          "#endif /* __GNUC__ */\n");
-       }
        if(arguments>0) {
                out_printf(out,"static void ___object_set_arg "
                           "(GtkObject *object, GtkArg *arg, "
@@ -1562,6 +1641,11 @@ print_class_block(Class *c)
                           "guint arg_id);\n");
        }
 
+       out_printf(outh, "\n/*\n"
+                  " * Public methods\n"
+                  " */\n");
+
+       out_printf(outh,"guint\t%s_get_type\t(void);\n",funcbase);
        for(l=c->nodes;l;l=g_list_next(l)) {
                Node *n = l->data;
                if(n->type == METHOD_NODE) {
@@ -1571,6 +1655,41 @@ print_class_block(Class *c)
                }
        }
 
+/* this idea is less and less apealing to me */
+#if 0
+       if(!no_signal_connect) {
+               if(signals>0) {
+                       out_printf(outh, "\n/*\n"
+                                  " * Signal connection methods\n"
+                                  " */\n");
+               }
+
+               for(l=c->nodes;l;l=g_list_next(l)) {
+                       Node *n = l->data;
+                       if(n->type == METHOD_NODE)
+                               put_signal_connect((Method *)n);
+               }
+       }
+#endif
+
+
+       /* argument wrapping macros */
+       if(arguments>0 && !no_gnu) {
+               out_printf(outh, "\n/*\n"
+                          " * Argument wrapping macros\n"
+                          " */\n");
+               out_printf(outh,"#ifdef __GNUC__\n");
+               put_argument_gnu_wrappers(c);
+               out_printf(outh,"#else /* __GNUC__ */\n");
+               put_argument_nongnu_wrappers(c);
+               out_printf(outh,"#endif /* __GNUC__ */\n\n");
+       } else if(arguments>0 && no_gnu) {
+               out_printf(outh, "\n/*\n"
+                          " * Argument wrapping macros\n"
+                          " */\n");
+               put_argument_nongnu_wrappers(c);
+       }
+
        if(signals>0) {
                for(l=c->nodes;l;l=g_list_next(l)) {
                        Node *n = l->data;
@@ -1579,9 +1698,6 @@ print_class_block(Class *c)
                }
        }
 
-       if(!no_gnu)
-               out_printf(out,"#undef ___NO_UNUSED_WARNING\n");
-
        add_enums(c);
 
        add_get_type();
index 3adbd25cd414c70b1a3589e1f11fe986edb97482..a8a05b2ee8bf046e41ee4c815804ce0f5b291b86 100644 (file)
@@ -66,6 +66,15 @@ class Gtk:Weird:Button from Gtk:Button {
                object->i=0;
        }
        class_init(klass);
+
+       /**
+        * new:
+        * @j: foo
+        *
+        * budliky budliky
+        *
+        * Returns: new object
+        */
        public GtkWidget * new(int j (check > 0)) {
                GtkWidget *ret;
                ret = GTK_WIDGET (GET_NEW);
@@ -83,17 +92,60 @@ class Gtk:Weird:Button from Gtk:Button {
                               NULL);
                return h;
        }
+       /**
+        * bleh:
+        * @self: foo
+        * @wid: foo
+        * @h: foo
+        *
+        * budliky budliky 2
+        *
+        * Returns: new object
+        **/
        signal last INT (POINTER, INT)
        int bleh(self, Gtk:Widget * wid (check null type),
                        int h (check > 0)) {
                return blah(self,wid,h);
        }
+       /**
+        * gtk_weird_button_bleh2:
+        * @self: foo
+        * @wid: foo
+        * @h: foo
+        *
+        * budliky budliky 3
+        *
+        * Returns: new object */
        signal last INT (POINTER, INT)
        int bleh2(self, Gtk:Widget * wid (check null type),
                        int h (check > 0)) {
                /* testing multiple marshaller support */
                return 0;
        }
+       /* this should not get documented as it's nonstandard */
+       /**
+        * bloh:
+
+        ******/
+
+       /* Here we are testing how the gtk-doc extraction code error handeling
+          it should just ingore these */
+       /**
+         */
+
+       /** */
+       /**
+        *
+        * bubu
+        *********/
+       /**
+        *
+        * bubu
+        **zblunk*******/
+       /**
+        *
+        * bubu
+        *zblunk*******//**//**/
        signal first NONE (NONE)
        void bloh(self);
        virtual void * bah(self, int h (check > 0)) onerror NULL {