projects
/
cascardo
/
grammar.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed code in first
[cascardo/grammar.git]
/
first.c
diff --git
a/first.c
b/first.c
index
034e15a
..
e79d98d
100644
(file)
--- 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))
{
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;
}
return l;