[Developers] Re: [CactusMaint] Compiler/1929: param.ccl variable description string doesn't quote things that look like C character escapes, but aren't

Jonathan Thornburg jthorn at aei.mpg.de
Mon May 16 11:15:57 CDT 2005


Hi, Thomas,

In bug #1929 I wrote
| The following param.ccl fragment
| Boolean strong_freezing \
|   "should $\alpha \to 0$ imply $\partial_t \beta^i \to 0$               \
|    or just $\partial_{tt} \beta^i \to 0$?"
| {
| } true
| causes the CST to generate illegal C code, because
| the \p of \partial looks like a C escape sequence,
| but isn't valid.

On Mon, 16 May 2005, Thomas Radke wrote:
> in the current CST implementation parameter and parameter range description 
> strings are treated as C strings (which may include escape sequences). So the 
> solution to your problem would be to add backslashes in your param.ccl file 
> where necessary.
>
> Don't you like this ?

I guess I have 2 answers to this question:
(a) I can find no Cactus documentation which says how this should behave.
(b) No, I don't like it.  Having C-literal-string quoting semantics is
     is an implementation artifact, and shouldn't be in the CST language.
     Particularly with Steve's patch to have thorn guides do latex
     typesetting of things inside $...$ in such strings, I think it's
     confusing to try to follow both of the C and TeX semantics of
     backslash.  Indeed... I doubt we really follow all the C-literal-string
     semantics -- do we want to climb down into the trigraph morass?
     And what about C-literal-string concatenation -- do we want to allow

Boolean my_flag "this is the first line"
                 "and this is the second line"
                 "and this is the third"
{
} true

     (since if these were C literal strings, they would get concatenated
     together to form a single literal)??

     I think it would be better if we said that there are no
     backslash-escapes in CST strings.
     Then we would quote anything necessary when generating C code.

ciao,

-- 
-- Jonathan Thornburg <jthorn at aei.mpg.de>
    Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
    Golm, Germany, "Old Europe"     http://www.aei.mpg.de/~jthorn/home.html
    "Washing one's hands of the conflict between the powerful and the
     powerless means to side with the powerful, not to be neutral."
                                       -- quote by Freire / poster by Oxfam




More information about the Developers mailing list