From 545855e4bacf3f95404799c3b19971af12b95bee Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Sun, 23 Oct 2005 23:39:30 +0000 Subject: [PATCH] Added header to item collection building 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 | 9 +-------- item.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 item.h diff --git a/item.c b/item.c index c4c5373..dea4adb 100644 --- a/item.c +++ b/item.c @@ -1,17 +1,10 @@ #include #include +#include #ifdef DEBUG #include #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; diff --git a/item.h b/item.h new file mode 100644 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 -- 2.20.1