look up neighbor set index properly (was left uninitialized)
This commit is contained in:
parent
67e5b2fee0
commit
732545274a
1 changed files with 2 additions and 0 deletions
|
|
@ -250,6 +250,8 @@ HLRDFA *h_lalr_dfa(HCFGrammar *g)
|
||||||
h_hashtable_put(states, neighbor, (void *)(uintptr_t)neighbor_idx);
|
h_hashtable_put(states, neighbor, (void *)(uintptr_t)neighbor_idx);
|
||||||
h_slist_push(work, neighbor);
|
h_slist_push(work, neighbor);
|
||||||
h_slist_push(work, (void *)(uintptr_t)neighbor_idx);
|
h_slist_push(work, (void *)(uintptr_t)neighbor_idx);
|
||||||
|
} else {
|
||||||
|
neighbor_idx = (uintptr_t)h_hashtable_get(states, neighbor);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add transition "state --symbol--> neighbor"
|
// add transition "state --symbol--> neighbor"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue