Added some tests and changed ordering mechanism

This commit is contained in:
ceriel
1991-11-01 10:37:26 +00:00
parent fcb5d029e2
commit 1aeb208b12
11 changed files with 78 additions and 51 deletions

View File

@@ -55,7 +55,7 @@ conflchecks() {
* must be disjunct.
*/
register p_nont p;
register p_order s;
register int s;
p_file x = files;
f_input = x->f_name;
@@ -71,15 +71,15 @@ conflchecks() {
*/
for (; x < maxfiles; x++) {
f_input = x->f_name;
for (s = x->f_list; s; s = s->o_next) {
p = &nonterms[s->o_index];
for (s = x->f_nonterminals; s != -1; s = p->n_next) {
p = &nonterms[s];
if (check(p->n_rule)) p->n_flags |= VERBOSE;
}
}
for (x = files; x < maxfiles; x++) {
f_input = x->f_name;
for (s = x->f_list; s; s = s->o_next) {
p = &nonterms[s->o_index];
for (s = x->f_nonterminals; s != -1; s = p->n_next) {
p = &nonterms[s];
if (p->n_flags & RECURSIVE) {
error(p->n_lineno,
"Recursion in default for nonterminal %s",