[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: Herbert J. Bernstein <yaya@bernstein-plus-sons.com>
To: Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
Sent: Thursday, 30 September, 2010 14:58:59
Subject: [ddlm-group] A modest addition to the DDLm spec
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. For example
the CIF1 construct from the mmCIF dictionary
_item_type_list.construct
'[][ \t_(),.;:"&<>/\{}'`~!@#$%?+=*A-Za-z0-9|^-]*'
could be presented as
_item_type_list.construct
'[][ \t_(),.;:"&<>/\{}'+"'`~!@#$%?+=*A-Za-z0-9|^-]*"
or
_item_type_list.construct
'[][ \t_(),.;:"&<>/\{}' + "'`~!@#$%?+=*A-Za-z0-9|^-]*"
or
_item_type_list.construct
'[][ \t_(),.;:"&<>/\{}'
+ "'`~!@#$%?+=*A-Za-z0-9|^-]*"
in CIF2
which also can be very useful in dealing with very long regular expressions
and other very long strings that are intended to be handled as a
single line
rather than having to use a text field.
Comments appreciated.
Regards,
Herbert
--
=====================================================
Herbert J. Bernstein, Professor of Computer Science
Dowling College, Kramer Science Center, KSC 121
Idle Hour Blvd, Oakdale, NY, 11769
+1-631-244-3035
yaya@dowling.edu
=====================================================
_______________________________________________
ddlm-group mailing list
ddlm-group@iucr.org
http://scripts.iucr.org/mailman/listinfo/ddlm-group
Reply to: [list | sender only]
Re: [ddlm-group] A modest addition to the DDLm spec
- To: Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
- Subject: Re: [ddlm-group] A modest addition to the DDLm spec
- From: SIMON WESTRIP <simonwestrip@btinternet.com>
- Date: Thu, 30 Sep 2010 15:17:38 +0000 (GMT)
- In-Reply-To: <a06240804c8ca43f92cc2@[192.168.2.104]>
- References: <4C471374.6000100@mcmaster.ca><alpine.BSF.2.00.1007211307460.37813@epsilon.pair.com><AANLkTinyxmyKFOt=A6Cpdq=8LVsSR4+Js9xDOG+JEF--@mail.gmail.com><AANLkTimTab=b9u6nsUjd6UitRni-OgMTJNZYt1EMjrhE@mail.gmail.com><a06240804c8ca43f92cc2@[192.168.2.104]>
First thought is how does this work in loops?
loop_ _item
'abc' + 'def'
But I need to check whether + is one of the characters that is not allowed to start a
non-delimited string...
Otherwise I see no reason not to explore this.
Cheers
Simon
loop_ _item
'abc' + 'def'
But I need to check whether + is one of the characters that is not allowed to start a
non-delimited string...
Otherwise I see no reason not to explore this.
Cheers
Simon
From: Herbert J. Bernstein <yaya@bernstein-plus-sons.com>
To: Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
Sent: Thursday, 30 September, 2010 14:58:59
Subject: [ddlm-group] A modest addition to the DDLm spec
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. For example
the CIF1 construct from the mmCIF dictionary
_item_type_list.construct
'[][ \t_(),.;:"&<>/\{}'`~!@#$%?+=*A-Za-z0-9|^-]*'
could be presented as
_item_type_list.construct
'[][ \t_(),.;:"&<>/\{}'+"'`~!@#$%?+=*A-Za-z0-9|^-]*"
or
_item_type_list.construct
'[][ \t_(),.;:"&<>/\{}' + "'`~!@#$%?+=*A-Za-z0-9|^-]*"
or
_item_type_list.construct
'[][ \t_(),.;:"&<>/\{}'
+ "'`~!@#$%?+=*A-Za-z0-9|^-]*"
in CIF2
which also can be very useful in dealing with very long regular expressions
and other very long strings that are intended to be handled as a
single line
rather than having to use a text field.
Comments appreciated.
Regards,
Herbert
--
=====================================================
Herbert J. Bernstein, Professor of Computer Science
Dowling College, Kramer Science Center, KSC 121
Idle Hour Blvd, Oakdale, NY, 11769
+1-631-244-3035
yaya@dowling.edu
=====================================================
_______________________________________________
ddlm-group mailing list
ddlm-group@iucr.org
http://scripts.iucr.org/mailman/listinfo/ddlm-group
_______________________________________________ ddlm-group mailing list ddlm-group@iucr.org http://scripts.iucr.org/mailman/listinfo/ddlm-group
Reply to: [list | sender only]
- Follow-Ups:
- Re: [ddlm-group] A modest addition to the DDLm spec (SIMON WESTRIP)
- Re: [ddlm-group] A modest addition to the DDLm spec. . (Bollinger, John C)
- References:
- [ddlm-group] import and loops in ddlm (David Brown)
- Re: [ddlm-group] import and loops in ddlm (Herbert J. Bernstein)
- Re: [ddlm-group] import and loops in ddlm (James Hester)
- Re: [ddlm-group] import and loops in ddlm (James Hester)
- [ddlm-group] A modest addition to the DDLm spec (Herbert J. Bernstein)
- Prev by Date: Re: [ddlm-group] A modest addition to the DDLm spec. .
- Next by Date: Re: [ddlm-group] A modest addition to the DDLm spec. .
- Prev by thread: Re: [ddlm-group] A modest addition to the DDLm spec. .. .. .
- Next by thread: Re: [ddlm-group] A modest addition to the DDLm spec. .
- Index(es):