X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fgrammar.git;a=blobdiff_plain;f=first.c;h=e79d98de30a8f6bf847d7dc2bc31ff2e1fd2022f;hp=034e15a4d8f196a66e22e0c07f2325fa34748933;hb=e251a60592ec3f646039ddc2812982ea6601521f;hpb=5686303d31f20b8b9b8ecadc18042e63178b4251 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;