Syntax without templates

New Message Reply About this list Date view Thread view Subject view Author view

From: Charles Lindsey (chl@clw.cs.man.ac.uk)
Date: Thu Feb 28 2002 - 13:18:28 CST


Here, as requested by Paul Overell, is the alternative header syntax
without schemata or templates. I have shown the basic format from
section 4, plus the headers in section 5. If this is considered OK, I
will apply it throughout the system.

4. Basic Format
 
4.1. Syntax of News Articles
 
   The overall syntax of a news article is:
 
      article = 1*( header CRLF ) separator body
      header = other-header
      other-header = header-name ":" 1*SP other-content
      header-name = 1*name-character *( "-" 1*name-character )
      name-character = ALPHA / DIGIT
      other-content = <the content of a header defined by some
                             other standard>
      separator = CRLF
      body = *( *998text CRLF )

   However, the rule given above for header is incomplete. Further
   alternatives will be added incrementally as the various Netnews
   headers are introduced in this standard (or in future extensions),
   using the "=/" notation defined in [RFC 2234]. For example, a
   typical USENET-header would be defined as follows:

      header =/ USENET-header
      USENET-header = "USENET" ":" SP USENET-content
                             *( ";" ( USENET-parameter /
                                      other-parameter ) )
      USENET-content = <syntax specific to that USENET-header>
      USENET-parameter = <syntax specific to that USENET-header>

   where the USENET-parameter, which MUST always be of the same
   syntactic form as an other-parameter (see below), is not provided in
   all headers, and even the other-parameter is omitted in a few cases
   where the content is "unstructured". Observe that "USENET" is (and
   MUST be) of the syntactic form of a header-name.

      other-parameter = attribute "=" value
      attribute = usenet-token / iana-token / x-token
      usenet-token = <A token defined in this standard for
                             use in conjunction with a specific
                             USENET-parameter>
      iana-token = <a token defined in an experimental
                             or standards-track RFC and registered
                             with IANA>
      x-token = [CFWS] "x-" token-core [CFWS]
      token = [CFWS] token-core [CFWS]
      token-core = 1*<any (US-ASCII) CHAR except SP, CTLs,
                             or tspecials>
      tspecials = "(" / ")" / "<" / ">" / "@" /
                          "," / ";" / ":" / "\" / DQUOTE /
                          "/" / "[" / "]" / "?" / "="
      value = token / quoted-string

5. Mandatory Headers

5.1. Date

      header =/ Date-header
      Date-header = "Date" ":" SP Date-content *( ";" other-parameter )
      Date-content = date-time
      zone = (( "+" / "-" ) 4DIGIT) / "UT" / "GMT"

5.2. From

      header =/ From-header
      From-header = "From" ":" SP From-content *( ";" other-parameter )
      From-content = mailbox-list
      addr-spec = local-part "@" domain
      local-part = dot-atom / strict-quoted-string

5.3. Message-ID

      header =/ Message-ID-header
      Message-ID-header = "Message-ID" ":" SP Message-ID-content
                              *( ";" other-parameter )
      Message-ID-content = msg-id
      id-left = dot-atom-text / no-fold-quote
      id-right = dot-atom-text / no-fold-literal
      no-fold-quote = DQUOTE *( strict-qtext / strict-quoted-pair )
                              DQUOTE
      no-fold-literal = "[" *( dtext / strict-quoted-pair ) "]"

5.4. Subject

      header =/ Subject-header
      Subject-header = "Subject" ":" SP Subject-content
      Subject-content = [ [FWS] back-reference ] pure-subject
      pure-subject = 1*( [FWS] utext )
      back-reference = %x52.65.3A.20
                                    ; which is a case-sensitive "Re: "

[Observe that other-parameters are omitted from headers whuch are
"unstructured".]

5.5. Newsgroups

      header =/ Newsgroups-header
      Newsgroups-header = "Newsgroups" ":" SP Newsgroups-content
                                    *( ";" other-parameter )
      Newsgroups-content = [FWS] newsgroup-name
                               *( [FWS] ng-delim [FWS] newsgroup-name )
                               [FWS]
      newsgroup-name = component *( "." component )
      component = 1*component-glyph
      ng-delim = ","
      component-glyph = combiner-base *combiner-mark
      combiner-base = combiner-ASCII / combiner-extended
      combiner-ASCII = DIGIT / ALPHA / "+" / "-" / "_"
      combiner-extended = <any character with a Unicode code value of
                             0080 or greater and a combining class of 0,
                             but excluding any character in Unicode
                             categories Cc, Cf, Cs, Zs, Zl, and Zp>
      combiner-mark = <any character with a Unicode code value of
                             0080 or greater and a combining class other
                             than 0>

5.6. Path

      header =/ Path-header
      Path-header = "Path" ":" SP Path-content *( ";" other-parameter )
      Path-content = [FWS] *( path-identity [FWS] path-delimiter [FWS] )
                               tail-entry [FWS]
      path-identity = 1*( ALPHA / DIGIT / "-" / "." / ":" / "_" )
      path-delimiter = "/" / "?" / "%" / "," / "!"
      tail-entry = 1*( ALPHA / DIGIT / "-" / "." / ":" / "_" )

Charles H. Lindsey ---------At Home, doing my own thing------------------------
Tel: +44 161 436 6131 Fax: +44 161 436 6133 Web: http://www.cs.man.ac.uk/~chl
Email: chl@clw.cs.man.ac.uk Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9 Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5


New Message Reply About this list Date view Thread view Subject view Author view


This archive was generated by hypermail 2b29.