diff --git a/src/backends/lalr.c b/src/backends/lalr.c index 15236f5..7a07c3d 100644 --- a/src/backends/lalr.c +++ b/src/backends/lalr.c @@ -250,6 +250,8 @@ HLRDFA *h_lalr_dfa(HCFGrammar *g) h_hashtable_put(states, neighbor, (void *)(uintptr_t)neighbor_idx); h_slist_push(work, neighbor); h_slist_push(work, (void *)(uintptr_t)neighbor_idx); + } else { + neighbor_idx = (uintptr_t)h_hashtable_get(states, neighbor); } // add transition "state --symbol--> neighbor"