[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ddlm-group] A modest addition to the DDLm spec. .


On Thursday, September 30, 2010 8:59 AM, Herbert J. Bernstein wrote:

>The following issue came up during the encodings group discussion, but
>is more properly a DDLm issue.  In order to simplify algorithmic
>conversion of existing CIF1 quoted strings to valid CIF2 strings,
>I propose the addition of the python string concatenation operator, "+",
>in CIF2 documents.  The main value of this addition is to permit a
>simple algorithmic conversion of CIF1 strings with embedded quote
>marks to CIF2 strings that end on the first occurrence of the initial
>quote.  While the use of text fields will suffice in many cases,
>for regular expressions it is clearer and simpler to just break the
>string, insert the terminal quote mark, insert a "+" and then restart
>the string with a different quote mark.
>
>Formally the proposal is:
>
>When a quoted string is given as a data value in a CIF2 document,
>it may be presented as multiple quoted strings concatenated by the
>"+" operator.  [...]

Would this issue be addressed well enough by converting single-quoted strings to triple-quoted form?  I guess that wouldn't allow for breaking up regexes, so maybe it's addressed by the remark about text fields.

I recognize that from time to time it is convenient to break up long, single-line values, but I'm not yet persuaded that that is sufficient justification for this feature.  Adopting it would add an incremental complication to CIF parsing, and would add another incompatibility with CIF1, so the benefit should offset those costs.

If breaking up regexes in particular is the motivation for this suggestion, then could that objective adequately be met by having DDLm use a regex language that allows non-significant whitespace, as Perl's comments mode does?


Regards,

John
--
John C. Bollinger, Ph.D.
Department of Structural Biology
St. Jude Children's Research Hospital


Email Disclaimer:  www.stjude.org/emaildisclaimer

_______________________________________________
ddlm-group mailing list
ddlm-group@iucr.org
http://scripts.iucr.org/mailman/listinfo/ddlm-group

Reply to: [list | sender only]