{
symbol_t* next_symbol;
next_symbol = next_symbols->data;
- /* TODO: Check this assertion is correct. */
- assert (next_symbol->terminal == FALSE);
+ /*
+ * This rule starts with a terminal. Ignore it.
+ * We could add it as an optimization. TODO
+ */
+ if (next_symbol->terminal)
+ {
+ rule_delete (next_rule);
+ }
/* This is an indirect recursive rule. */
- if (next_symbol->value == symbol->value)
+ else if (next_symbol->value == symbol->value)
{
first_set->recursive =
g_list_prepend (first_set->recursive,