2 * Copyright (C) 2005 Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 typedef gint (*nextcb) (gpointer, gpointer*);
34 typedef struct _rule rule_t;
40 symbol_t* symbol_new (gboolean, GQuark);
41 symbol_t* symbol_copy (symbol_t*);
42 guint symbol_hash (gconstpointer);
43 gboolean symbol_equal (gconstpointer, gconstpointer);
44 gint symbol_cmp (symbol_t*, symbol_t*);
47 rule_t* rule_copy (rule_t*);
48 gint rule_cmp (rule_t*, rule_t*);
49 gboolean rule_equal (gconstpointer, gconstpointer);
50 guint rule_hash (gconstpointer);
51 symbol_t* rule_pop (rule_t*);
52 void rule_append (rule_t*, symbol_t*);
53 void rule_delete (rule_t*);
55 grammar_t* grammar_new ();
56 rule_t* grammar_rule_new (grammar_t*, symbol_t*);
57 GList* grammar_get_rules (grammar_t*, symbol_t*);
58 GList* grammar_get_rule (rule_t*);
59 void grammar_delete (grammar_t*);