[m-dev.] generating .int files

Fergus Henderson fjh at cs.mu.oz.au
Fri Sep 5 20:42:02 AEST 1997


Peter Schachte, you wrote:
> The mercury compiler seems to put parentheses around practically everything
> in the .int files it generates, except, of course, for the symbol I need it
> to bracket.  I've just added an operator in my branch, and I also made that
> operator a (niladic) constructor in a type.  For some reason, though, it
> doesn't surround that symbol with parentheses when it generates the .int
> file.
> 
> Anyone have any idea why not?  Any idea what code to fix?

library/ops.m
library/nc_builtin.nl
library/sp_builtin.nl
compiler/mercury_to_mercury.m	<--- this is the one you probably missed.

The unfortunate reason why it is in several places is this:
	- NU-Prolog, Mercury, and SICStus all defined different sets of
	  operators
	- when writing out the `int' file, we need to quote anything
	  that _any_ of the above three consider an operator.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list