[Developers] Re: [Cactusbase-cvs] DEVELOPMENT CVS "CactusBase/SymBase interface.ccl"

Steve White swhite at aei.mpg.de
Thu Aug 19 04:15:34 CDT 2004


It's a bit more complicated, but only a bit.  It's cause for recursion.

------------------------------------------------------------------------
Steve White : Programmer
Max-Planck-Institut für Gravitationsphysik      Albert-Einstein-Institut
Am Mühlenberg 1, D-14476 Golm, Germany                  +49-331-567-7329

On Thu, 19 Aug 2004, Ian Hawke wrote:

> On Thu, 19 Aug 2004, Steve White wrote:
> 
> > The continuation lines wouldn't be necessary if the parser knew that
> > it was looking for a closing parenthesis.  This is the way Python
> > handles argument lists that span multiple lines, sparing the writer
> > the semantically unnecessary line continuation characters.
> > 
> > Here is an outline of an algorithm
> > 	* recognises it's in arg list parsing mode
> > 	* reads in line-by-line, removing comments and line continuations
> > 		* until it finds a closing parenthesis, at which point, it
> > 		* concatenates all the arguments.
> > 	* goes back into normal parsing mode
> 
> Unfortunately it's a bit more complicated as an aliased function
> containing function pointer arguments will have its arguments enclosed in
> braces. E.g.,
> 
> CCTK_INT FUNCTION \
>   Hyperslab_GlobalMappingByIndex (CCTK_POINTER_TO_CONST IN cctkGH, \
>                                   CCTK_INT IN vindex, \
>                                   CCTK_INT IN hdim, \
>                                   CCTK_INT ARRAY IN direction, \
>                                   CCTK_INT ARRAY IN origin, \
>                                   CCTK_INT ARRAY IN extent, \
>                                   CCTK_INT ARRAY IN downsample, \
>                                   CCTK_INT IN table_handle, \
>                                   CCTK_INT CCTK_FPOINTER IN \
>                                     conversion_fn (CCTK_INT IN nelems, \
>                                                    CCTK_INT IN src_stride,
> \
>                                                    CCTK_INT IN dst_stride,
> \
>                                                    CCTK_INT IN src_type, \
>                                                    CCTK_INT IN dst_type, \
>                                                    CCTK_POINTER_TO_CONST
> IN from, \
>                                                    CCTK_POINTER IN to), \
>                                   CCTK_INT ARRAY OUT hsize)
> 
> from CactusBase/IOASCII (and others).
> 
> Of course, this just means keeping track of the braces...
> 
> Ian
> 
> _______________________________________________
> Developers mailing list
> Developers at cactuscode.org
> http://www.cactuscode.org/mailman/listinfo/developers
> 
> 





More information about the Developers mailing list