Fixed some conversion issues
authorThadeu Lima de Souza Cascardo <cascardo@dcc.ufmg.br>
Wed, 26 Oct 2005 12:20:31 +0000 (12:20 +0000)
committerThadeu Lima de Souza Cascardo <cascardo@dcc.ufmg.br>
Wed, 26 Oct 2005 12:20:31 +0000 (12:20 +0000)
Some modifications were not properly done. Besides some mistyping, some
variable names were not properly changed.

git-archimport-id: cascardo@tlscascardo--private/libgrammatic--nogobject--0.1--patch-4

bnf.c
grammar.c
grammar.h

diff --git a/bnf.c b/bnf.c
index 20e73ca..44cc72e 100644 (file)
--- a/bnf.c
+++ b/bnf.c
@@ -282,7 +282,7 @@ grammar_t* grammar_load (char* filename)
 
   close (fd);
   scanner_delete (scanner);
-  rdp_delete (rdp);
+  rdp_delete (parser);
   grammar_delete (grammar);
 
   if (tree == NULL)
@@ -292,7 +292,7 @@ grammar_t* grammar_load (char* filename)
   else
     {
       grammar_t* gr;
-      gr = g_object_new (GRAMMAR_TYPE, NULL);
+      gr = grammar_new ();
       grammar_tree (gr, tree);
       return gr;
     }
index ef21141..5f41708 100644 (file)
--- a/grammar.c
+++ b/grammar.c
@@ -159,9 +159,9 @@ grammar_t* grammar_new ()
 {
   grammar_t* grammar;
   grammar = g_malloc (sizeof (grammar_t*));
-  self->grammar = g_hash_table_new_full (symbol_hash, symbol_equal,
-                                        g_free,
-                                        (GDestroyNotify) rules_delete);
+  grammar->grammar = g_hash_table_new_full (symbol_hash, symbol_equal,
+                                           g_free,
+                                           (GDestroyNotify) rules_delete);
   return grammar;
 }
 
index 4d13b9e..698f84c 100644 (file)
--- a/grammar.h
+++ b/grammar.h
@@ -34,7 +34,7 @@ void rule_delete (rule_t*);
 
 grammar_t* grammar_new ();
 rule_t* grammar_rule_new (grammar_t*, symbol_t*);
-GList* grammar_get_rules (grammar_*, symbol_t*);
+GList* grammar_get_rules (grammar_t*, symbol_t*);
 GList* grammar_get_rule (rule_t*);
 void grammar_delete (grammar_t*);