X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fgrammar.git;a=blobdiff_plain;f=rdp.h;h=0daaddcb7e12370fc4cc8c722ca10e15eb7ddb8e;hp=1455c52fa46d06805fe2dd2e6fa57f68b773b664;hb=HEAD;hpb=ff6be7b36955b064ae18868ee2d8e0c46b23ddb8 diff --git a/rdp.h b/rdp.h index 1455c52..0daaddc 100644 --- a/rdp.h +++ b/rdp.h @@ -1,41 +1,41 @@ +/* + * Copyright (C) 2005 Thadeu Lima de Souza Cascardo + * + * 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 -#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