Discussion List Archives

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

Re: Parsing of comments in BNC definition

  • Subject: Re: Parsing of comments in BNC definition
  • From: Brian McMahon <bm@xxxxxxxx>
  • Date: Thu, 23 Nov 2000 10:00:36 GMT
James

This query has by chance arisen simultaneously in another context. My
guidance in such matters is the Star_Base application from Perth. If I
build an example file with your suggested block header (including a possible
value for the possible data item, i.e.
             data_block#53 _a_data_item x
) and run sb -r data_block#53 on the file (a request to Star_Base to return
all content in the nominated data block), I obtain:

sb -r data_block#53 foo.jrh
(i)   Command line request:
(i)   data_block#53
(i)   Input files are :
(i)   foo.jrh
(i)   Input from:
(i)   foo.jrh
(i)   Starting Parser for STAR File.
(i)   End of input.
(i)   Input from:
(i)   /usr/tmp/aaaa19241
(i)   End of input.
data_block#53
_a_data_item            x

So the intention seems pretty clearly NOT to see the # as introducing white
space in this context.

The BNF needs to be carefully revised to accommodate this.

Regards
Brian

On Thu, Nov 23, 2000 at 09:48:30AM +0000, James Hester wrote:
> Hello people,
> 
> I guess this is probably question to Nick, and forgive me if I've
> overlooked something.
> 
> I'm currently trying to implement a parser using the draft BNC
> definition, but am confused about the parsing of comments.
> 
> To demonstrate, if I have a data block heading
> 
> data_block#53 _a_data_item
> 
> does the production
> 
> <data_heading>          ::= <DATA_> <non_blank_char>+
> 
> suck up the #53 as well (# is listed as a non_blank_char)?  Or does
> 
> <data>     ::= { <wspace>+ <data_name> <wspace>* <blank> <data_value_1> }
> 
> mean that #53... -> comment -> wspace mean that '#53 _a_data_item' can
> be considered as the whitespace before the data name?  This question
> applies in a number of other places as well, where '#' might occur as
> part of a data value.
> 
> I await enlightenment,
> 
> James.
> _______________________________________________________________________
> James Hester, ANBF                             KEK
> e-mail: jrh@anbf2.kek.jp                       Oho 1-1
> ________________________________________________________________________

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

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

ICSU 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.