Discussion List Archives

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

Re: [ddlm-group] Close quotes not followed by whitespace




On 27/11/09 11:16 AM, "Herbert J. Bernstein" <yaya@bernstein-plus-sons.com>
wrote:

> Dear Colleagues,
> 
>    Please do not misunderstand my position.  I recognize that I cannot
> win on the issue of the handling of the reverse solidus in CIF2, and
> believe we should move on.  That does not mean that I think that
> this is a sound decision for the future of CIF2, just that it is
> the COMCIFS decision for the definition of CIF2.  We have other
> issues to discuss.

Not sure what issue of reverse solidus you can't win, but if it is
line-folding I think it is generally accepted that if a lexer doesn't need
to know about it, it is do-able. I thought this was the case for CIF1 also.
There seems to be a syntax that has worked and hasn't seemingly blown up my
parsers, though I don't know how many I have parsed, then it is OK.

But we do need to clarify Joe's question and James' answer concerning the
lack of whitespace (and commas for compound data types) separators between
tokens. Yes this is a violation of the specification, but there are rules
that one can apply to coerce these in to something sensible. For instance,

_thingy "hello"" world" -> "hello world" ala Python.

Similarly we could take (and I think Herb would like this)

_thingz [1 2 "astring" [2.3,6.7]] -> [1,2,"astring",[2.3,6.7]]

This was discussed and I recall the general opinion was not to crash and
burn if token separators were missing. Strictly speaking though it is still
syntax error.


>    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
> =====================================================
> 
> On Fri, 27 Nov 2009, James Hester wrote:
> 
>> You are correct that we have agreed that CIF2 treats a close quote followed
>> by non-whitespace as a syntax error.  A not inconsiderable quantity of bytes
>> and time were spent reaching this decision.
>> 
>> On Fri, Nov 27, 2009 at 1:13 PM, Joe Krahn <krahn@niehs.nih.gov> wrote:
>>       CIF2 no longer skips close-quotes that are not followed by
>>       whitespace. I
>>       assume that close-quotes still need trailing whitespace, and
>>       that it is
>>       simply a syntax error for a close quote followed by
>>       non-whitespace.
>> 
>>       Therefore, it should be possible to allow CIF1 input for
>>       backwards
>>       compatibility by accepting these invalid close-quotes on input.
>>       That
>>       should help minimize conflicts with adopting CIF2. The only
>>       input that
>>       would be misinterpreted would be a quote character written as
>>       """, most
>>       software will have written as '"', using the opposite quote
>>       character.
>> 
>>       So, this:
>> 
>>       ;\
>>       ;\
>>       ;
>> 
>>       is just a syntax error in CIF2, or can be accepted as a
>>       line-folded ";"
>>       in CIF1.
>> 
>>       Joe
>>       _______________________________________________
>>       ddlm-group mailing list
>>       ddlm-group@iucr.org
>>       http://scripts.iucr.org/mailman/listinfo/ddlm-group
>> 
>> 
>> 
>> 
>> --
>> T +61 (02) 9717 9907
>> F +61 (02) 9717 3145
>> M +61 (04) 0249 4148
>> 
>> 
> _______________________________________________
> ddlm-group mailing list
> ddlm-group@iucr.org
> http://scripts.iucr.org/mailman/listinfo/ddlm-group

cheers

Nick

--------------------------------
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
ddlm-group@iucr.org
http://scripts.iucr.org/mailman/listinfo/ddlm-group


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.