From: Thadeu Lima de Souza Cascardo Date: Sun, 23 Oct 2005 23:39:30 +0000 (+0000) Subject: Added header to item collection building X-Git-Tag: cascardo@tlscascardo--private,libgrammatic--regular--0.1--base-0~5^2~1 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fgrammar.git;a=commitdiff_plain;h=545855e4bacf3f95404799c3b19971af12b95bee 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 --- 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