[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
Re: [ddlm-group] CIF2 Syntax all wrapped up?
- To: Group finalising DDLm and associated dictionaries <[email protected]>
- Subject: Re: [ddlm-group] CIF2 Syntax all wrapped up?
- From: Joe Krahn <[email protected]>
- Date: Wed, 23 Dec 2009 13:58:36 -0500
- In-Reply-To: <[email protected]>
- References: <[email protected]> <[email protected]><[email protected]>
James Hester wrote:
> I would answer as follows:
...
> 2) What are the rules for comments within lists and tables?
>
> I would treat them as whitespace
One detail is whether the "#" starting a comment requires preceding
whitespace. Herbert's example is:
[1,#one
2, #two
3 #three
,4 #four
]
He suggests that preceding whitespace is there only if needed to
terminate the preceding token, and not a requirement in the actual
comment syntax. This looks OK in the above example, but may not be clear
after a quoted string:
"string"#comment
Or, perhaps this is no less clear than the lack of whitespace in a list:
["string"]
> 4) Why require single or double quotes for table index strings, rather
> than just follow the normal quoting rules?
>
>
> No good reason - so let's just follow the normal rules.
>
Should quotes be requires at all for the index string? Correct parsing
only requires quotes if the index string contains a colon. In the
current draft, that is imposed for all strings, not just table-index
strings. So, there is no need to mandate quotes here, unless the global
requirement to quote strings with : is dropped.
Maybe the intention was to disallow multi-line index strings?
> Some of these are more technical details compared to the other issues.
> These came up while I was working on a big CIF2 regular-expression,
> where parsing details have to be considered more carefully.
>
> Actually, it would be rather good if you could post these regular
> expressions once we have a final specification, as they are likely to be
> useful to a broad audience.
I plan to do that. To be fully functional, it has to be done in Perl
syntax, which has a feature that allows recursion for table and list
values. Despite that caveat, it will be useful even where the full
recursive expression will not work.
Joe
_______________________________________________
ddlm-group mailing list
[email protected]
http://scripts.iucr.org/mailman/listinfo/ddlm-group
Reply to: [list | sender only]
- Follow-Ups:
- Re: [ddlm-group] CIF2 Syntax all wrapped up? (Nick Spadaccini)
- References:
- [ddlm-group] CIF2 Syntax all wrapped up? (James Hester)
- Re: [ddlm-group] CIF2 Syntax all wrapped up? (Joe Krahn)
- Re: [ddlm-group] CIF2 Syntax all wrapped up? (James Hester)
- Prev by Date: Re: [ddlm-group] CIF2 Syntax all wrapped up?
- Next by Date: [ddlm-group] Comment rules
- Prev by thread: Re: [ddlm-group] CIF2 Syntax all wrapped up?
- Next by thread: Re: [ddlm-group] CIF2 Syntax all wrapped up?
- Index(es):

