projects
/
cascardo
/
grammar.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5686303
)
Fixed code in first
author
Thadeu Lima de Souza Cascardo
<cascardo@dcc.ufmg.br>
Thu, 29 Sep 2005 03:05:45 +0000
(
03:05
+0000)
committer
Thadeu Lima de Souza Cascardo
<cascardo@dcc.ufmg.br>
Thu, 29 Sep 2005 03:05:45 +0000
(
03:05
+0000)
Code to get first list was incorrect.
git-archimport-id: cascardo@tlscascardo--private/libgrammatic--dev--0.1--patch-10
first.c
patch
|
blob
|
history
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;