|
|
@ -158,8 +158,7 @@
|
|
|
|
(prod-index (reduce-prod current-guess))))
|
|
|
|
(prod-index (reduce-prod current-guess))))
|
|
|
|
(loop (car rest) (cdr rest)))
|
|
|
|
(loop (car rest) (cdr rest)))
|
|
|
|
((accept? (car rest))
|
|
|
|
((accept? (car rest))
|
|
|
|
(fprintf (current-error-port)
|
|
|
|
(eprintf "accept/reduce or accept/shift conflicts. Check the grammar for useless cycles of productions\n")
|
|
|
|
"accept/reduce or accept/shift conflicts. Check the grammar for useless cycles of productions\n")
|
|
|
|
|
|
|
|
(loop current-guess (cdr rest)))
|
|
|
|
(loop current-guess (cdr rest)))
|
|
|
|
(else (loop current-guess (cdr rest)))))))))
|
|
|
|
(else (loop current-guess (cdr rest)))))))))
|
|
|
|
|
|
|
|
|
|
|
@ -179,13 +178,11 @@
|
|
|
|
grouped-table)))
|
|
|
|
grouped-table)))
|
|
|
|
(unless suppress
|
|
|
|
(unless suppress
|
|
|
|
(when (> SR-conflicts 0)
|
|
|
|
(when (> SR-conflicts 0)
|
|
|
|
(fprintf (current-error-port)
|
|
|
|
(eprintf "~a shift/reduce conflict~a\n"
|
|
|
|
"~a shift/reduce conflict~a\n"
|
|
|
|
|
|
|
|
SR-conflicts
|
|
|
|
SR-conflicts
|
|
|
|
(if (= SR-conflicts 1) "" "s")))
|
|
|
|
(if (= SR-conflicts 1) "" "s")))
|
|
|
|
(when (> RR-conflicts 0)
|
|
|
|
(when (> RR-conflicts 0)
|
|
|
|
(fprintf (current-error-port)
|
|
|
|
(eprintf "~a reduce/reduce conflict~a\n"
|
|
|
|
"~a reduce/reduce conflict~a\n"
|
|
|
|
|
|
|
|
RR-conflicts
|
|
|
|
RR-conflicts
|
|
|
|
(if (= RR-conflicts 1) "" "s"))))
|
|
|
|
(if (= RR-conflicts 1) "" "s"))))
|
|
|
|
table))
|
|
|
|
table))
|
|
|
@ -281,8 +278,7 @@
|
|
|
|
(unless (string=? file "")
|
|
|
|
(unless (string=? file "")
|
|
|
|
(with-handlers [(exn:fail:filesystem?
|
|
|
|
(with-handlers [(exn:fail:filesystem?
|
|
|
|
(lambda (e)
|
|
|
|
(lambda (e)
|
|
|
|
(fprintf
|
|
|
|
(eprintf
|
|
|
|
(current-error-port)
|
|
|
|
|
|
|
|
"Cannot write debug output to file \"~a\": ~a\n"
|
|
|
|
"Cannot write debug output to file \"~a\": ~a\n"
|
|
|
|
file
|
|
|
|
file
|
|
|
|
(exn-message e))))]
|
|
|
|
(exn-message e))))]
|
|
|
|