INTERNET-DRAFT                                        Mykyta Yevstifeyev
Intended Status: BCP                                    December 8, 2010
Updates: 5234 (if approved)                                             
Expires: June 11, 2011                                                  


     Augmented Backus-Naur Form (ABNF) Notation for Separated Lists
              <draft-yevstifeyev-abnf-separated-lists-02>

Abstract

   This document defines Augmented Backus-Naur Form (ABNF) notation for
   representing lists separated by any specified character. It updates
   RFC 5234.

Status of this Memo

   This Internet-Draft is submitted to IETF in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/1id-abstracts.html

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html


Copyright and License Notice

   Copyright (c) 2010 IETF Trust and the persons identified as the
   document authors. All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document. Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document. Code Components extracted from this document must
 


M. Yevstifeyev           Expires June 11, 2011                  [Page 1]

INTERNET DRAFT     ABNF Notation for Separated Lists    December 8, 2010


   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.



Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 3
      1.1.  Conventions  . . . . . . . . . . . . . . . . . . . . . . . 3
   2.  Notation Description  . . . . . . . . . . . . . . . . . . . . . 4
      2.1. Examples  . . . . . . . . . . . . . . . . . . . . . . . . . 4
   3.  Security Considerations . . . . . . . . . . . . . . . . . . . . 6
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6
   5.  Normative References  . . . . . . . . . . . . . . . . . . . . . 6
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . 6
   Author's Addresses  . . . . . . . . . . . . . . . . . . . . . . . . 6































 


M. Yevstifeyev           Expires June 11, 2011                  [Page 2]

INTERNET DRAFT     ABNF Notation for Separated Lists    December 8, 2010


1.  Introduction

   ABNF does not provide the possibility to express the separated lists
   of elements via specific construction. If it is needed (generally for
   defining HTTP headers or human-readable forms), the following ABNF
   construction is used:

   (*LWS element n*m(*LWS separator *LWS element))

   It is obvious that this construction is too simplified and bulky.
   This document specifies universal ABNF notation for lists, separated
   by arbitrary specified characters.

1.1.  Conventions

   This document uses ABNF notation and core rules defined in RFC 5234
   [RFC5234]. The construction in {} is used for expressing arithmetic
   expressions. For instance, if a=2, b=3 and c={b-a}, c is 1. In this
   case c=1*DIGIT.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].

























 


M. Yevstifeyev           Expires June 11, 2011                  [Page 3]

INTERNET DRAFT     ABNF Notation for Separated Lists    December 8, 2010


2.  Notation Description

   The ABNF notation for separated lists is <n>^(<a>)<m>element
   indicating at least <n> and at most <m> elements separated by <a> and
   OPTIONAL linear-white-spaces.

   The ABNF for this construction is:

                    ;if n>=1
   n^(a)m element = ( *LWS element n_1*m_1(*LWS a *LWS element) 
                    ;if n=0
   n^(a)m element = ( *m_1(*LWS element *LWS a) f(element))  
   n              = *DIGIT     ;minimum amount of elements, which MUST 
                               ;be used
   m              = *DIGIT     ;maximum amount of elements, which MAY be
                               ;used
   u              = 1*DIGIT    ;the number of used elements
   n_1            = {n-1}
   m_1            = {m-1}
   a              = VCHAR / SP / HT
   f              = {(u-(u-1)+1):2} ;will be 0 if no elements are used 
                                    ;and 1 if at least one element is
                                    ;used.

   <n> MAY be omitted indicating that any amount of elements not more
   than <m> is allowed (including zero).

   <m> MAY be omitted indicating that any amount of elements not less
   than <n> is allowed (including <n>).

   <n> and <m> MAY be omitted indicating that any amount of elements is
   allowed (including zero).

2.1. Examples

   The section contains a few examples of using the defined
   construction.

   1^(";")3element indicates the list of elements separated by
   semicolons (";") and OPTIONAL linear-white-spaces which consists of
   at least 1 and at most 3 elements.

   1^(SP)element indicates the list of elements separated by spaces and
   OPTIONAL linear-white-spaces which consists of any amount of elements
   but not less than 1.

   ^(",")3element indicates the list of elements separated by commas
   (",") and OPTIONAL linear-white-spaces which consists of any amount
 


M. Yevstifeyev           Expires June 11, 2011                  [Page 4]

INTERNET DRAFT     ABNF Notation for Separated Lists    December 8, 2010


   of elements but not more than 3 (including zero).

   ^(-)element indicates the list of elements separated by hyphens ("-")
   and OPTIONAL linear-white-spaces which consists of any amount of
   elements (including zero). 











































 


M. Yevstifeyev           Expires June 11, 2011                  [Page 5]

INTERNET DRAFT     ABNF Notation for Separated Lists    December 8, 2010


3.  Security Considerations

   Security issues are not discussed by this document.


4.  IANA Considerations

   IANA has no actions for this document.


5.  Normative References

   [RFC2119]   Bradner, S., "Key words for use in RFCs to Indicate
               Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC5234]   Crocker, D., Ed., and P. Overell, "Augmented BNF for
               Syntax Specifications: ABNF", STD 68, RFC 5234, January
               2008.

Acknowledgments

   Many thanks to (in alphabetical order): Tony Hansen and Barry Leiba
   for their weighty input to this document.

Author's Addresses

   Mykyta Yevstifeyev
   8 Kuzovkov St., flat 25,
   Kotovsk, Ukraine

   EMail: evnikita2@gmail.com




















M. Yevstifeyev           Expires June 11, 2011                  [Page 6]