(j3.2006) (j3.2005) Re: Macro with variable number of arguments

Aleksandar Donev donev1
Mon Nov 27 18:54:50 EST 2006

On Monday 27 November 2006 11:11, Michael Ingrassia wrote:

> is just a token sequence being saved up for later expansion of
> assign_shortcut, and that it is not an end-macro statement for macro
> assign_shortcut (with the wrong name attached) ?
The syntax does not require a name to be specified in the END MACRO statement 
(R336 end-macro-stmt is END MACRO [ macro-name ]), so the example can be 
(taking away the excess complications):

> DEFINE MACRO :: assign_shortcut(rank)
>    DEFINE MACRO assign_%%rank(array)

It seems to me that we should not let a macro-body-stmt be "END MACRO"? It can 
of course be other END statements, but allowing it to be END MACRO does seem 
to make the above example ambiguous in the grammar. We passed a paper of an 
example of a macro defining a macro, so the example should somehow be made 


P.S. Is everyone getting duplicate messages from the J3 list?
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ LLNL
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev

More information about the J3 mailing list