From e251a60592ec3f646039ddc2812982ea6601521f Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Thu, 29 Sep 2005 03:05:45 +0000 Subject: [PATCH] Fixed code in first Code to get first list was incorrect. git-archimport-id: cascardo@tlscascardo--private/libgrammatic--dev--0.1--patch-10 --- first.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/first.c b/first.c index 034e15a..e79d98d 100644 --- a/first.c +++ b/first.c @@ -490,7 +490,9 @@ GList* first_get (GHashTable* first, symbol_t* symbol) if (g_hash_table_lookup_extended (first, symbol, NULL, (gpointer*) &first_set)) { - g_hash_table_foreach (first->terminals, put_key_on_list, &l); + if (first_set->has_empty) + l = g_list_prepend (l, symbol_new (TRUE, 0)); + g_hash_table_foreach (first_set->terminals, put_key_on_list, &l); } return l; -- 2.20.1