Added header to item collection building
authorThadeu Lima de Souza Cascardo <cascardo@dcc.ufmg.br>
Sun, 23 Oct 2005 23:39:30 +0000 (23:39 +0000)
committerThadeu Lima de Souza Cascardo <cascardo@dcc.ufmg.br>
Sun, 23 Oct 2005 23:39:30 +0000 (23:39 +0000)
LR(1) item collection building has a header which exports the item
structure and the function which build the collection.

git-archimport-id: cascardo@tlscascardo--private/libgrammatic--lr1--0.1--patch-5

item.c
item.h [new file with mode: 0644]

diff --git a/item.c b/item.c
index c4c5373..dea4adb 100644 (file)
--- a/item.c
+++ b/item.c
@@ -1,17 +1,10 @@
 #include <grammar.h>
 #include <first.h>
 #include <grammar.h>
 #include <first.h>
+#include <item.h>
 #ifdef DEBUG
 #include <stdio.h>
 #endif
 
 #ifdef DEBUG
 #include <stdio.h>
 #endif
 
-typedef struct
-{
-  symbol_t* left;
-  rule_t* right;
-  GList* dot;
-  symbol_t* lookahead;
-} item_t;
-
 item_t* item_new (symbol_t* left, rule_t* right, symbol_t* lookahead)
 {
   item_t* item;
 item_t* item_new (symbol_t* left, rule_t* right, symbol_t* lookahead)
 {
   item_t* item;
diff --git a/item.h b/item.h
new file mode 100644 (file)
index 0000000..4924562
--- /dev/null
+++ b/item.h
@@ -0,0 +1,14 @@
+#ifndef ITEM_H
+#define ITEM_H
+
+typedef struct
+{
+  symbol_t* left;
+  rule_t* right;
+  GList* dot;
+  symbol_t* lookahead;
+} item_t;
+
+GHashTable* item_set_collection (Grammar*, GHashTable*, symbol_t*);
+
+#endif