Subject: Formal fits grammar (was: Re: Are HEX integers allowed in header?)

From: davis at space.mit.edu (John E. Davis)
Date: 30 Nov 1995 16:55:22 GMT

On 30 Nov 1995 09:09 EDT, Barry M. Schlesinger <bschlesinger at nssdca.gsfc.nasa.gov>
wrote:
 : explicit and differentiated from integers.  This history supports the 
 : interpretation of integer keyword values as decimal integers. 

I think that the NOST fits definition paper should explicitly point out that
the integers should be expressed in decimal format.  As I recall, it only
says something like ``ASCII representation''.  `7F' (hex) is certainly a
valid ASCII representation of `127' (decimal).

Perhaps many will think that I am going overboard by saying that I would
like the NOST fits definition paper to be quite formal on these issues.  For
example, look at any RFC, e.g., RFC822 which presents the format for email
headers. In it you will find:

     D.  ALPHABETICAL LISTING OF SYNTAX RULES

     address     =  mailbox                      ; one addressee
                 /  group                        ; named list
     addr-spec   =  local-part " at " domain        ; global address
     ALPHA       =  <any ASCII alphabetic character>
                                                 ; (101-132, 65.- 90.)
                                                 ; (141-172, 97.-122.)
     atom        =  1*<any CHAR except specials, SPACE and CTLs>
     authentic   =   "From"       ":"   mailbox  ; Single author
                 / ( "Sender"     ":"   mailbox  ; Actual submittor
                     "From"       ":" 1#mailbox) ; Multiple authors
                                                 ;  or not sender
     CHAR        =  <any ASCII character>        ; (  0-177,  0.-127.)
     comment     =  "(" *(ctext / quoted-pair / comment) ")"
     CR          =  <ASCII CR, carriage return>  ; (     15,      13.)
     CRLF        =  CR LF
     ctext       =  <any CHAR excluding "(",     ; => may be folded
                     ")", "\" & CR, & including
                     linear-white-space>
     CTL         =  <any ASCII control           ; (  0- 37,  0.- 31.)
  etc....
  
I really believe that the fits definition should go into such detail.  For
me, there appear to be too many ambiguities in the fits definition.  Such a
grammar would resolve these issues.

--John