public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a33d4cd
)
The former version gave a fatal error message at the first undefined
author
ceriel
<none@none>
Thu, 11 Oct 1984 10:35:01 +0000
(10:35 +0000)
committer
ceriel
<none@none>
Thu, 11 Oct 1984 10:35:01 +0000
(10:35 +0000)
nonterminal. The new version checks all nonterminals
util/LLgen/src/reach.c
patch
|
blob
|
history
diff --git
a/util/LLgen/src/reach.c
b/util/LLgen/src/reach.c
index
72f8088
..
233cc33
100644
(file)
--- a/
util/LLgen/src/reach.c
+++ b/
util/LLgen/src/reach.c
@@
-58,7
+58,7
@@
co_reach() {
for (p = nonterms; p < maxnt; p++) {
if (! p->n_rule) {
f_input = p->n_string;
-
fatal
(p->n_lineno,"nonterminal %s not defined",
+
error
(p->n_lineno,"nonterminal %s not defined",
(min_nt_ent + (p - nonterms))->h_name);
}
}
@@
-93,7
+93,7
@@
reachable(p) register p_nont p; {
/*
* Now walk its grammar rule
*/
- reachwalk(p->n_rule);
+
if (p->n_rule)
reachwalk(p->n_rule);
}
}