[m-rev.] diff: fix bugs with aditi_owner pragma

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Aug 1 02:25:45 AEST 2001


Estimated hours taken: 1
Branches: main, release

compiler/mercury_to_mercury.m:
	Fix a bug where the owner field for a `pragma owner' declaration was
	being output as a string, but the parser was expecting an atom.

	Fix a bug where the output of `pragma owner' and `pragma fact_table'
	declarations was syntactically incorrect when the named predicate or
	function occurred in a nested module.

Workspace: /home/mars/fjh/ws1/mercury
Index: compiler/mercury_to_mercury.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_to_mercury.m,v
retrieving revision 1.189
diff -u -d -r1.189 mercury_to_mercury.m
--- compiler/mercury_to_mercury.m	2001/07/20 14:13:51	1.189
+++ compiler/mercury_to_mercury.m	2001/07/31 16:16:44
@@ -2535,7 +2535,7 @@
 
 mercury_output_pragma_fact_table(Pred, Arity, FileName) -->
 	io__write_string(":- pragma fact_table("),
-	mercury_output_sym_name(Pred),
+	mercury_output_bracketed_sym_name(Pred, next_to_graphic_token),
 	io__write_string("/"),
 	io__write_int(Arity),
 	io__write_string(", "),
@@ -2550,11 +2550,11 @@
 
 mercury_output_pragma_owner(Pred, Arity, Owner) -->
 	io__write_string(":- pragma owner("),
-	mercury_output_sym_name(Pred),
+	mercury_output_bracketed_sym_name(Pred, next_to_graphic_token),
 	io__write_string("/"),
 	io__write_int(Arity),
 	io__write_string(", "),
-	term_io__quote_string(Owner),
+	term_io__quote_atom(Owner),
 	io__write_string(").\n").
 
 :- pred mercury_output_pragma_index(sym_name, arity, index_spec,

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list