Added GPLv2+ as license for libgrammatic
[cascardo/grammar.git] / rdp.h
diff --git a/rdp.h b/rdp.h
index 1455c52..0daaddc 100644 (file)
--- a/rdp.h
+++ b/rdp.h
@@ -1,41 +1,41 @@
+/*
+ *  Copyright (C) 2005  Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+
+
 #ifndef RDP_H
 #define RDP_H
 
 #include <grammar.h>
 
-#define RDP_TYPE            (rdp_get_type ())
-#define RDP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-                                    RDP_TYPE, Rdp))
-#define RDP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), \
-                                    RDP_TYPE, RdpClass))
-#define IS_RDP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-                                    RDP_TYPE))
-#define IS_RDP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
-                                    RDP_TYPE))
-#define RDP_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
-                                    RDP_TYPE, RdpClass))
-
-
 typedef struct _buffer buffer_t;
 
 typedef struct
 {
-  Grammar parent;
   nextcb cb;
   gpointer data;
   GList* buffer;
   symbol_t* start;
-} Rdp;
-
-typedef struct
-{
-  GrammarClass parent;
-} RdpClass;
-
-GType rdp_get_type ();
+  grammar_t* grammar;
+} rdp_t;
 
-Rdp* rdp_new (nextcb, gpointer, gint);
-void rdp_delete (Rdp*);
-gpointer rdp_build (Rdp*);
+rdp_t* rdp_new (nextcb, gpointer, gint, grammar_t*);
+void rdp_delete (rdp_t*);
+gpointer rdp_build (rdp_t*);
 
 #endif