On Jun 11, 2007, at 6:02 PM, Ethan Mallove wrote:
btls = &if("®exp("&shell("hostname")", "v440-2|v20z-2")", \
"&enumerate("self,sm,tcp")", \
"&if("®exp("&shell("hostname")", "v440-6")", \
"&enumerate("udapl")", \
"&enumerate("sm", "tcp", "sm,tcp", "udapl",
"sm,udapl")"" \
) \
)
Yowza! We really need to make this quoting situation better
somehow. :-(
Don't you have an extra ) in there at the end?
How come EvaluateString() doesn't translate this:
btls = &if("®exp("&shell("hostname")", "v440-2|v20z-2")", \
"&enumerate("self,sm,tcp")", \
"&if("®exp("&shell("hostname")", "v440-6")", \
"&enumerate("udapl")", \
"&enumerate("sm", "tcp", "sm,tcp", "udapl",
"sm,udapl")"" \
) \
)
Into one big eval block like this:
eval $btls = MTT::Functions::if(MTT::Functions::regexp
(MTT::Functions::shell("hostname"), "v440-2|v20z-2"),
MTT::Functions::enumerate("self,sm,tcp"),
MTT::Functions::if("MTT::Functions::regexp
("MTT::Functions::shell("hostname"), "v440-6"),
MTT::Functions::enumerate("udapl"),
MTT::Functions::enumerate("sm", "tcp",
"sm,tcp", "udapl", "sm,udapl")
)
)
So we could put the burden of the nasty recursive
parenthesis/quote parsing on perl, rather than MTT. That
would seem to naturally make the INI funclet syntax more
Perl-like.
Ah -- I had to think about this a bit before I figured it out/
remembered. I think we won't get the expansion effect if you do it
this way. Although it might solve some other issues (e.g., https://
svn.open-mpi.org/trac/mtt/ticket/184)...?
--
Jeff Squyres
Cisco Systems