Discussion List Archives

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

Brian T's queries

  • Subject: Brian T's queries
  • From: Nick Spadaccini <nick@xxxxxxxxxxxxx>
  • Date: Tue, 26 Sep 2000 03:26:59 +0100 (BST)

Brian Toby mailed these questions, but I think their answers are relevant
to all on this mail list so I have responded here.

> 1) Is the following valid? 
> 
> 	_data_name1
> ; this is a multiline data value
> this is the second line
> ;	_data_name2 'data item for name2'
> 
> I had thought that the terminating semicolon had to be the only
> character on a line, but rereading the 1991 Acta paper leads me to
> believe the above is valid.

Yes it is valid, certainly in STAR and there has never been (to my
recollection) a requirement in CIF that the delimiting token be
<terminate><semi_colon><terminate>. Of course one could argue that it is
good practice to start _data_name2 on a new line, but it is not a
requirement of the format.

> 2) I want to confirm that the following is not valid:
> 
> 	_data_item _data_value
> 
> My reading is that if a data value begins with _ it must be quoted. So
> it would have to be written:
> 
> 	_data_item '_data_value'

That is correct. The productions for <NON_QUOTED_1_STRING> and
<NON_QUOTED_2_STRING> explicitly exclude leading _ (underscores), hence
such data values must be quoted in some way.

> 3) What if a data item begins with loop_ or data_?
> 
> 	_data_item data_value
> 
> I did not see a rule requiring them to be quoted.

These are excluded also, but by reference to the notes (in blue
background) accompanying the definitions of <NON_QUOTED_1_STRING> and
<NON_QUOTED_2_STRING>. Why, are they not part of the productions? Because
they would become unnecessarily complicated and long. I have adopted the
practice used in many language BNFs and Syntax diagrams, for instance
formally specify what an identifier is, and then add a note saying that
the identifier string cannot be the following reserved words, etc.

It simplifies things considerably.

Hope this helps.

cheers

Nick

--------------------------------
Dr Nick Spadaccini
Department of Computer Science              voice: +(61 8) 9380 3452
University of Western Australia               fax: +(61 8) 9380 1089
Nedlands, Perth,  WA  6907                 email: nick@cs.uwa.edu.au
AUSTRALIA                        web: http://www.cs.uwa.edu.au/~nick




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.