From 1e01d982c00312f734fe38c9c7e807404988252d Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 14 Mar 2009 15:39:47 +0000 Subject: [PATCH] fixed plural in error message svn: r14099 original commit: fe141d30ba27d7732f8557e682a1e89f56d440a3 --- collects/parser-tools/private-yacc/table.ss | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/collects/parser-tools/private-yacc/table.ss b/collects/parser-tools/private-yacc/table.ss index 9493b65..9f9e9e2 100644 --- a/collects/parser-tools/private-yacc/table.ss +++ b/collects/parser-tools/private-yacc/table.ss @@ -129,9 +129,13 @@ (newline port))) (when (> SR-conflicts 0) - (fprintf port "~a shift/reduce conflicts~n" SR-conflicts)) + (fprintf port "~a shift/reduce conflict~a~n" + SR-conflicts + (if (= SR-conflicts 1) "" "s"))) (when (> RR-conflicts 0) - (fprintf port "~a reduce/reduce conflicts~n" RR-conflicts)))) + (fprintf port "~a reduce/reduce conflict~a~n" + RR-conflicts + (if (= RR-conflicts 1) "" "s"))))) ;; resolve-conflict : (listof action?) -> action? bool bool (define (resolve-conflict actions) @@ -176,12 +180,14 @@ (unless suppress (when (> SR-conflicts 0) (fprintf (current-error-port) - "~a shift/reduce conflicts~n" - SR-conflicts)) + "~a shift/reduce conflict~a~n" + SR-conflicts + (if (= SR-conflicts 1) "" "s"))) (when (> RR-conflicts 0) (fprintf (current-error-port) - "~a reduce/reduce conflicts~n" - RR-conflicts))) + "~a reduce/reduce conflict~a~n" + RR-conflicts + (if (= RR-conflicts 1) "" "s")))) table))