Files
mercury/tests/hard_coded/xmlable_test.exp
Zoltan Somogyi d692bb674f Move the rest of mode_errors.m to use error_util.
Estimated hours taken: 8
Branches: main

Move the rest of mode_errors.m to use error_util.

compiler/mode_errors.m:
	The parts of this module that generate error messages (as opposed to
	progress messages) now all return a description of the error to a
	central place for printing by error_util.m. This should make it
	significantly easier to add new error messages.

compiler/error_util.m:
	Add the new capability to support mode_errors.m: that of describing
	in one data structure a sequence of calls to write_error_pieces.

compiler/hlds_out.m:
	Given a bunch of existing predicates that print various things,
	provide versions that convert those things to strings, for use
	in mode_errors.m.

	Write_unify_context had two versions for printing and only one version
	for conversion to pieces; add the second version for conversion to
	pieces. Change the order of arguments of the five-argument version
	of write_unify_context to allow the use of state variables.

compiler/mercury_to_mercury.m:
compiler/prog_out.m:
	Given a bunch of existing predicates that print various things,
	provide versions that convert those things to strings, for use
	in hlds_out.m and mode_errors.m.

compiler/det_report.m:
	Conform to the changed argument order of write_unify_context.

library/term_io.m:
	Fix an old bug: the code of add_escaped_char wasn't actually doing
	any escaping. hlds_out.m now relies on it doing so.

tests/hard_coded/xmlable_test.m:
	Due to the bugfix in term_io.m, string__string now protects &s with
	backslashes; expect this.

tests/invalid/*.err_exp:
	Expect mode error messages in the new, better format.
2005-08-22 03:55:23 +00:00

109 lines
2.3 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Testing &lt;123&gt;</title>
</head>
<!-- Hi - Mom! -->
<body><table border="1" cellspacing="0" cellpadding="5">
<tr>
<td>1</td>
<td>&quot;one&quot;</td>
</tr>
<tr>
<td>2</td>
<td>&quot;two&quot;</td>
</tr>
<tr>
<td>3</td>
<td>&quot;three&quot;</td>
</tr>
<tr>
<td>4</td>
<td>&quot;four&quot;</td>
</tr>
<tr>
<td>5</td>
<td>&quot;five&quot;</td>
</tr>
<tr>
<td>6</td>
<td>&quot;six &amp;&lt;&gt;!@$%^`&amp;*()-+=\&apos;&quot;</td>
</tr>
</table><hr />&nbsp;<!-- inline comment --><script type="text/javascript">
<![CDATA[document.write('hello');]]>
</script></body>
</html>
<?xml version="1.0"?>
<html>
<head>
<title>Testing &lt;123&gt;</title>
</head>
<!-- Hi - Mom! -->
<body><table border="1" cellspacing="0" cellpadding="5">
<tr>
<td>1</td>
<td>&quot;one&quot;</td>
</tr>
<tr>
<td>2</td>
<td>&quot;two&quot;</td>
</tr>
<tr>
<td>3</td>
<td>&quot;three&quot;</td>
</tr>
<tr>
<td>4</td>
<td>&quot;four&quot;</td>
</tr>
<tr>
<td>5</td>
<td>&quot;five&quot;</td>
</tr>
<tr>
<td>6</td>
<td>&quot;six &amp;&lt;&gt;!@$%^`&amp;*()-+=\&apos;&quot;</td>
</tr>
</table><hr />&nbsp;<!-- inline comment --><script type="text/javascript">
<![CDATA[document.write('hello');]]>
</script></body>
</html>
<html>
<head>
<title>Testing &lt;123&gt;</title>
</head>
<!-- Hi - Mom! -->
<body><table border="1" cellspacing="0" cellpadding="5">
<tr>
<td>1</td>
<td>&quot;one&quot;</td>
</tr>
<tr>
<td>2</td>
<td>&quot;two&quot;</td>
</tr>
<tr>
<td>3</td>
<td>&quot;three&quot;</td>
</tr>
<tr>
<td>4</td>
<td>&quot;four&quot;</td>
</tr>
<tr>
<td>5</td>
<td>&quot;five&quot;</td>
</tr>
<tr>
<td>6</td>
<td>&quot;six &amp;&lt;&gt;!@$%^`&amp;*()-+=\&apos;&quot;</td>
</tr>
</table><hr />&nbsp;<!-- inline comment --><script type="text/javascript">
<![CDATA[document.write('hello');]]>
</script></body>
</html>