<?xml version="1.0" encoding="UTF-8"?><?rfc linefile="1:xml/complete/rfc4234.xml"?>
<!-- automatically generated by xml2rfc v1.32 on 2007-04-02T19:01:16Z -->
<!--
    This XML document is the output of clean-for-DTD.xslt; a tool that strips
    extensions to RFC2629(bis) from documents for processing with xml2rfc.
-->
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc toc="yes" ?>
<?rfc tocdepth="2" ?>
<?rfc tocindent="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc editing="no" ?>
<!DOCTYPE rfc
  PUBLIC "" "rfc2629.dtd">
<rfc category="std" number="4234" obsoletes="2234" submissionType="IETF" updates="">
   <front>
      <title abbrev="ABNF">Augmented BNF for Syntax Specifications: ABNF</title>
      <author fullname="Dave Crocker" initials="D." role="editor" surname="Crocker">
         <organization>Brandenburg InternetWorking</organization>
         <address>
            <postal>
               <street>675 Spruce Dr.</street>
               <city>Sunnyvale</city>
               <region>CA</region>
               <code>94086</code>
               <country>US</country>
            </postal>
            <phone>+1.408.246.8253</phone>
            <email>dcrocker@bbiw.net</email>
         </address>
      </author>
      <author fullname="Paul Overell" initials="P." surname="Overell">
         <organization>THUS plc.</organization>
         <address>
            <postal>
               <street>1/2 Berkeley Square, </street>
               <street>99 Berkeley Street</street>
               <city>Glasgow</city>
               <code>G3 7HR</code>
               <country>UK</country>
            </postal>
            <email>paul.overell@thus.net</email>
         </address>
      </author>
      <date month="October" year="2005"/>
      <keyword>ABNF</keyword>
      <keyword>Augmented</keyword>
      <keyword>Backus-Naur</keyword>
      <keyword>Form</keyword>
      <keyword>electronic</keyword>
      <keyword>mail</keyword>
      <abstract>
			<t>Internet technical specifications often need to define a formal	
			syntax.  Over the years, a modified version of Backus-Naur Form	
			(BNF), called Augmented BNF (ABNF), has been popular among many	
			Internet specifications.  The current specification documents ABNF.	
			It balances compactness and simplicity, with reasonable	
			representational power.  The differences between standard BNF and	
			ABNF involve naming rules, repetition, alternatives, order-	
			independence, and value ranges.  This specification also supplies	
			additional rule definitions and encoding for a core lexical analyzer	
			of the type common to several Internet specifications.
      </t>
      </abstract>
   </front>
   <middle>
      <section title="INTRODUCTION" toc="default">
         <t> Internet technical specifications often need to define a formal
            syntax and are free to employ whatever notation their authors deem
            useful. Over the years, a modified version of Backus-Naur Form
            (BNF), called Augmented BNF (ABNF), has been popular among many
            Internet specifications. It balances compactness and simplicity,
            with reasonable representational power. In the early days of the
            Arpanet, each specification contained its own definition of ABNF.
            This included the email specifications, <xref target="RFC733" format="default" pageno="false"/> and then <xref target="RFC822" format="default" pageno="false"/>, which came to be the
            common citations for defining ABNF.  The current document separates those
            definitions to permit selective reference.  Predictably, it
            also provides some modifications and enhancements.</t>
         <t> The differences between standard BNF and ABNF involve naming rules,
            repetition, alternatives, order-independence, and value ranges.
               <xref target="CORE" format="default" pageno="false"/> supplies rule definitions and
            encoding for a core lexical analyzer of the type common to several
            Internet specifications. It is provided as a convenience and is
            otherwise separate from the meta language defined in the body of
            this document, and separate from its formal status. <list style="hanging">
               <t hangText="Changes since [RFC2234]:"/>
               <t>In <xref target="SpecRep" format="default" pageno="false"/>, the phrase: "That is,
                  exactly &lt;N&gt; occurrences of
                  &lt;element&gt;." was corrected to: "That is, exactly
                  &lt;n&gt; occurrences of &lt;element&gt;."</t>
               <t>Some continuation comment lines needed to be corrected to
                  begin with comment character (";").</t>
            </list>
         </t>
      </section>
      <section title="RULE DEFINITION" toc="default">
         <section title="Rule Naming" toc="default">
            <t> The name of a rule is simply the name itself; that is, a
               sequence of characters, beginning with an alphabetic character,
               and followed by a combination of alphabetics, digits, and hyphens
               (dashes).</t>
            <t>
               <list style="hanging">
                  <t hangText="NOTE:  "/>
                  <t>Rule names are case-insensitive </t>
               </list>
            </t>
            <t> The names &lt;rulename&gt;, &lt;Rulename&gt;,
               &lt;RULENAME&gt;, and &lt;rUlENamE&gt; all refer
               to the same rule.</t>
            <t> Unlike original BNF, angle brackets ("&lt;", "&gt;") are
               not required. However, angle brackets may be used around a rule
               name whenever their presence facilitates in discerning the use
               of a rule name. This is typically restricted to rule name
               references in free-form prose, or to distinguish partial rules
               that combine into a string not separated by white space, such as
               shown in the discussion about repetition, below.</t>
         </section>
         <section title="Rule Form" toc="default">
            <t> A rule is defined by the following sequence:</t>
            <figure height="" width="" alt="" title="" align="left">
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      name =  elements crlf </artwork>
            </figure>
            <t> where &lt;name&gt; is the name of the rule,
               &lt;elements&gt; is one or more rule names or terminal
               specifications, and &lt;crlf&gt; is the end-of-line
               indicator (carriage return followed by line feed). The equal sign
               separates the name from the definition of the rule. The elements
               form a sequence of one or more rule names and/or value
               definitions, combined according to the various operators defined
               in this document, such as alternative and repetition.</t>
            <t> For visual ease, rule definitions are left aligned. When a rule
               requires multiple lines, the continuation lines are indented. The
               left alignment and indentation are relative to the first lines of
               the ABNF rules and need not match the left margin of the
               document.</t>
         </section>
         <section title="Terminal Values" toc="default">
            <t> Rules resolve into a string of terminal values, sometimes called
               characters. In ABNF, a character is merely a non-negative integer.
               In certain contexts, a specific mapping (encoding) of values into
               a character set (such as ASCII) will be specified.</t>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> Terminals are specified by one or more numeric
                  characters, with the base interpretation of those characters
                  indicated explicitly. The following bases are currently
                  defined:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      b           =  binary

      d           =  decimal

      x           =  hexadecimal </artwork>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> Hence:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      CR          =  %d13

      CR          =  %x0D </artwork>
               <postamble> respectively specify the decimal and hexadecimal
                  representation of <xref target="US-ASCII" format="default" pageno="false"/> for carriage
                  return.</postamble>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> A concatenated string of such values is specified
                  compactly, using a period (".") to indicate a separation of
                  characters within that value. Hence:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      CRLF        =  %d13.10 </artwork>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> ABNF permits the specification of literal text strings directly,
                  enclosed in quotation-marks. Hence:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      command     =  "command string" </artwork>
            </figure>
            <t> Literal text strings are interpreted as a concatenated set of
               printable characters.</t>
            <t>
               <list style="hanging">
                  <t hangText="NOTE:  "/>
                  <t>ABNF strings are case-insensitive and the character set for
                     these strings is us-ascii. </t>
               </list>
            </t>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> Hence:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      rulename = "abc" </artwork>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> and:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      rulename = "aBc" 
</artwork>
               <postamble> will match "abc", "Abc", "aBc", "abC", "ABc", "aBC",
                  "AbC", and "ABC".</postamble>
            </figure>
            <t>
               <list>
                  <t> To specify a rule that IS case SENSITIVE, specify the
                     characters individually. </t>
               </list>
            </t>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> For example:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      rulename    =  %d97 %d98 %d99
</artwork>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> or</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      rulename    =  %d97.98.99
</artwork>
               <postamble> will match only the string that comprises only the
                  lowercased characters, abc.</postamble>
            </figure>
         </section>
         <section title="External Encodings" toc="default">
            <t> External representations of terminal value characters will vary
               according to constraints in the storage or transmission
               environment. Hence, the same ABNF-based grammar may have multiple
               external encodings, such as one for a 7-bit US-ASCII environment,
               another for a binary octet environment, and still a different one
               when 16-bit Unicode is used. Encoding details are beyond the
               scope of ABNF, although Appendix A (Core) provides definitions
               for a 7-bit US-ASCII environment as has been common to much of
               the Internet.</t>
            <t> By separating external encoding from the syntax, it is intended
               that alternate encoding environments can be used for the same
               syntax.</t>
         </section>
      </section>
      <section title="OPERATORS" toc="default">
         <section title="Concatenation:  Rule1 Rule2" toc="default">
            <t> A rule can define a simple, ordered string of values (i.e., a
               concatenation of contiguous characters) by listing a sequence
               of rule names. For example:</t>
            <figure height="" width="" alt="" title="" align="left">
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      foo         =  %x61           ; a

      bar         =  %x62           ; b

      mumble      =  foo bar foo </artwork>
            </figure>
            <t>
              So that the rule &lt;mumble&gt; matches the
              lowercase string "aba".
            </t>
            <t>
                LINEAR WHITE SPACE: Concatenation is at the core of the
                   ABNF parsing model. A string of contiguous characters
                   (values) is parsed according to the rules defined in ABNF.
                   For Internet specifications, there is some history of
                   permitting linear white space (space and horizontal tab) to
                   be freely and implicitly interspersed around major
                   constructs, such as delimiting special characters or atomic
                   strings.
                   </t>
               <t>NOTE:
                <list>
                  <t>
                     This specification for ABNF does not provide for
                     implicit specification of linear white space.</t>
               </list>
            </t>
            <t> Any grammar that wishes to permit linear white space around
               delimiters or string segments must specify it explicitly. It is
               often useful to provide for such white space in "core" rules that
               are then used variously among higher-level rules. The "core"
               rules might be formed into a lexical analyzer or simply be part
               of the main ruleset.</t>
         </section>
         <section anchor="Alternatives" title="Alternatives:  Rule1 / Rule2" toc="default">
            <t> Elements separated by a forward slash ("/") are alternatives.
               Therefore,</t>
            <figure height="" width="" alt="" title="" align="left">
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      foo / bar  
</artwork>
               <postamble> will accept &lt;foo&gt; or
                  &lt;bar&gt;.</postamble>
            </figure>
            <t>
               <list style="hanging">
                  <t hangText="NOTE:  "/>
                  <t>A quoted string containing alphabetic characters is a special
                     form for specifying alternative characters and is
                     interpreted as a non-terminal representing the set of
                     combinatorial strings with the contained characters, in the
                     specified order but with any mixture of upper and lower
                     case.</t>
               </list>
            </t>
         </section>
         <section anchor="Incremental" title="Incremental Alternatives: Rule1 =/ Rule2" toc="default">
            <t> It is sometimes convenient to specify a list of alternatives in
               fragments. That is, an initial rule may match one or more
               alternatives, with later rule definitions adding to the set of
               alternatives. This is particularly useful for otherwise,
               independent specifications that derive from the same parent rule
               set, such as often occurs with parameter lists. ABNF permits this
               incremental definition through the construct:</t>
            <figure height="" width="" alt="" title="" align="left">
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      oldrule     =/ additional-alternatives </artwork>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> So that the rule set</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      ruleset     =  alt1 / alt2

      ruleset     =/ alt3

      ruleset     =/ alt4 / alt5 </artwork>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> is the same as specifying</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      ruleset     =  alt1 / alt2 / alt3 / alt4 / alt5 </artwork>
            </figure>
         </section>
         <section anchor="Range" title="Value Range Alternatives:  %c##-##" toc="default">
            <figure height="" width="" alt="" title="" align="left">
               <preamble> A range of alternative numeric values can be specified
                  compactly, using dash ("-") to indicate the range of
                  alternative values. Hence:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      DIGIT       =  %x30-39 </artwork>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> is equivalent to:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      DIGIT       =  "0" / "1" / "2" / "3" / "4" / "5" / "6" /

                     "7" / "8" / "9" </artwork>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> Concatenated numeric values and numeric value ranges
                  cannot be specified in the same string. A numeric value may
                  use the dotted notation for concatenation or it may use the
                  dash notation to specify one value range. Hence, to specify
                  one printable character between end of line sequences, the
                  specification could be:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      char-line = %x0D.0A %x20-7E %x0D.0A </artwork>
            </figure>
         </section>
         <section anchor="Sequence" title="Sequence Group:  (Rule1 Rule2)" toc="default">
            <figure height="" width="" alt="" title="" align="left">
               <preamble> Elements enclosed in parentheses are treated as a
                  single element, whose contents are STRICTLY ORDERED. Thus,</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      elem (foo / bar) blat
</artwork>
               <postamble>matches (elem foo blat) or (elem bar
               blat), and</postamble>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      elem foo / bar blat
</artwork>
               <postamble> matches (elem foo) or (bar blat).</postamble>
            </figure>
            <t>
               <list style="hanging">
                  <t hangText="NOTE:  "/>
                  <t>It is strongly advised that grouping notation be used, rather
                     than relying on the proper reading of "bare" alternations, when
                     alternatives consist of multiple rule names or literals.
                  </t>
               </list>
            </t>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> Hence, it is recommended that the following form be used:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

     (elem foo) / (bar blat) 
</artwork>
               <postamble>It will avoid misinterpretation by casual
                  readers.</postamble>
            </figure>
            <t> The sequence group notation is also used within free text to set
               off an element sequence from the prose.</t>
         </section>
         <section anchor="VarRep" title="Variable Repetition:  *Rule" toc="default">
            <figure height="" width="" alt="" title="" align="left">
               <preamble> The operator "*" preceding an element indicates
                  repetition. The full form is:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      &lt;a&gt;*&lt;b&gt;element
</artwork>
               <postamble> where &lt;a&gt; and &lt;b&gt; are
                  optional decimal values, indicating at least &lt;a&gt;
                  and at most &lt;b&gt; occurrences of the
               element.</postamble>
            </figure>
            <t> Default values are 0 and infinity so that
               *&lt;element&gt; allows any number, including zero;
               1*&lt;element&gt; requires at least one;
               3*3&lt;element&gt; allows exactly 3 and
               1*2&lt;element&gt; allows one or two.</t>
         </section>
         <section anchor="SpecRep" title="Specific Repetition:  nRule" toc="default">
            <figure height="" width="" alt="" title="" align="left">
               <preamble> A rule of the form:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      &lt;n&gt;element </artwork>
          </figure>
          <figure height="" width="" alt="" title="" align="left">
             <preamble> is equivalent to</preamble>
             <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      &lt;n&gt;*&lt;n&gt;element </artwork>
          </figure>
          <t> That is, exactly &lt;n&gt; occurrences of
             &lt;element&gt;. Thus, 2DIGIT is a 2-digit number, and
             3ALPHA is a string of three alphabetic characters.</t>
         </section>
         <section anchor="OptSeq" title="Optional Sequence:  [RULE]" toc="default">
            <figure height="" width="" alt="" title="" align="left">
               <preamble> Square brackets enclose an optional element sequence:</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      [foo bar] </artwork>
            </figure>
            <figure height="" width="" alt="" title="" align="left">
               <preamble> is equivalent to</preamble>
               <artwork type="example" height="" name="" width="" alt="" align="left" xml:space="preserve">

      *1(foo bar). </artwork>
            </figure>
         </section>
         <section anchor="Comment" title="Comment:  ; Comment" toc="default">
            <t> A semi-colon starts a comment that continues to the end of line.
               This is a simple way of including useful notes in parallel with
               the specifications.</t>
         </section>
         <section title="Operator Precedence" toc="default">
            <t> The various mechanisms described above have the following
               precedence, from highest (binding tightest) at the top, to lowest
               (loosest) at the bottom: <list>
                  <t>Strings, Names formation</t>
                  <t>Comment</t>
                  <t>Value range</t>
                  <t>Repetition</t>
                  <t>Grouping, Optional</t>
                  <t>Concatenation</t>
                  <t>Alternative</t>
               </list>
            </t>
            <t> Use of the alternative operator, freely mixed with
               concatenations, can be confusing.</t>
            <t>
               <list>
                  <t> Again, it is recommended that the grouping operator be
                     used to make explicit concatenation groups. </t>
               </list>
            </t>
         </section>
      </section>
      <section title="ABNF DEFINITION OF ABNF" toc="default">
         <t>
            <list style="hanging">
               <t hangText="NOTES:">
                  <list style="numbers">
                     <t>This syntax requires a formatting of rules that is
                        relatively strict. Hence, the version of a ruleset
                        included in a specification might need preprocessing to
                        ensure that it can be interpreted by an ABNF parser.</t>
                     <t>This syntax uses the rules provided in <xref target="CORE" format="default" pageno="false"/> (Core).</t>
                  </list>
               </t>
            </list>
         </t>
         <figure height="" width="" alt="" title="" align="left">
            <artwork type="abnf" height="" name="" width="" alt="" align="left" xml:space="preserve">

      rulelist       =  1*( rule / (*c-wsp c-nl) )

      rule           =  rulename defined-as elements c-nl
                             ; continues if next line starts
                             ;  with white space

      rulename       =  ALPHA *(ALPHA / DIGIT / "-")

      defined-as     =  *c-wsp ("=" / "=/") *c-wsp
                             ; basic rules definition and
                             ;  incremental alternatives

      elements       =  alternation *c-wsp

      c-wsp          =  WSP / (c-nl WSP)

      c-nl           =  comment / CRLF
                             ; comment or newline

      comment        =  ";" *(WSP / VCHAR) CRLF

      alternation    =  concatenation
                        *(*c-wsp "/" *c-wsp concatenation)

      concatenation  =  repetition *(1*c-wsp repetition)

      repetition     =  [repeat] element

      repeat         =  1*DIGIT / (*DIGIT "*" *DIGIT)

      element        =  rulename / group / option /
                        char-val / num-val / prose-val

      group          =  "(" *c-wsp alternation *c-wsp ")"

      option         =  "[" *c-wsp alternation *c-wsp "]"

      char-val       =  DQUOTE *(%x20-21 / %x23-7E) DQUOTE
                             ; quoted string of SP and VCHAR
                             ;  without DQUOTE

      num-val        =  "%" (bin-val / dec-val / hex-val)

      bin-val        =  "b" 1*BIT
                        [ 1*("." 1*BIT) / ("-" 1*BIT) ]
                             ; series of concatenated bit values
                             ;  or single ONEOF range

      dec-val        =  "d" 1*DIGIT
                        [ 1*("." 1*DIGIT) / ("-" 1*DIGIT) ]

      hex-val        =  "x" 1*HEXDIG
                        [ 1*("." 1*HEXDIG) / ("-" 1*HEXDIG) ]

      prose-val      =  "&lt;" *(%x20-3D / %x3F-7E) "&gt;"
                             ; bracketed string of SP and VCHAR
                             ;  without angles
                             ; prose description, to be used as
                             ;  last resort 
</artwork>
         </figure>
      </section>
      <section title="SECURITY CONSIDERATIONS" toc="default">
         <t> Security is truly believed to be irrelevant to this document.</t>
      </section>
   </middle>
   <back>
      <references title="Normative References">
         <reference anchor="US-ASCII">
            <front>
               <title>Coded Character Set -- 7-bit American Standard Code for
                  Information Interchange</title>
               <author>
                  <organization>American National Standards
                  Institute</organization>
               </author>
               <date year="1986"/>
            </front>
            <seriesInfo name="ANSI" value="X3.4"/>
         </reference>
      </references>
      <references title="Informative References">
         <reference anchor="RFC733">
            <front>
               <title>Standard for the format of ARPA network text messages</title>
               <author fullname="David H. Crocker" initials="D." surname="Crocker">
                  <organization>The Rand Corporation, Information Sciences
                     Department</organization>
                  <address>
                     <postal>
                        <street>1700 Main St</street>
                        <city>Santa Monica</city>
                        <region>CA</region>
                        <code>90406</code>
                        <country>US</country>
                     </postal>
                     <email>DCrocker@Rand-Unix</email>
                  </address>
               </author>
               <author fullname="John J. Vittal" initials="J." surname="Vittal">
                  <organization>Bolt Beranek and Newman Inc. (BBN)</organization>
                  <address>
                     <postal>
                        <street>50 Moulton St.</street>
                        <city>Cambridge</city>
                        <region>MA</region>
                        <code>02138</code>
                        <country>US</country>
                     </postal>
                     <email>Vittal@BBN-TenexD</email>
                  </address>
               </author>
               <author fullname="Kenneth T. Pogran" initials="K." surname="Pogran">
                  <organization>Massachusets Institute of Technology (MIT),
                     Laboratory for Computer Science</organization>
                  <address>
                     <postal>
                        <street>545 Technology Square</street>
                        <city>Cambridge</city>
                        <region>MA</region>
                        <code>02139</code>
                        <country>US</country>
                     </postal>
                     <email>Pogran@MIT-Multics</email>
                  </address>
               </author>
               <author fullname="D. Austin Henderson, Jr." initials="D." surname="Henderson">
                  <organization>Bolt Beranek and Newman Inc. (BBN)</organization>
                  <address>
                     <postal>
                        <street>50 Moulton St.</street>
                        <city>Cambridge</city>
                        <region>MA</region>
                        <code>02138</code>
                        <country>US</country>
                     </postal>
                     <email>Henderson@BBN-TenexD</email>
                  </address>
               </author>
               <date day="21" month="November" year="1977"/>
            </front>
            <seriesInfo name="RFC" value="733"/>
         </reference>
         <reference anchor="RFC822">
            <front>
               <title abbrev="Standard for ARPA Internet Text Messages">Standard
                  for the format of ARPA Internet text messages</title>
               <author fullname="David H. Crocker" initials="D.H." surname="Crocker">
                  <organization>University of Delaware, Dept. of Electrical
                     Engineering</organization>
                  <address>
                     <postal>
                        <street/>
                        <city>Newark</city>
                        <region>DE</region>
                        <code>19711</code>
                        <country>US</country>
                     </postal>
                     <email>DCrocker@UDel-Relay</email>
                  </address>
               </author>
               <date day="13" month="August" year="1982"/>
            </front>
            <seriesInfo name="STD" value="11"/>
            <seriesInfo name="RFC" value="822"/>
         </reference>
         <reference anchor="RFC2234">
            <front>
               <title>Augmented BNF for Syntax Specifications: ABNF</title>
               <author fullname="Dave Crocker" initials="D." surname="Crocker">
                  <organization>Internet Mail Consortium</organization>
               </author>
               <author fullname="Paul Overell" initials="P." surname="Overell">
                  <organization>Demon Internet Ltd.</organization>
               </author>
               <date month="November" year="1997"/>
            </front>
            <seriesInfo name="RFC" value="2234"/>
         </reference>
      </references>
      <section title="ACKNOWLEDGEMENTS" toc="default">
         <t> The syntax for ABNF was originally specified in RFC 733. Ken L.
            Harrenstien, of SRI International, was responsible for re-coding the
            BNF into an augmented BNF that makes the representation smaller and
            easier to understand.</t>
         <t> This recent project began as a simple effort to cull out the
            portion of RFC 822 that has been repeatedly cited by non-email
            specification writers, namely the description of augmented BNF.
            Rather than simply and blindly converting the existing text into a
            separate document, the working group chose to give careful
            consideration to the deficiencies, as well as benefits, of the
            existing specification and related specifications made available over the
            last 15 years, and therefore to pursue enhancement. This turned the
            project into something rather more ambitious than was first intended.
            Interestingly, the result is not massively different from that
            original, although decisions, such as removing the list notation, came
            as a surprise.</t>
         <t> This "separated" version of the specification was part of the DRUMS
            working group, with significant contributions from Jerome Abela,
            Harald Alvestrand, Robert Elz, Roger Fajman, Aviva Garrett, Tom
            Harsch, Dan Kohn, Bill McQuillan, Keith Moore, Chris Newman, Pete
            Resnick, and Henning Schulzrinne.</t>
         <t>Julian Reschke warrants a special thanks for converting the Draft
            Standard version to XML source form.</t>
      </section>
      <section anchor="CORE" title="APPENDIX - CORE ABNF OF ABNF" toc="default">
         <t> This Appendix is provided as a convenient core for specific
            grammars. The definitions may be used as a core set of rules.</t>
         <section title="Core Rules" toc="default">
            <t> Certain basic rules are in uppercase, such as SP, HTAB, CRLF,
               DIGIT, ALPHA, etc.</t>
            <figure height="" width="" alt="" title="" align="left">
               <artwork type="abnf" height="" name="" width="" alt="" align="left" xml:space="preserve">

      ALPHA          =  %x41-5A / %x61-7A   ; A-Z / a-z

      BIT            =  "0" / "1"

      CHAR           =  %x01-7F
                             ; any 7-bit US-ASCII character,
                             ;  excluding NUL

      CR             =  %x0D
                             ; carriage return

      CRLF           =  CR LF
                             ; Internet standard newline

      CTL            =  %x00-1F / %x7F
                             ; controls

      DIGIT          =  %x30-39
                             ; 0-9

      DQUOTE         =  %x22
                             ; " (Double Quote)

      HEXDIG         =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"

      HTAB           =  %x09
                             ; horizontal tab

      LF             =  %x0A
                             ; linefeed

      LWSP           =  *(WSP / CRLF WSP)
                             ; linear white space (past newline)

      OCTET          =  %x00-FF
                             ; 8 bits of data

      SP             =  %x20

      VCHAR          =  %x21-7E
                             ; visible (printing) characters

      WSP            =  SP / HTAB
                             ; white space 
</artwork>
            </figure>
         </section>
         <section title="Common Encoding" toc="default">
            <t> Externally, data are represented as "network virtual ASCII"
               (namely, 7-bit US-ASCII in an 8-bit field), with the high (8th) bit
               set to zero. A string of values is in "network byte order", in which
               the higher-valued bytes are represented on the left-hand side and
               are sent over the network first.</t>
         </section>
      </section>
   </back>
</rfc>