diff -r gob2-2.0.14/src/lexer.l gobnew/src/lexer.l
407a408,420
> interface		{
> 			static int found_classes = 0;
> 			look_for_includes = 2;
> 			BEGIN(CLASS_CODE);
> 
> 			if(++found_classes > 1) {
> 				error_print(GOB_ERROR, line_no,
> 					    "Only one interface per file allowed");
> 			}
> 
> 			return INTERFACE;
> 		}
> 
diff -r gob2-2.0.14/src/main.c gobnew/src/main.c
1068c1068,1089
< 	out_printf(out,
---
>   if (((Class *)class)->isinterface)
>     out_printf(out,
> 		   "GType\n"
> 		   "%s_get_type (void)\n"
> 		   "{\n"
> 		   "\tstatic GType type = 0;\n\n"
> 		   "\tif ___GOB_UNLIKELY(type == 0) {\n"
> 		   "\t\tstatic const GTypeInfo info = {\n"
> 		   "\t\t\tsizeof (%sClass),\n"
> 		   "\t\t\t(GBaseInitFunc) %s_class_init,\n"
> 		   "\t\t\t(GBaseFinalizeFunc) NULL,\n"
> 		   "\t\t\t(GClassInitFunc) NULL,\n"
> 		   "\t\t\t(GClassFinalizeFunc) NULL,\n"
> 		   "\t\t\tNULL /* class_data */,\n"
> 		   "\t\t\t0,\n"
> 		   "\t\t\t0,\n"
> 		   "\t\t\tNULL,\n"
> 		   "\t\t\tNULL\n"
> 		   "\t\t};\n\n",
> 		   funcbase, typebase, funcbase);
>   else
>     out_printf(out,
2400,2401c2421,2427
< 
< 		if(m->cbuf) {
---
>     if (c->isinterface) {
> 			out_printf(out, " {\n");
> 			out_printf(out, " %s_GET_CLASS (self)->%s (self);",
>                        macrobase, m->id);
> 			out_printf(out, " }\n");
>     }
> 		if(!c->isinterface && m->cbuf) {
diff -r gob2-2.0.14/src/parse.y gobnew/src/parse.y
47a48
> static gboolean isinterface = FALSE;
676c677
< %token CLASS FROM
---
> %token CLASS INTERFACE FROM
689,692c690,697
< prog:		ccodes class ccodes	{ ; }
< 	|	class ccodes		{ ; }
< 	|	ccodes class		{ ; }
< 	|	class			{ ; }
---
> prog:		ccodes iclass ccodes	{ ; }
> 	|	iclass ccodes		{ ; }
> 	|	ccodes iclass		{ ; }
> 	|	iclass			{ ; }
> 	;
> 
> iclass:	class	{ ; }
> 	|	interface		{ ; }
760a766,779
> interface:		interfacedec '{' interfacecode '}'	{
> 			((Class *)class)->nodes = class_nodes;
>         isinterface = TRUE;
>         ((Class *)class)->isinterface = TRUE;
> 			class_nodes = NULL;
> 			nodes = g_list_append(nodes,class);
> 						}
> 	|	interfacedec '{' '}'		{
> 			((Class *)class)->nodes = NULL;
> 			class_nodes = NULL;
> 			nodes = g_list_append(nodes,class);
> 						}
> 	;
> 
772a792,890
> interfacedec:	INTERFACE TYPETOKEN FROM TYPETOKEN interfaceflags	{
> 			class = node_new (CLASS_NODE,
> 					  "otype:steal", $<id>2,
> 					  "ptype:steal", $<id>4,
> 					  "bonobo_object_class:steal", bonobo_object_class,
> 					  "glade_xml", glade_xml,
> 					  "interfaces:steal", interfaces,
> 					  "chunk_size:steal", chunk_size,
> 					  "abstract", abstract,
>             "isinterface", isinterface,
> 					  NULL);
> 			bonobo_object_class = NULL;
> 			glade_xml = FALSE;
> 			chunk_size = NULL;
> 			interfaces = NULL;
>       isinterface = FALSE;
> 						}
> 	;
> 
> interfaceflags:
> 	| '(' TOKEN ')' interfaceflags {
> 			if(strcmp($<id>2,"abstract") == 0) {
> 				abstract = TRUE;
> 			} else {
> 				yyerror(_("parse error"));
> 				YYERROR;
> 			}
> 		}
> 	| '(' TOKEN TOKEN ')' interfaceflags {
> 			if(strcmp($<id>2,"chunks") == 0) {
> 				g_free (chunk_size);
> 				chunk_size = g_strdup($<id>3);
> 			} else if(strcmp($<id>2,"BonoboObject") == 0) {
> 				g_free (bonobo_object_class);
> 				bonobo_object_class = g_strdup($<id>3);
> 			} else {
> 				yyerror(_("parse error"));
> 				YYERROR;
> 			}
> 		}
> 	| '(' TOKEN TYPETOKEN ')' interfaceflags {
> 			if (strcmp ($<id>2, "interface") == 0) {
> 				interfaces = g_list_append (interfaces,
> 							    g_strdup ($<id>3));
> 			} else {
> 				yyerror(_("parse error"));
> 				YYERROR;
> 			}
> 		}
> 	| '(' TOKEN NUMBER ')' interfaceflags {
> 			if(strcmp($<id>2,"chunks") == 0) {
> 				g_free (chunk_size);
> 				if(atoi($<id>3) != 0)
> 					chunk_size = g_strdup($<id>3);
> 				else
> 					chunk_size = NULL;
> 			} else {
> 				yyerror(_("parse error"));
> 				YYERROR;
> 			}
> 		}
> 	| '(' TOKEN STRING STRING ')' interfaceflags {
> 			if (strcmp ($<id>2, "GladeXML") == 0) {
> 				glade_xml = TRUE;
> 				add_construct_glade($<id>3, $<id>4, NULL);
> 			} else {
> 				yyerror(_("parse error"));
> 				YYERROR;
> 			}
> 		}
> 	| '(' TOKEN STRING STRING STRING ')' interfaceflags {
> 			if (strcmp ($<id>2, "GladeXML") == 0) {
> 				glade_xml = TRUE;
> 				add_construct_glade($<id>3, $<id>4, $<id>5);
> 			} else {
> 				yyerror(_("parse error"));
> 				YYERROR;
> 			}
> 		}
> 	| '(' TOKEN TOKEN STRING ')' interfaceflags {
> 			if (strcmp ($<id>2, "GladeXML") == 0) {
> 				glade_xml = TRUE;
> 				add_construct_glade($<id>3, $<id>4, NULL);
> 			} else {
> 				yyerror(_("parse error"));
> 				YYERROR;
> 			}
> 		}
> 	| '(' TOKEN TOKEN STRING STRING ')' interfaceflags {
> 			if (strcmp ($<id>2, "GladeXML") == 0) {
> 				glade_xml = TRUE;
> 				add_construct_glade($<id>3, $<id>4, $<id>5);
> 			} else {
> 				yyerror(_("parse error"));
> 				YYERROR;
> 			}
> 		}
> 	;	
> 
873a992,1020
> interfacecode:	interfacecode interfacething			{ ; }
> 	|	interfacething		{ ; }
> 	;
> 
> interfacething: 		method				{ ; }
> 	|	TOKEN method			{
> 			if (strcmp ($<id>1, "BonoboObject") != 0) {
> 				g_free ($<id>1);
> 				yyerror (_("parse error"));
> 				YYERROR;
> 			}
> 			g_free ($<id>1);
> 			last_added_method->bonobo_object_func = TRUE;
> 						}
> 	|	TOKEN TYPETOKEN method			{
> 			if (strcmp ($<id>1, "interface") != 0) {
> 				g_free ($<id>1);
> 				g_free ($<id>2);
> 				yyerror (_("parse error"));
> 				YYERROR;
> 			}
> 			g_free ($<id>1);
> 			node_set ((Node *)last_added_method,
> 				  "interface:steal", $<id>2,
> 				  NULL);
> 						}
> 	|	';'				{ ; }
> 	;
> 
diff -r gob2-2.0.14/src/treefuncs.c gobnew/src/treefuncs.c
108a109
> 	QUARK_isinterface,
216a218
> 	g_hash_table_insert (quark_ht, "isinterface", GINT_TO_POINTER (QUARK_isinterface));
365a368
> 	new->isinterface = self->isinterface;
957a961,965
> 		case QUARK_isinterface: {
> 			gboolean isinterface = va_arg (__ap, gboolean);
> 			self->isinterface = isinterface;
> 			break;
> 		}
diff -r gob2-2.0.14/src/treefuncs.def gobnew/src/treefuncs.def
59c59,60
<   BOOL		abstract # if G_TYPE_FLAG_ABSTRACT should be used
---
>   BOOL		abstract    # if G_TYPE_FLAG_ABSTRACT should be used
>   BOOL		isinterface # if it is an interface instead of a class
diff -r gob2-2.0.14/src/treefuncs.h gobnew/src/treefuncs.h
121a122
> 	gboolean isinterface;
