Discussion List Archives

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

[ddlm-group] THREAD TRIPLE QUOTES - Specification

  • To: Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
  • Subject: [ddlm-group] THREAD TRIPLE QUOTES - Specification
  • From: Nick Spadaccini <nick@csse.uwa.edu.au>
  • Date: Fri, 11 Sep 2009 13:04:30 +0800
  • Authentication-Results: postfix;
Our last discussion on the implementation of triple quoted strings resulted
in much to-ing and fro-ing and in the end the conclusion was that its
behaviour was to be identical to the semi-colon delimited strings. I
preferred a greater degree of parsing of the string but this was not

Now our illustrious chair, who sits next to me now, asks the question "what
is the point of the triple quoted string", to which I can only shrug my
shoulders. The triple quote string will be useful for containing strings
that include ", ' and ; (in the first character in a record). They will of
course fail when you attempt to include the sequence """. Hence they are no
different to a ; delimited string that cannot include a ; as the first
character of a line.

Here is a suggestion. The triple quote string (delimited by """) will treat
its contents a raw, except that

(a) When writing the string, ALL quotes contained within will have a space
inserted immediately after the " character. This will allow the triple quote
to be contained within the string by breaking the sequence with spaces so
the tokeniser is not fooled in to terminating the string. Clearly the
reverse operation is required in reading the string. I this way is is
possible to include all manner of text, markup and programming scripts
within a triple quoted string.

(b) We will formally accept in this string the "eliding" of the newline
character. Hence a reverse solidus (\) immediately prior to the record
terminating character(s) will imply the \ and the record terminating
characters are deleted from the stream, and the next line is wrapped around.

To allow for the odd case when one want's to literally include the \ and the
record terminating character(s) in the string then the required \ will be

In parsing the contents of a string the only things required are
(1) delete one of the spaces after every "
(2) treat \<newline> as a wrap around
(3) treat \\<newline> as the raw string \<newline>

All other characters are left as is.



Associate Professor N. Spadaccini, PhD
School of Computer Science & Software Engineering

The University of Western Australia    t: +61 (0)8 6488 3452
35 Stirling Highway                    f: +61 (0)8 6488 1089
CRAWLEY, Perth,  WA  6009 AUSTRALIA   w3: www.csse.uwa.edu.au/~nick
MBDP  M002

CRICOS Provider Code: 00126G

e: Nick.Spadaccini@uwa.edu.au

ddlm-group mailing list

Reply to: [list | sender only]
International Union of Crystallography

Scientific Union Member of the International Science Council (admitted 1947). Member of CODATA, the ISC Committee on Data. Partner with UNESCO, the United Nations Educational, Scientific and Cultural Organization in the International Year of Crystallography 2014.

International Science Council Scientific Freedom Policy

The IUCr observes the basic policy of non-discrimination and affirms the right and freedom of scientists to associate in international scientific activity without regard to such factors as ethnic origin, religion, citizenship, language, political stance, gender, sex or age, in accordance with the Statutes of the International Council for Science.