- Sym *sym, *left, *right;
- struct sym_id *id;
- Sym_Table *tab;
-
- /*
- * Convert symbol ids into Syms, so we can deal with them more easily:
- */
- for (id = id_list; id; id = id->next) {
- parse_id(id);
- } /* for */
-
- /* first determine size of each table: */
-
- for (sym = symtab.base; sym < symtab.limit; ++sym) {
- for (id = id_list; id; id = id->next) {
- if (match(&id->left.sym, sym)) {
- extend_match(&id->left, sym, &syms[id->which_table], FALSE);
- } /* if */
- if (id->has_right && match(&id->right.sym, sym)) {
- extend_match(&id->right, sym, &right_ids, FALSE);
- } /* if */
- } /* for */
- } /* for */
-
- /* create tables of appropriate size and reset lengths: */
-
- for (tab = syms; tab < &syms[NUM_TABLES]; ++tab) {
- if (tab->len) {
- tab->base = (Sym*) xmalloc(tab->len * sizeof(Sym));
- tab->limit = tab->base + tab->len;
- tab->len = 0;
- } /* if */
- } /* for */
- if (right_ids.len) {
- right_ids.base = (Sym*) xmalloc(right_ids.len * sizeof(Sym));
- right_ids.limit = right_ids.base + right_ids.len;
- right_ids.len = 0;
- } /* if */
-
- /* make a second pass through symtab, creating syms as necessary: */
-
- for (sym = symtab.base; sym < symtab.limit; ++sym) {
- for (id = id_list; id; id = id->next) {
- if (match(&id->left.sym, sym)) {
- extend_match(&id->left, sym, &syms[id->which_table], TRUE);
- } /* if */
- if (id->has_right && match(&id->right.sym, sym)) {
- extend_match(&id->right, sym, &right_ids, TRUE);
- } /* if */
- } /* for */
- } /* for */
-
- /* go through ids creating arcs as needed: */
-
- for (id = id_list; id; id = id->next) {
- if (id->has_right) {
- for (left = id->left.first_match; left; left = left->next) {
- for (right = id->right.first_match; right; right = right->next)
+ Sym *sym, *left, *right;
+ struct sym_id *id;
+ Sym_Table *tab;
+
+ /* Convert symbol ids into Syms, so we can deal with them more easily. */
+ for (id = id_list; id; id = id->next)
+ parse_id (id);
+
+ /* First determine size of each table. */
+ for (sym = symtab.base; sym < symtab.limit; ++sym)
+ {
+ for (id = id_list; id; id = id->next)
+ {
+ if (match (&id->left.sym, sym))
+ extend_match (&id->left, sym, &syms[id->which_table], FALSE);
+
+ if (id->has_right && match (&id->right.sym, sym))
+ extend_match (&id->right, sym, &right_ids, FALSE);
+ }
+ }
+
+ /* Create tables of appropriate size and reset lengths. */
+ for (tab = syms; tab < &syms[NUM_TABLES]; ++tab)
+ {
+ if (tab->len)
+ {
+ tab->base = (Sym *) xmalloc (tab->len * sizeof (Sym));
+ tab->limit = tab->base + tab->len;
+ tab->len = 0;
+ }
+ }
+
+ if (right_ids.len)
+ {
+ right_ids.base = (Sym *) xmalloc (right_ids.len * sizeof (Sym));
+ right_ids.limit = right_ids.base + right_ids.len;
+ right_ids.len = 0;
+ }
+
+ /* Make a second pass through symtab, creating syms as necessary. */
+ for (sym = symtab.base; sym < symtab.limit; ++sym)
+ {
+ for (id = id_list; id; id = id->next)
+ {
+ if (match (&id->left.sym, sym))
+ extend_match (&id->left, sym, &syms[id->which_table], TRUE);
+
+ if (id->has_right && match (&id->right.sym, sym))
+ extend_match (&id->right, sym, &right_ids, TRUE);
+ }
+ }
+
+ /* Go through ids creating arcs as needed. */
+ for (id = id_list; id; id = id->next)
+ {
+ if (id->has_right)
+ {
+ for (left = id->left.first_match; left; left = left->next)
+ {
+ for (right = id->right.first_match; right; right = right->next)