diff src/urweb.grm @ 1563:a0caa991cdad

Resugar tag names before printing parse errors
author Adam Chlipala <adam@chlipala.net>
date Thu, 22 Sep 2011 09:51:06 -0400
parents 6f046b4bad24
children 5530a8075b62
line wrap: on
line diff
--- a/src/urweb.grm	Sat Sep 17 13:10:20 2011 -0400
+++ b/src/urweb.grm	Thu Sep 22 09:51:06 2011 -0400
@@ -1397,6 +1397,11 @@
                                          end)
          
        | tag GT xmlOpt END_TAG          (let
+                                             fun tagOut s =
+                                                 case s of
+                                                     "tabl" => "table"
+                                                   | _ => s
+
                                              val pos = s (tagleft, GTright)
                                              val et = tagIn END_TAG
                                          in
@@ -1423,9 +1428,9 @@
                                                       ()
                                                   else
                                                       ErrorMsg.errorAt pos ("Begin tag <"
-                                                                            ^ #1 (#1 tag)
+                                                                            ^ tagOut (#1 (#1 tag))
                                                                             ^ "> and end tag </"
-                                                                            ^ et
+                                                                            ^ tagOut et
                                                                             ^ "> don't match.");
                                                   (EWild, pos))
                                          end)