comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephe.Leake@nasa.gov>
Subject: Grace.Config_Files comment syntax
Date: 27 Jun 2003 09:01:48 -0400
Date: 2003-06-27T13:02:18+00:00	[thread overview]
Message-ID: <uhe6bu11f.fsf@nasa.gov> (raw)

David Koogler has expressed an interest in getting comments working in
Grace.Config_Files (see http://www.nongnu.org/Grace/Grace_Home.html;
I've just improved it, and added the Config_Files requirements).

The Config_Files requirements that we worked on here last year state
that the Config_Files file format is the same as the Java Properties
file format. Here's a reference for that:

http://java.sun.com/j2se/1.4.1/docs/api/java/util/Properties.html

(it's not very long, and the file format details are given in the
documentation of the "load" method; go read it :).

That says that comments are introduced by either "#" or "!", and
terminated by end of line. Also, comments must be alone on a line;
only whitespace can precede the comment symbol. That allows "#" and
"!" in value strings without an escape mechanism.

David also wants comments on the same line as a key/value pair. I
think that's a bad idea, both because it is incompatible with the Java
Properties definition, and because it complicates parsing the file.

Unless someone has an objection, I'll incorporate this syntax for
comments into the Config_Files requirements.

There are other details of the Java Properties format that we don't
currently follow; it provides a line continuation mechanism, allows
either "=" or ":" for the key/value separator, and uses C escape
characters in the value string. Anyone think those should be in
Config_Files? We did say one advantage of picking a predefined format
was interoperability; if we really believe that, we should simply
adopt this definition completely.

-- 
-- Stephe



             reply	other threads:[~2003-06-27 13:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-27 13:01 Stephen Leake [this message]
2003-06-27 13:19 ` Grace.Config_Files comment syntax Vinzent Hoefler
2003-06-27 17:33   ` Stephen Leake
2003-06-28  7:49     ` Vinzent Hoefler
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox