diff --git a/collects/parser-tools/private-yacc/table.rkt b/collects/parser-tools/private-yacc/table.rkt index f3df041..7eef2e2 100644 --- a/collects/parser-tools/private-yacc/table.rkt +++ b/collects/parser-tools/private-yacc/table.rkt @@ -158,8 +158,7 @@ (prod-index (reduce-prod current-guess)))) (loop (car rest) (cdr rest))) ((accept? (car rest)) - (fprintf (current-error-port) - "accept/reduce or accept/shift conflicts. Check the grammar for useless cycles of productions\n") + (eprintf "accept/reduce or accept/shift conflicts. Check the grammar for useless cycles of productions\n") (loop current-guess (cdr rest))) (else (loop current-guess (cdr rest))))))))) @@ -179,13 +178,11 @@ grouped-table))) (unless suppress (when (> SR-conflicts 0) - (fprintf (current-error-port) - "~a shift/reduce conflict~a\n" + (eprintf "~a shift/reduce conflict~a\n" SR-conflicts (if (= SR-conflicts 1) "" "s"))) (when (> RR-conflicts 0) - (fprintf (current-error-port) - "~a reduce/reduce conflict~a\n" + (eprintf "~a reduce/reduce conflict~a\n" RR-conflicts (if (= RR-conflicts 1) "" "s")))) table)) @@ -281,8 +278,7 @@ (unless (string=? file "") (with-handlers [(exn:fail:filesystem? (lambda (e) - (fprintf - (current-error-port) + (eprintf "Cannot write debug output to file \"~a\": ~a\n" file (exn-message e))))] diff --git a/collects/parser-tools/yacc.rkt b/collects/parser-tools/yacc.rkt index 9a3cc3c..5e2af6a 100644 --- a/collects/parser-tools/yacc.rkt +++ b/collects/parser-tools/yacc.rkt @@ -172,8 +172,7 @@ (when (and yacc-output (not (string=? yacc-output ""))) (with-handlers [(exn:fail:filesystem? (lambda (e) - (fprintf - (current-error-port) + (eprintf "Cannot write yacc-output to file \"~a\"\n" yacc-output)))] (call-with-output-file yacc-output