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: Nick Spadaccini <nick@xxxxxxxxxxxxx>
  • Date: Fri, 24 Nov 2000 04:58:53 GMT
On Fri, 24 Nov 2000, James Hester wrote:

> The beginning of a file would have to have honorary 'terminate'
> status, otherwise a hash as first character in the file wouldn't count
> as a comment.  

Yes that's right James. I've noted that also, and it is difficult to get
around without introducing other new production items. If you haven't
followed this discussion list before James, I have said it often that
requiring productions for comments complicates things considerably.
That's why most systems just strip comments out at the lexical level.

> I imagine the StarBase program gobbles up as many characters as it can

A common feature of a compiler-compiler, it finds the longest lexeme
matching the production.

> to fit the current context; so, having seen a 'data_' keyword, it
> grabs as many non-blank characters as are in the input stream.  This
> seems like reasonable behaviour.

I hope so.

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.