[m-dev.] Infix syntax proposal

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Aug 15 00:01:38 AEST 2002


On 14-Aug-2002, Michael Day <mikeday at yeslogic.com> wrote:
> 
> > I propose the following amendment to the infix syntax -- add a declaration 
> > to the language of the form:
> > 
> > :- infix foo, bar, baz.
> 
> While people may discuss the proposed syntax addition, this part seems
> more important:
> 
> > I propose that this infix transformer, if accepted, become part of the 
> > (m)make process, so that the first source transformation resolves infix 
> > calls and is transparent to users of mmake/mmc.
> 
> Such a process should be extensible to invoke moose on parser modules and
> any other macro expansion style transformers, as per the discussion on
> this list some several months ago.
> 
> This would scratch an itch that many developers are obviously feeling, and
> make the syntax trivially amenable to alteration and extension without
> hacking the compiler, which would be a Good Thing.

Well, with Mmake it's already very easy to add arbitrary preprocessors.
All that is required is a couple of lines in your Mmakefile per preprocessor.
See samples/expand_term.m for details.

-- 
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-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list