[ET Trac] [Einstein Toolkit] #1595: Is *) allowed as upper boundary for a parameter range?
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Sun May 24 09:46:02 CDT 2015
#1595: Is *) allowed as upper boundary for a parameter range?
-----------------------+----------------------------------------------------
Reporter: eschnett | Owner: sbrandt
Type: defect | Status: assigned
Priority: minor | Milestone: ET_2015_05
Component: Cactus | Version: development version
Resolution: | Keywords: postrelease
-----------------------+----------------------------------------------------
Comment (by rhaas):
Fine with me (as far as I know there is no existing code that breaks since
the possibility to use {{{[}}} was never documented and the only thorn
that I know of doing so is private to Zelmani).
In that case we need to add documentation that documents that {{{[}}} and
{{{]}}} can be used (as alternatives to not using any type of brackets) to
specify closed ranges to the user guide. Please note that already the user
guide fails to mention that {{{(}}} and {{{)}}} are accepted for integer
type ranges to provide exclusive ranges (where it is not required since
one can always adjust the allowed range by one step).
Steve's patch actually (as far as I understand the regex) makes the the
perl script explicitly accept {{{[}}} which the C code will already
interpret as a closed interval bound (see function
{{{Util_DoubleInRange}}} in Misc.c).
Allowing {{{(*}}} and {{{*)}}} (and {{{[*}}} and {{*]}}}) which would be
equivalent to just {{{*}}} was already accepted in comment:6.
We may still want to disallow using double quotes {{{"}}} in ranges for
reals and integers. This would be similar to the changes introduced with
the piraha based parser which did disallow "bare" strings (and only later
re-introduced them for certain strings when it was found that a subset of
users used those) and disallows quoted numbers. Allowing quotes when
specifying ranges but disallowing them when specifying values in parfiles
would be strange.
The correct regex (the one in the perl script currently allows two round
parens {{{((42:*}}} should be:
{{{
[(\[]?\s*($real|\*)\s*:\s*($real|\*)\s*[)\]]?
}}}
as well as
{{{
[\[]?$real[\]]?|[(\[]?\*[)\]]?
}}}
to allow any combination of number and star with an optional round/square
bracket at either end or a single number of single star with a
round/square brackets where sensible with any whitespace in between the
elements.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1595#comment:15>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list