[Developers] quoting in ccl-file strings

Erik Schnetter schnetter at aei.mpg.de
Fri Jun 3 10:22:11 CDT 2005


On Friday 03 June 2005 17:13, Jonathan Thornburg wrote:
> In a recent message to this list, I proposed the rules
>
> > * A string is delimited by either single-quotes ('...')
> >  or double-quotes ("...").
> > * Within a string delimited by single-quotes, double-quotes may be
> >  used with no need for special quoting
> > * Within a string delimited by double-quotes, single-quotes may be
> >  used with no need for special quoting
> > * Backslash quotes the next character, i.e.
> >  * \' gives a single-quote character without delimiting the string
> >  * \" gives a double-quote character without delimiting the string
> >  * \\ gives a backslash character in the string
>
> for string quoting in par files.
>
>
> In this message I'd like to address the related issue of string
> quoting in ccl files.  As a design principle, I'd say it makes sense
> to use a consistent set of rules across all of Cactus, i.e. I'd like
> to propose the same set of rules for CCL files.
>
> As an implementation bug...  try putting the string
>     "compute $\partial_x \beta$"
> in a CCL string, and you'll discover that the current CST dumps that
> verbatim into a C string... and \p and \b aren't legal in a C string.
> Oops.

Mind that you just suggested "backslash quotes next character", so 
"$\partial" would give "$partial" in the output.



Since there are so many quoting conventions (C, Fortran, shell, perl, 
etc.), we should pick one, and not add a new one.  I vote for picking 
C, because the syntax is already very C-like.

-erik

-- 
Erik Schnetter <schnetter at aei.mpg.de>   http://www.aei.mpg.de/~eschnett/

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.cactuscode.org/pipermail/developers/attachments/20050603/986dc1b3/attachment-0002.bin 


More information about the Developers mailing list