Changeset 598 for draft-ietf-httpbis/orig/rfc5234.html
- Timestamp:
- 13/06/09 10:14:22 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/orig/rfc5234.html
- Property svn:mime-type set to text/html
r311 r598 1 2 1 <!DOCTYPE html 3 2 PUBLIC "-//W3C//DTD HTML 4.01//EN"> 4 <html lang="en"><head profile="http://www.w3.org/2006/03/hcard"> 5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 6 <title>Augmented BNF for Syntax Specifications: ABNF</title><style type="text/css" title="Xml2Rfc (sans serif)"> 3 <html lang="en"> 4 <head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/"> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 6 <title>Augmented BNF for Syntax Specifications: ABNF</title><style type="text/css" title="Xml2Rfc (sans serif)"> 7 7 a { 8 8 text-decoration: none; … … 62 62 page-break-after: avoid; 63 63 } 64 h2 a { 65 color: black; 66 } 67 h3 { 64 h3, h4, h5, h6 { 68 65 font-size: 10pt; 69 66 page-break-after: avoid; 70 67 } 71 h3 a { 72 color: black; 73 } 74 h4 { 75 font-size: 10pt; 76 page-break-after: avoid; 77 } 78 h4 a { 79 color: black; 80 } 81 h5 { 82 font-size: 10pt; 83 page-break-after: avoid; 84 } 85 h5 a { 68 h2 a, h3 a, h4 a, h5 a, h6 a { 86 69 color: black; 87 70 } … … 186 169 ul p { 187 170 margin-left: 0em; 188 }189 ul.ind {190 list-style: none;191 margin-left: 1.5em;192 margin-right: 0em;193 padding-left: 0em;194 }195 li.indline0 {196 font-weight: bold;197 line-height: 200%;198 margin-left: 0em;199 margin-right: 0em;200 }201 li.indline1 {202 font-weight: normal;203 line-height: 150%;204 margin-left: 0em;205 margin-right: 0em;206 171 } 207 172 … … 327 292 } 328 293 } 329 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyright"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Rule Definition" href="#rfc.section.2"><link rel="Chapter" title="3 Operators" href="#rfc.section.3"><link rel="Chapter" title="4 ABNF Definition of ABNF" href="#rfc.section.4"><link rel="Chapter" title="5 Security Considerations" href="#rfc.section.5"><link rel="Chapter" href="#rfc.section.6" title="6 References"><link rel="Appendix" title="A Acknowledgements" href="#rfc.section.A"><link rel="Appendix" title="B Core ABNF of ABNF" href="#rfc.section.B"><link rel="Alternate" title="Authorative ASCII version" href="http://www.ietf.org/rfc/rfc5234.txt"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.389, 2008-08-20 14:21:35, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="ABNF, Augmented, Backus-Naur, Form, electronic, mail"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.Creator" content="Crocker, D."><meta name="DC.Creator" content="Overell, P."><meta name="DC.Identifier" content="urn:ietf:rfc:5234"><meta name="DC.Date.Issued" scheme="ISO8601" content="2008-01"><meta name="DC.Relation.Replaces" content="urn:ietf:rfc:4234"><meta name="DC.Description.Abstract" content="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."></head><body><table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1"><tr><td class="header left">Network Working Group</td><td class="header right">D. Crocker, Editor</td></tr><tr><td class="header left">Request for Comments: 5234</td><td class="header right">Brandenburg InternetWorking</td></tr><tr><td class="header left">Obsoletes: <a href="http://tools.ietf.org/html/rfc4234">4234</a></td><td class="header right">P. Overell</td></tr><tr><td class="header left">STD: 68</td><td class="header right">THUS plc.</td></tr><tr><td class="header left">Category: Standards Track</td><td class="header right">January 2008</td></tr></table><p class="title">Augmented BNF for Syntax Specifications: ABNF</p><h1><a id="rfc.status" href="#rfc.status">Status of this Memo</a></h1><p>This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the “Internet Official Protocol Standards” (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.</p><h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1> <p>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.</p> <hr class="noprint"><h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li class="tocline0">1. <a href="#rfc.section.1">Introduction</a></li><li class="tocline0">2. <a href="#rfc.section.2">Rule Definition</a><ul class="toc"><li class="tocline1">2.1 <a href="#rfc.section.2.1">Rule Naming</a></li><li class="tocline1">2.2 <a href="#rfc.section.2.2">Rule Form</a></li><li class="tocline1">2.3 <a href="#rfc.section.2.3">Terminal Values</a></li><li class="tocline1">2.4 <a href="#rfc.section.2.4">External Encodings</a></li></ul></li><li class="tocline0">3. <a href="#rfc.section.3">Operators</a><ul class="toc"><li class="tocline1">3.1 <a href="#rfc.section.3.1">Concatenation: Rule1 Rule2</a></li><li class="tocline1">3.2 <a href="#Alternatives">Alternatives: Rule1 / Rule2</a></li><li class="tocline1">3.3 <a href="#Incremental">Incremental Alternatives: Rule1 =/ Rule2</a></li><li class="tocline1">3.4 <a href="#Range">Value Range Alternatives: %c##-##</a></li><li class="tocline1">3.5 <a href="#Sequence">Sequence Group: (Rule1 Rule2)</a></li><li class="tocline1">3.6 <a href="#VarRep">Variable Repetition: *Rule</a></li><li class="tocline1">3.7 <a href="#SpecRep">Specific Repetition: nRule</a></li><li class="tocline1">3.8 <a href="#OptSeq">Optional Sequence: [RULE]</a></li><li class="tocline1">3.9 <a href="#Comment">Comment: ; Comment</a></li><li class="tocline1">3.10 <a href="#rfc.section.3.10">Operator Precedence</a></li></ul></li><li class="tocline0">4. <a href="#rfc.section.4">ABNF Definition of ABNF</a></li><li class="tocline0">5. <a href="#rfc.section.5">Security Considerations</a></li><li class="tocline0">6. <a href="#rfc.references">References</a><ul class="toc"><li class="tocline1">6.1 <a href="#rfc.references.1">Normative References</a></li><li class="tocline1">6.2 <a href="#rfc.references.2">Informative References</a></li></ul></li><li class="tocline0"><a href="#rfc.authors">Authors' Addresses</a></li><li class="tocline0">A. <a href="#rfc.section.A">Acknowledgements</a></li><li class="tocline0">B. <a href="#CORE">Core ABNF of ABNF</a><ul class="toc"><li class="tocline1">B.1 <a href="#rfc.section.B.1">Core Rules</a></li><li class="tocline1">B.2 <a href="#rfc.section.B.2">Common Encoding</a></li></ul></li><li class="tocline0"><a href="#rfc.ipr">Intellectual Property and Copyright Statements</a></li></ul><hr class="noprint"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> Introduction</h1><p id="rfc.section.1.p.1">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, <a href="#RFC733"><cite title="Standard for the format of ARPA network text messages">[RFC733]</cite></a> and then <a href="#RFC822"><cite title="Standard for the format of ARPA Internet text messages">[RFC822]</cite></a>, 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.</p><p id="rfc.section.1.p.2">The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges. <a href="#CORE" title="Core ABNF of ABNF">Appendix B</a> 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.</p><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a> Rule Definition</h1><h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a> Rule Naming</h2><p id="rfc.section.2.1.p.1">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).</p><p id="rfc.section.2.1.p.2"> </p><dl><dt>NOTE: </dt><dd>Rule names are case insensitive.</dd></dl><p id="rfc.section.2.1.p.3">The names <rulename>, <Rulename>, <RULENAME>, and <rUlENamE> all refer to the same rule.</p><p id="rfc.section.2.1.p.4">Unlike original BNF, angle brackets ("<", ">") 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.</p><h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a> Rule Form</h2><p id="rfc.section.2.2.p.1">A rule is defined by the following sequence:</p><div id="rfc.figure.u.1"></div> <pre> 330 name = elements crlf </pre> <p id="rfc.section.2.2.p.3">where <name> is the name of the rule, <elements> is one or more rule names or terminal specifications, and <crlf> 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.</p><p id="rfc.section.2.2.p.4">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.</p><h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a> Terminal Values</h2><p id="rfc.section.2.3.p.1">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.</p><div id="rfc.figure.u.2"></div> <p>Terminals are specified by one or more numeric characters, with the base interpretation of those characters indicated explicitly. The following bases are currently defined:</p> <pre> 294 </style><link rel="Contents" href="#rfc.toc"> 295 <link rel="Author" href="#rfc.authors"> 296 <link rel="Copyright" href="#rfc.copyright"> 297 <link rel="Chapter" title="1 Introduction" href="#rfc.section.1"> 298 <link rel="Chapter" title="2 Rule Definition" href="#rfc.section.2"> 299 <link rel="Chapter" title="3 Operators" href="#rfc.section.3"> 300 <link rel="Chapter" title="4 ABNF Definition of ABNF" href="#rfc.section.4"> 301 <link rel="Chapter" title="5 Security Considerations" href="#rfc.section.5"> 302 <link rel="Chapter" href="#rfc.section.6" title="6 References"> 303 <link rel="Appendix" title="A Acknowledgements" href="#rfc.section.A"> 304 <link rel="Appendix" title="B Core ABNF of ABNF" href="#rfc.section.B"> 305 <link rel="Alternate" title="Authorative ASCII Version" href="http://www.ietf.org/rfc/rfc5234.txt"> 306 <link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc5234"> 307 <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.438, 2009-05-27 13:34:05, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/"> 308 <meta name="keywords" content="ABNF, Augmented, Backus-Naur, Form, electronic, mail"> 309 <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"> 310 <meta name="DC.Creator" content="Crocker, D."> 311 <meta name="DC.Creator" content="Overell, P."> 312 <meta name="DC.Identifier" content="urn:ietf:rfc:5234"> 313 <meta name="DC.Date.Issued" scheme="ISO8601" content="2008-01"> 314 <meta name="DC.Relation.Replaces" content="urn:ietf:rfc:4234"> 315 <meta name="DC.Description.Abstract" content="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."> 316 <meta name="DC.isPartOf" content="urn:ISSN:2070-1721"> 317 </head> 318 <body> 319 <!--WARNING: document uses ABNF syntax, but doesn't reference RFC 2234, 4234 or 5234.--> 320 <table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1"> 321 <tr> 322 <td class="header left">Network Working Group</td> 323 <td class="header right">D. Crocker, Editor</td> 324 </tr> 325 <tr> 326 <td class="header left">Request for Comments: 5234</td> 327 <td class="header right">Brandenburg InternetWorking</td> 328 </tr> 329 <tr> 330 <td class="header left">Obsoletes: 331 <!--WARNING: front matter mentions RFC 4234 for which there is no reference element--><a href="http://tools.ietf.org/html/rfc4234">4234</a></td> 332 <td class="header right">P. Overell</td> 333 </tr> 334 <tr> 335 <td class="header left">STD: 68</td> 336 <td class="header right">THUS plc.</td> 337 </tr> 338 <tr> 339 <td class="header left">Category: Standards Track</td> 340 <td class="header right">January 2008</td> 341 </tr> 342 </table> 343 <p class="title">Augmented BNF for Syntax Specifications: ABNF</p> 344 <h1><a id="rfc.status" href="#rfc.status">Status of This Memo</a></h1> 345 <p>This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions 346 for improvements. Please refer to the current edition of the “Internet Official Protocol Standards” (STD 1) for the standardization 347 state and status of this protocol. Distribution of this memo is unlimited. 348 </p> 349 <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1> 350 <p>Internet technical specifications often need to define a formal syntax. Over the years, a modified version of Backus-Naur 351 Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications. The current specification documents 352 ABNF. It balances compactness and simplicity with reasonable representational power. The differences between standard BNF 353 and ABNF involve naming rules, repetition, alternatives, order- independence, and value ranges. This specification also supplies 354 additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications. 355 </p> 356 <hr class="noprint"> 357 <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1> 358 <ul class="toc"> 359 <li class="tocline0">1. <a href="#rfc.section.1">Introduction</a></li> 360 <li class="tocline0">2. <a href="#rfc.section.2">Rule Definition</a><ul class="toc"> 361 <li class="tocline1">2.1 <a href="#rfc.section.2.1">Rule Naming</a></li> 362 <li class="tocline1">2.2 <a href="#rfc.section.2.2">Rule Form</a></li> 363 <li class="tocline1">2.3 <a href="#rfc.section.2.3">Terminal Values</a></li> 364 <li class="tocline1">2.4 <a href="#rfc.section.2.4">External Encodings</a></li> 365 </ul> 366 </li> 367 <li class="tocline0">3. <a href="#rfc.section.3">Operators</a><ul class="toc"> 368 <li class="tocline1">3.1 <a href="#rfc.section.3.1">Concatenation: Rule1 Rule2</a></li> 369 <li class="tocline1">3.2 <a href="#Alternatives">Alternatives: Rule1 / Rule2</a></li> 370 <li class="tocline1">3.3 <a href="#Incremental">Incremental Alternatives: Rule1 =/ Rule2</a></li> 371 <li class="tocline1">3.4 <a href="#Range">Value Range Alternatives: %c##-##</a></li> 372 <li class="tocline1">3.5 <a href="#Sequence">Sequence Group: (Rule1 Rule2)</a></li> 373 <li class="tocline1">3.6 <a href="#VarRep">Variable Repetition: *Rule</a></li> 374 <li class="tocline1">3.7 <a href="#SpecRep">Specific Repetition: nRule</a></li> 375 <li class="tocline1">3.8 <a href="#OptSeq">Optional Sequence: [RULE]</a></li> 376 <li class="tocline1">3.9 <a href="#Comment">Comment: ; Comment</a></li> 377 <li class="tocline1">3.10 <a href="#rfc.section.3.10">Operator Precedence</a></li> 378 </ul> 379 </li> 380 <li class="tocline0">4. <a href="#rfc.section.4">ABNF Definition of ABNF</a></li> 381 <li class="tocline0">5. <a href="#rfc.section.5">Security Considerations</a></li> 382 <li class="tocline0">6. <a href="#rfc.references">References</a><ul class="toc"> 383 <li class="tocline1">6.1 <a href="#rfc.references.1">Normative References</a></li> 384 <li class="tocline1">6.2 <a href="#rfc.references.2">Informative References</a></li> 385 </ul> 386 </li> 387 <li class="tocline0"><a href="#rfc.authors">Authors' Addresses</a></li> 388 <li class="tocline0">A. <a href="#rfc.section.A">Acknowledgements</a></li> 389 <li class="tocline0">B. <a href="#CORE">Core ABNF of ABNF</a><ul class="toc"> 390 <li class="tocline1">B.1 <a href="#rfc.section.B.1">Core Rules</a></li> 391 <li class="tocline1">B.2 <a href="#rfc.section.B.2">Common Encoding</a></li> 392 </ul> 393 </li> 394 <li class="tocline0"><a href="#rfc.ipr">Intellectual Property and Copyright Statements</a></li> 395 </ul> 396 <hr class="noprint"> 397 <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> Introduction 398 </h1> 399 <p id="rfc.section.1.p.1">Internet technical specifications often need to define a formal syntax and are free to employ whatever notation their authors 400 deem useful. Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among 401 many Internet specifications. It balances compactness and simplicity with reasonable representational power. In the early 402 days of the Arpanet, each specification contained its own definition of ABNF. This included the email specifications, <a href="#RFC733"><cite title="Standard for the format of ARPA network text messages">[RFC733]</cite></a> and then <a href="#RFC822"><cite title="Standard for the format of ARPA Internet text messages">[RFC822]</cite></a>, which came to be the common citations for defining ABNF. The current document separates those definitions to permit selective 403 reference. Predictably, it also provides some modifications and enhancements. 404 </p> 405 <p id="rfc.section.1.p.2">The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value 406 ranges. <a href="#CORE" title="Core ABNF of ABNF">Appendix B</a> supplies rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications. 407 It is provided as a convenience and is otherwise separate from the meta language defined in the body of this document, and 408 separate from its formal status. 409 </p> 410 <hr class="noprint"> 411 <h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a> Rule Definition 412 </h1> 413 <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a> Rule Naming 414 </h2> 415 <p id="rfc.section.2.1.p.1">The name of a rule is simply the name itself, that is, a sequence of characters, beginning with an alphabetic character, and 416 followed by a combination of alphabetics, digits, and hyphens (dashes). 417 </p> 418 <p id="rfc.section.2.1.p.2"> </p> 419 <dl> 420 <dt>NOTE: </dt> 421 <dd>Rule names are case insensitive.</dd> 422 </dl> 423 <p id="rfc.section.2.1.p.3">The names <rulename>, <Rulename>, <RULENAME>, and <rUlENamE> all refer to the same rule.</p> 424 <p id="rfc.section.2.1.p.4">Unlike original BNF, angle brackets ("<", ">") are not required. However, angle brackets may be used around a rule name whenever 425 their presence facilitates in discerning the use of a rule name. This is typically restricted to rule name references in free-form 426 prose, or to distinguish partial rules that combine into a string not separated by white space, such as shown in the discussion 427 about repetition, below. 428 </p> 429 <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a> Rule Form 430 </h2> 431 <p id="rfc.section.2.2.p.1">A rule is defined by the following sequence:</p> 432 <div id="rfc.figure.u.1"></div> <pre> 433 name = elements crlf </pre> <p id="rfc.section.2.2.p.3">where <name> is the name of the rule, <elements> is one or more rule names or terminal specifications, and <crlf> is the end-of-line 434 indicator (carriage return followed by line feed). The equal sign separates the name from the definition of the rule. The 435 elements form a sequence of one or more rule names and/or value definitions, combined according to the various operators defined 436 in this document, such as alternative and repetition. 437 </p> 438 <p id="rfc.section.2.2.p.4">For visual ease, rule definitions are left aligned. When a rule requires multiple lines, the continuation lines are indented. 439 The left alignment and indentation are relative to the first lines of the ABNF rules and need not match the left margin of 440 the document. 441 </p> 442 <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a> Terminal Values 443 </h2> 444 <p id="rfc.section.2.3.p.1">Rules resolve into a string of terminal values, sometimes called characters. In ABNF, a character is merely a non-negative 445 integer. In certain contexts, a specific mapping (encoding) of values into a character set (such as ASCII) will be specified. 446 </p> 447 <div id="rfc.figure.u.2"></div> 448 <p>Terminals are specified by one or more numeric characters, with the base interpretation of those characters indicated explicitly. 449 The following bases are currently defined: 450 </p> <pre> 331 451 b = binary 332 452 333 453 d = decimal 334 454 335 x = hexadecimal </pre> <div id="rfc.figure.u.3"></div> <p>Hence:</p> <pre> 455 x = hexadecimal </pre> <div id="rfc.figure.u.3"></div> 456 <p>Hence:</p> <pre> 336 457 CR = %d13 337 458 338 459 CR = %x0D 339 </pre> <p>respectively specify the decimal and hexadecimal representation of <a href="#US-ASCII"><cite title="Coded Character Set -- 7-bit American Standard Code for Information Interchange">[US-ASCII]</cite></a> for carriage return.</p> <div id="rfc.figure.u.4"></div> <p>A concatenated string of such values is specified compactly, using a period (".") to indicate a separation of characters within that value. Hence:</p> <pre> 340 CRLF = %d13.10 </pre> <div id="rfc.figure.u.5"></div> <p>ABNF permits the specification of literal text strings directly, enclosed in quotation marks. Hence:</p> <pre> 341 command = "command string" </pre> <p id="rfc.section.2.3.p.6">Literal text strings are interpreted as a concatenated set of printable characters.</p><p id="rfc.section.2.3.p.7"> </p><dl><dt>NOTE: </dt><dd>ABNF strings are case insensitive and the character set for these strings is US-ASCII.</dd></dl><div id="rfc.figure.u.6"></div> <p>Hence:</p> <pre> 342 rulename = "abc" </pre> <div id="rfc.figure.u.7"></div> <p>and:</p> <pre> 460 </pre> <p>respectively specify the decimal and hexadecimal representation of <a href="#US-ASCII"><cite title="Coded Character Set -- 7-bit American Standard Code for Information Interchange">[US-ASCII]</cite></a> for carriage return. 461 </p> 462 <div id="rfc.figure.u.4"></div> 463 <p>A concatenated string of such values is specified compactly, using a period (".") to indicate a separation of characters within 464 that value. Hence: 465 </p> <pre> 466 CRLF = %d13.10 </pre> <div id="rfc.figure.u.5"></div> 467 <p>ABNF permits the specification of literal text strings directly, enclosed in quotation marks. Hence:</p> <pre> 468 command = "command string" </pre> <p id="rfc.section.2.3.p.6">Literal text strings are interpreted as a concatenated set of printable characters.</p> 469 <p id="rfc.section.2.3.p.7"> </p> 470 <dl> 471 <dt>NOTE: </dt> 472 <dd>ABNF strings are case insensitive and the character set for these strings is US-ASCII.</dd> 473 </dl> 474 <div id="rfc.figure.u.6"></div> 475 <p>Hence:</p> <pre> 476 rulename = "abc" </pre> <div id="rfc.figure.u.7"></div> 477 <p>and:</p> <pre> 343 478 rulename = "aBc" 344 </pre> <p>will match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC", and "ABC".</p> <p id="rfc.section.2.3.p.10"> </p><dl class="empty"><dd>To specify a rule that is case sensitive, specify the characters individually.</dd></dl><div id="rfc.figure.u.8"></div> <p>For example:</p> <pre> 479 </pre> <p>will match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC", and "ABC".</p> 480 <p id="rfc.section.2.3.p.10"> </p> 481 <dl class="empty"> 482 <dd>To specify a rule that is case sensitive, specify the characters individually.</dd> 483 </dl> 484 <div id="rfc.figure.u.8"></div> 485 <p>For example:</p> <pre> 345 486 rulename = %d97 %d98 %d99 346 </pre> <div id="rfc.figure.u.9"></div> <p>or</p> <pre> 487 </pre> <div id="rfc.figure.u.9"></div> 488 <p>or</p> <pre> 347 489 rulename = %d97.98.99 348 </pre> <p>will match only the string that comprises only the lowercase characters, abc.</p> <h2 id="rfc.section.2.4"><a href="#rfc.section.2.4">2.4</a> External Encodings</h2><p id="rfc.section.2.4.p.1">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 <a href="#CORE" title="Core ABNF of ABNF">Appendix B</a> provides definitions for a 7-bit US-ASCII environment as has been common to much of the Internet.</p><p id="rfc.section.2.4.p.2">By separating external encoding from the syntax, it is intended that alternate encoding environments can be used for the same syntax.</p><hr class="noprint"><h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a> Operators</h1><h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> Concatenation: Rule1 Rule2</h2><p id="rfc.section.3.1.p.1">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:</p><div id="rfc.figure.u.10"></div> <pre> 490 </pre> <p>will match only the string that comprises only the lowercase characters, abc.</p> 491 <h2 id="rfc.section.2.4"><a href="#rfc.section.2.4">2.4</a> External Encodings 492 </h2> 493 <p id="rfc.section.2.4.p.1">External representations of terminal value characters will vary according to constraints in the storage or transmission environment. 494 Hence, the same ABNF-based grammar may have multiple external encodings, such as one for a 7-bit US-ASCII environment, another 495 for a binary octet environment, and still a different one when 16-bit Unicode is used. Encoding details are beyond the scope 496 of ABNF, although <a href="#CORE" title="Core ABNF of ABNF">Appendix B</a> provides definitions for a 7-bit US-ASCII environment as has been common to much of the Internet. 497 </p> 498 <p id="rfc.section.2.4.p.2">By separating external encoding from the syntax, it is intended that alternate encoding environments can be used for the same 499 syntax. 500 </p> 501 <hr class="noprint"> 502 <h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a> Operators 503 </h1> 504 <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> Concatenation: Rule1 Rule2 505 </h2> 506 <p id="rfc.section.3.1.p.1">A rule can define a simple, ordered string of values (i.e., a concatenation of contiguous characters) by listing a sequence 507 of rule names. For example: 508 </p> 509 <div id="rfc.figure.u.10"></div> <pre> 349 510 foo = %x61 ; a 350 511 351 512 bar = %x62 ; b 352 513 353 mumble = foo bar foo </pre> <p id="rfc.section.3.1.p.3">So that the rule <mumble> matches the lowercase string "aba".</p><p id="rfc.section.3.1.p.4">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.</p><p id="rfc.section.3.1.p.5">NOTE: </p><dl class="empty"><dd>This specification for ABNF does not provide for implicit specification of linear white space.</dd></dl><p id="rfc.section.3.1.p.6">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.</p><h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> <a id="Alternatives" href="#Alternatives">Alternatives: Rule1 / Rule2</a></h2><p id="rfc.section.3.2.p.1">Elements separated by a forward slash ("/") are alternatives. Therefore,</p><div id="rfc.figure.u.11"></div> <pre> 514 mumble = foo bar foo </pre> <p id="rfc.section.3.1.p.3">So that the rule <mumble> matches the lowercase string "aba".</p> 515 <p id="rfc.section.3.1.p.4">Linear white space: Concatenation is at the core of the ABNF parsing model. A string of contiguous characters (values) is 516 parsed according to the rules defined in ABNF. For Internet specifications, there is some history of permitting linear white 517 space (space and horizontal tab) to be freely and implicitly interspersed around major constructs, such as delimiting special 518 characters or atomic strings. 519 </p> 520 <p id="rfc.section.3.1.p.5">NOTE: </p> 521 <dl class="empty"> 522 <dd>This specification for ABNF does not provide for implicit specification of linear white space.</dd> 523 </dl> 524 <p id="rfc.section.3.1.p.6">Any grammar that wishes to permit linear white space around delimiters or string segments must specify it explicitly. It is 525 often useful to provide for such white space in "core" rules that are then used variously among higher-level rules. The "core" 526 rules might be formed into a lexical analyzer or simply be part of the main ruleset. 527 </p> 528 <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> <a id="Alternatives" href="#Alternatives">Alternatives: Rule1 / Rule2</a></h2> 529 <p id="rfc.section.3.2.p.1">Elements separated by a forward slash ("/") are alternatives. Therefore,</p> 530 <div id="rfc.figure.u.11"></div> <pre> 354 531 foo / bar 355 </pre> <p>will accept <foo> or <bar>.</p> <p id="rfc.section.3.2.p.3"> </p><dl><dt>NOTE: </dt><dd>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 lowercase.</dd></dl><h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> <a id="Incremental" href="#Incremental">Incremental Alternatives: Rule1 =/ Rule2</a></h2><p id="rfc.section.3.3.p.1">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 ruleset, such as often occurs with parameter lists. ABNF permits this incremental definition through the construct:</p><div id="rfc.figure.u.12"></div> <pre> 356 oldrule =/ additional-alternatives </pre> <div id="rfc.figure.u.13"></div> <p>So that the ruleset</p> <pre> 532 </pre> <p>will accept <foo> or <bar>.</p> 533 <p id="rfc.section.3.2.p.3"> </p> 534 <dl> 535 <dt>NOTE: </dt> 536 <dd>A quoted string containing alphabetic characters is a special form for specifying alternative characters and is interpreted 537 as a non-terminal representing the set of combinatorial strings with the contained characters, in the specified order but 538 with any mixture of upper- and lowercase. 539 </dd> 540 </dl> 541 <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> <a id="Incremental" href="#Incremental">Incremental Alternatives: Rule1 =/ Rule2</a></h2> 542 <p id="rfc.section.3.3.p.1">It is sometimes convenient to specify a list of alternatives in fragments. That is, an initial rule may match one or more 543 alternatives, with later rule definitions adding to the set of alternatives. This is particularly useful for otherwise independent 544 specifications that derive from the same parent ruleset, such as often occurs with parameter lists. ABNF permits this incremental 545 definition through the construct: 546 </p> 547 <div id="rfc.figure.u.12"></div> <pre> 548 oldrule =/ additional-alternatives </pre> <div id="rfc.figure.u.13"></div> 549 <p>So that the ruleset</p> <pre> 357 550 ruleset = alt1 / alt2 358 551 359 552 ruleset =/ alt3 360 553 361 ruleset =/ alt4 / alt5 </pre> <div id="rfc.figure.u.14"></div> <p>is the same as specifying</p> <pre> 362 ruleset = alt1 / alt2 / alt3 / alt4 / alt5 </pre> <h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a> <a id="Range" href="#Range">Value Range Alternatives: %c##-##</a></h2><div id="rfc.figure.u.15"></div> <p>A range of alternative numeric values can be specified compactly, using a dash ("-") to indicate the range of alternative values. Hence:</p> <pre> 363 DIGIT = %x30-39 </pre> <div id="rfc.figure.u.16"></div> <p>is equivalent to:</p> <pre> 554 ruleset =/ alt4 / alt5 </pre> <div id="rfc.figure.u.14"></div> 555 <p>is the same as specifying</p> <pre> 556 ruleset = alt1 / alt2 / alt3 / alt4 / alt5 </pre> <h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a> <a id="Range" href="#Range">Value Range Alternatives: %c##-##</a></h2> 557 <div id="rfc.figure.u.15"></div> 558 <p>A range of alternative numeric values can be specified compactly, using a dash ("-") to indicate the range of alternative 559 values. Hence: 560 </p> <pre> 561 DIGIT = %x30-39 </pre> <div id="rfc.figure.u.16"></div> 562 <p>is equivalent to:</p> <pre> 364 563 DIGIT = "0" / "1" / "2" / "3" / "4" / "5" / "6" / 365 564 366 "7" / "8" / "9" </pre> <div id="rfc.figure.u.17"></div> <p>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:</p> <pre> 367 char-line = %x0D.0A %x20-7E %x0D.0A </pre> <h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a> <a id="Sequence" href="#Sequence">Sequence Group: (Rule1 Rule2)</a></h2><div id="rfc.figure.u.18"></div> <p>Elements enclosed in parentheses are treated as a single element, whose contents are strictly ordered. Thus,</p> <pre> 565 "7" / "8" / "9" </pre> <div id="rfc.figure.u.17"></div> 566 <p>Concatenated numeric values and numeric value ranges cannot be specified in the same string. A numeric value may use the dotted 567 notation for concatenation or it may use the dash notation to specify one value range. Hence, to specify one printable character 568 between end-of-line sequences, the specification could be: 569 </p> <pre> 570 char-line = %x0D.0A %x20-7E %x0D.0A </pre> <h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a> <a id="Sequence" href="#Sequence">Sequence Group: (Rule1 Rule2)</a></h2> 571 <div id="rfc.figure.u.18"></div> 572 <p>Elements enclosed in parentheses are treated as a single element, whose contents are strictly ordered. Thus,</p> <pre> 368 573 elem (foo / bar) blat 369 </pre> <p>matches (elem foo blat) or (elem bar blat), and</p> <div id="rfc.figure.u.19"></div> <pre> 574 </pre> <p>matches (elem foo blat) or (elem bar blat), and</p> 575 <div id="rfc.figure.u.19"></div> <pre> 370 576 elem foo / bar blat 371 </pre> <p>matches (elem foo) or (bar blat).</p> <p id="rfc.section.3.5.p.3"> </p><dl><dt>NOTE: </dt><dd>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.</dd></dl><div id="rfc.figure.u.20"></div> <p>Hence, it is recommended that the following form be used:</p> <pre> 577 </pre> <p>matches (elem foo) or (bar blat).</p> 578 <p id="rfc.section.3.5.p.3"> </p> 579 <dl> 580 <dt>NOTE: </dt> 581 <dd>It is strongly advised that grouping notation be used, rather than relying on the proper reading of "bare" alternations, when 582 alternatives consist of multiple rule names or literals. 583 </dd> 584 </dl> 585 <div id="rfc.figure.u.20"></div> 586 <p>Hence, it is recommended that the following form be used:</p> <pre> 372 587 (elem foo) / (bar blat) 373 </pre> <p>It will avoid misinterpretation by casual readers.</p> <p id="rfc.section.3.5.p.5">The sequence group notation is also used within free text to set off an element sequence from the prose.</p><h2 id="rfc.section.3.6"><a href="#rfc.section.3.6">3.6</a> <a id="VarRep" href="#VarRep">Variable Repetition: *Rule</a></h2><div id="rfc.figure.u.21"></div> <p>The operator "*" preceding an element indicates repetition. The full form is:</p> <pre> 588 </pre> <p>It will avoid misinterpretation by casual readers.</p> 589 <p id="rfc.section.3.5.p.5">The sequence group notation is also used within free text to set off an element sequence from the prose.</p> 590 <h2 id="rfc.section.3.6"><a href="#rfc.section.3.6">3.6</a> <a id="VarRep" href="#VarRep">Variable Repetition: *Rule</a></h2> 591 <div id="rfc.figure.u.21"></div> 592 <p>The operator "*" preceding an element indicates repetition. The full form is:</p> <pre> 374 593 <a>*<b>element 375 </pre> <p>where <a> and <b> are optional decimal values, indicating at least <a> and at most <b> occurrences of the element.</p> <p id="rfc.section.3.6.p.2">Default values are 0 and infinity so that *<element> allows any number, including zero; 1*<element> requires at least one; 3*3<element> allows exactly 3; and 1*2<element> allows one or two.</p><h2 id="rfc.section.3.7"><a href="#rfc.section.3.7">3.7</a> <a id="SpecRep" href="#SpecRep">Specific Repetition: nRule</a></h2><div id="rfc.figure.u.22"></div> <p>A rule of the form:</p> <pre> 376 <n>element </pre> <div id="rfc.figure.u.23"></div> <p>is equivalent to</p> <pre> 377 <n>*<n>element </pre> <p id="rfc.section.3.7.p.3">That is, exactly <n> occurrences of <element>. Thus, 2DIGIT is a 2-digit number, and 3ALPHA is a string of three alphabetic characters.</p><h2 id="rfc.section.3.8"><a href="#rfc.section.3.8">3.8</a> <a id="OptSeq" href="#OptSeq">Optional Sequence: [RULE]</a></h2><div id="rfc.figure.u.24"></div> <p>Square brackets enclose an optional element sequence:</p> <pre> 378 [foo bar] </pre> <div id="rfc.figure.u.25"></div> <p>is equivalent to</p> <pre> 379 *1(foo bar). </pre> <h2 id="rfc.section.3.9"><a href="#rfc.section.3.9">3.9</a> <a id="Comment" href="#Comment">Comment: ; Comment</a></h2><p id="rfc.section.3.9.p.1">A semicolon starts a comment that continues to the end of line. This is a simple way of including useful notes in parallel with the specifications.</p><h2 id="rfc.section.3.10"><a href="#rfc.section.3.10">3.10</a> Operator Precedence</h2><p id="rfc.section.3.10.p.1">The various mechanisms described above have the following precedence, from highest (binding tightest) at the top, to lowest (loosest) at the bottom: </p><dl class="empty"><dd>Rule name, prose-val, Terminal value</dd><dd>Comment</dd><dd>Value range</dd><dd>Repetition</dd><dd>Grouping, Optional</dd><dd>Concatenation</dd><dd>Alternative</dd></dl><p id="rfc.section.3.10.p.2">Use of the alternative operator, freely mixed with concatenations, can be confusing.</p><p id="rfc.section.3.10.p.3"> </p><dl class="empty"><dd>Again, it is recommended that the grouping operator be used to make explicit concatenation groups.</dd></dl><hr class="noprint"><h1 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a> ABNF Definition of ABNF</h1><p id="rfc.section.4.p.1"> </p><dl><dt>NOTES:</dt><dd> <ol><li>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.</li><li>This syntax uses the rules provided in <a href="#CORE" title="Core ABNF of ABNF">Appendix B</a>.</li></ol> </dd></dl><div id="rfc.figure.u.26"></div> <pre class="inline"> 594 </pre> <p>where <a> and <b> are optional decimal values, indicating at least <a> and at most <b> occurrences of the element.</p> 595 <p id="rfc.section.3.6.p.2">Default values are 0 and infinity so that *<element> allows any number, including zero; 1*<element> requires at least one; 596 3*3<element> allows exactly 3; and 1*2<element> allows one or two. 597 </p> 598 <h2 id="rfc.section.3.7"><a href="#rfc.section.3.7">3.7</a> <a id="SpecRep" href="#SpecRep">Specific Repetition: nRule</a></h2> 599 <div id="rfc.figure.u.22"></div> 600 <p>A rule of the form:</p> <pre> 601 <n>element </pre> <div id="rfc.figure.u.23"></div> 602 <p>is equivalent to</p> <pre> 603 <n>*<n>element </pre> <p id="rfc.section.3.7.p.3">That is, exactly <n> occurrences of <element>. Thus, 2DIGIT is a 2-digit number, and 3ALPHA is a string of three alphabetic 604 characters. 605 </p> 606 <h2 id="rfc.section.3.8"><a href="#rfc.section.3.8">3.8</a> <a id="OptSeq" href="#OptSeq">Optional Sequence: [RULE]</a></h2> 607 <div id="rfc.figure.u.24"></div> 608 <p>Square brackets enclose an optional element sequence:</p> <pre> 609 [foo bar] </pre> <div id="rfc.figure.u.25"></div> 610 <p>is equivalent to</p> <pre> 611 *1(foo bar). </pre> <h2 id="rfc.section.3.9"><a href="#rfc.section.3.9">3.9</a> <a id="Comment" href="#Comment">Comment: ; Comment</a></h2> 612 <p id="rfc.section.3.9.p.1">A semicolon starts a comment that continues to the end of line. This is a simple way of including useful notes in parallel 613 with the specifications. 614 </p> 615 <h2 id="rfc.section.3.10"><a href="#rfc.section.3.10">3.10</a> Operator Precedence 616 </h2> 617 <p id="rfc.section.3.10.p.1">The various mechanisms described above have the following precedence, from highest (binding tightest) at the top, to lowest 618 (loosest) at the bottom: 619 </p> 620 <dl class="empty"> 621 <dd>Rule name, prose-val, Terminal value</dd> 622 <dd>Comment</dd> 623 <dd>Value range</dd> 624 <dd>Repetition</dd> 625 <dd>Grouping, Optional</dd> 626 <dd>Concatenation</dd> 627 <dd>Alternative</dd> 628 </dl> 629 <p id="rfc.section.3.10.p.2">Use of the alternative operator, freely mixed with concatenations, can be confusing.</p> 630 <p id="rfc.section.3.10.p.3"> </p> 631 <dl class="empty"> 632 <dd>Again, it is recommended that the grouping operator be used to make explicit concatenation groups.</dd> 633 </dl> 634 <hr class="noprint"> 635 <h1 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a> ABNF Definition of ABNF 636 </h1> 637 <p id="rfc.section.4.p.1"> </p> 638 <dl> 639 <dt>NOTES:</dt> 640 <dd> 641 <ol> 642 <li>This syntax requires a formatting of rules that is relatively strict. Hence, the version of a ruleset included in a specification 643 might need preprocessing to ensure that it can be interpreted by an ABNF parser. 644 </li> 645 <li>This syntax uses the rules provided in <a href="#CORE" title="Core ABNF of ABNF">Appendix B</a>. 646 </li> 647 </ol> 648 </dd> 649 </dl> 650 <div id="rfc.figure.u.26"></div> <pre class="inline"> 380 651 rulelist = 1*( rule / (*c-wsp c-nl) ) 381 652 … … 439 710 ; without angles 440 711 ; prose description, to be used as 441 ; last resort </pre> <hr class="noprint"><h1 id="rfc.section.5" class="np"><a href="#rfc.section.5">5.</a> Security Considerations</h1><p id="rfc.section.5.p.1">Security is truly believed to be irrelevant to this document.</p><hr class="noprint"><h1 id="rfc.references" class="np"><a id="rfc.section.6" href="#rfc.section.6">6.</a> References</h1><h2 class="np" id="rfc.references.1"><a href="#rfc.section.6.1" id="rfc.section.6.1">6.1</a> Normative References</h2><table summary="Normative References"> <tr><td class="reference"><b id="US-ASCII">[US-ASCII]</b></td><td class="top">American National Standards 442 Institute, “Coded Character Set -- 7-bit American Standard Code for 443 Information Interchange”, ANSI X3.4, 1986.</td></tr></table><h2 id="rfc.references.2"><a href="#rfc.section.6.2" id="rfc.section.6.2">6.2</a> Informative References</h2><table summary="Informative References"> <tr><td class="reference"><b id="RFC733">[RFC733]</b></td><td class="top"><a href="mailto:DCrocker@Rand-Unix" title="The Rand Corporation, Information Sciences
 Department">Crocker, D.</a>, <a href="mailto:Vittal@BBN-TenexD" title="Bolt Beranek and Newman Inc. (BBN)">Vittal, J.</a>, <a href="mailto:Pogran@MIT-Multics" title="Massachusets Institute of Technology (MIT),
 Laboratory for Computer Science">Pogran, K.</a>, and <a href="mailto:Henderson@BBN-TenexD" title="Bolt Beranek and Newman Inc. (BBN)">D. Henderson</a>, “<a href="http://tools.ietf.org/html/rfc733">Standard for the format of ARPA network text messages</a>”, RFC 733, November 1977.</td></tr><tr><td class="reference"><b id="RFC822">[RFC822]</b></td><td class="top"><a href="mailto:DCrocker@UDel-Relay" title="University of Delaware, Dept. of Electrical
 Engineering">Crocker, D.H.</a>, “<a href="http://tools.ietf.org/html/rfc822">Standard for the format of ARPA Internet text messages</a>”, STD 11, RFC 822, August 1982.</td></tr></table><hr class="noprint"><h1 id="rfc.authors" class="np"><a href="#rfc.authors">Authors' Addresses</a></h1><address class="vcard"><span class="vcardline"><span class="fn">Dave Crocker</span> 444 (editor) 445 <span class="n hidden"><span class="family-name">Crocker</span><span class="given-name">Dave</span></span></span><span class="org vcardline">Brandenburg InternetWorking</span><span class="adr"><span class="street-address vcardline">675 Spruce Dr.</span><span class="vcardline"><span class="locality">Sunnyvale</span>, <span class="region">CA</span> <span class="postal-code">94086</span></span><span class="country-name vcardline">US</span></span><span class="vcardline tel">Phone: <a href="tel:+1.408.246.8253"><span class="value">+1.408.246.8253</span></a></span><span class="vcardline">EMail: <a href="mailto:dcrocker@bbiw.net"><span class="email">dcrocker@bbiw.net</span></a></span></address><address class="vcard"><span class="vcardline"><span class="fn">Paul Overell</span><span class="n hidden"><span class="family-name">Overell</span><span class="given-name">Paul</span></span></span><span class="org vcardline">THUS plc.</span><span class="adr"><span class="street-address vcardline">1/2 Berkeley Square, </span><span class="street-address vcardline">99 Berkeley Street</span><span class="vcardline"><span class="locality">Glasgow</span>, <span class="postal-code">G3 7HR</span></span><span class="country-name vcardline">UK</span></span><span class="vcardline">EMail: <a href="mailto:paul.overell@thus.net"><span class="email">paul.overell@thus.net</span></a></span></address><hr class="noprint"><h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a> Acknowledgements</h1><p id="rfc.section.A.p.1">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.</p><p id="rfc.section.A.p.2">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.</p><p id="rfc.section.A.p.3">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.</p><p id="rfc.section.A.p.4">Julian Reschke warrants a special thanks for converting the Draft Standard version to XML source form.</p><hr class="noprint"><h1 id="rfc.section.B" class="np"><a href="#rfc.section.B">B.</a> <a id="CORE" href="#CORE">Core ABNF of ABNF</a></h1><p id="rfc.section.B.p.1">This appendix contains some basic rules that are in common use. Basic rules are in uppercase. Note that these rules are only valid for ABNF encoded in 7-bit ASCII or in characters sets that are a superset of 7-bit ASCII.</p><h2 id="rfc.section.B.1"><a href="#rfc.section.B.1">B.1</a> Core Rules</h2><p id="rfc.section.B.1.p.1">Certain basic rules are in uppercase, such as SP, HTAB, CRLF, DIGIT, ALPHA, etc.</p><div id="rfc.figure.u.27"></div> <pre class="inline"> 712 ; last resort </pre> <hr class="noprint"> 713 <h1 id="rfc.section.5" class="np"><a href="#rfc.section.5">5.</a> Security Considerations 714 </h1> 715 <p id="rfc.section.5.p.1">Security is truly believed to be irrelevant to this document.</p> 716 <hr class="noprint"> 717 <h1 id="rfc.references" class="np"><a id="rfc.section.6" href="#rfc.section.6">6.</a> References 718 </h1> 719 <h2 class="np" id="rfc.references.1"><a href="#rfc.section.6.1" id="rfc.section.6.1">6.1</a> Normative References 720 </h2> 721 <table summary="Normative References"> 722 <tr> 723 <td class="reference"><b id="US-ASCII">[US-ASCII]</b></td> 724 <td class="top">American National Standards 725 Institute, “Coded Character Set -- 7-bit American Standard Code for Information Interchange”, ANSI X3.4, 1986. 726 </td> 727 </tr> 728 </table> 729 <h2 id="rfc.references.2"><a href="#rfc.section.6.2" id="rfc.section.6.2">6.2</a> Informative References 730 </h2> 731 <table summary="Informative References"> 732 <tr> 733 <td class="reference"><b id="RFC733">[RFC733]</b></td> 734 <td class="top"><a href="mailto:DCrocker@Rand-Unix" title="The Rand Corporation, Information Sciences
 Department">Crocker, D.</a>, <a href="mailto:Vittal@BBN-TenexD" title="Bolt Beranek and Newman Inc. (BBN)">Vittal, J.</a>, <a href="mailto:Pogran@MIT-Multics" title="Massachusets Institute of Technology (MIT),
 Laboratory for Computer Science">Pogran, K.</a>, and <a href="mailto:Henderson@BBN-TenexD" title="Bolt Beranek and Newman Inc. (BBN)">D. Henderson</a>, “<a href="http://tools.ietf.org/html/rfc733">Standard for the format of ARPA network text messages</a>”, RFC 733, November 1977. 735 </td> 736 </tr> 737 <tr> 738 <td class="reference"><b id="RFC822">[RFC822]</b></td> 739 <td class="top"><a href="mailto:DCrocker@UDel-Relay" title="University of Delaware, Dept. of Electrical
 Engineering">Crocker, D.H.</a>, “<a href="http://tools.ietf.org/html/rfc822">Standard for the format of ARPA Internet text messages</a>”, STD 11, RFC 822, August 1982. 740 </td> 741 </tr> 742 </table> 743 <hr class="noprint"> 744 <h1 id="rfc.authors" class="np"><a href="#rfc.authors">Authors' Addresses</a></h1> 745 <address class="vcard"><span class="vcardline"><span class="fn">Dave Crocker</span> 746 (editor) 747 <span class="n hidden"><span class="family-name">Crocker</span><span class="given-name">Dave</span></span></span><span class="org vcardline">Brandenburg InternetWorking</span><span class="adr"><span class="street-address vcardline">675 Spruce Dr.</span><span class="vcardline"><span class="locality">Sunnyvale</span>, <span class="region">CA</span> <span class="postal-code">94086</span></span><span class="country-name vcardline">US</span></span><span class="vcardline tel">Phone: <a href="tel:+1.408.246.8253"><span class="value">+1.408.246.8253</span></a></span><span class="vcardline">Email: <a href="mailto:dcrocker@bbiw.net"><span class="email">dcrocker@bbiw.net</span></a></span></address> 748 <address class="vcard"><span class="vcardline"><span class="fn">Paul Overell</span><span class="n hidden"><span class="family-name">Overell</span><span class="given-name">Paul</span></span></span><span class="org vcardline">THUS plc.</span><span class="adr"><span class="street-address vcardline">1/2 Berkeley Square, </span><span class="street-address vcardline">99 Berkeley Street</span><span class="vcardline"><span class="locality">Glasgow</span>, <span class="postal-code">G3 7HR</span></span><span class="country-name vcardline">UK</span></span><span class="vcardline">Email: <a href="mailto:paul.overell@thus.net"><span class="email">paul.overell@thus.net</span></a></span></address> 749 <hr class="noprint"> 750 <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a> Acknowledgements 751 </h1> 752 <p id="rfc.section.A.p.1">The syntax for ABNF was originally specified in RFC 733. Ken L. Harrenstien, of SRI International, was responsible for re-coding 753 the BNF into an Augmented BNF that makes the representation smaller and easier to understand. 754 </p> 755 <p id="rfc.section.A.p.2">This recent project began as a simple effort to cull out the portion of RFC 822 that has been repeatedly cited by non-email 756 specification writers, namely the description of Augmented BNF. Rather than simply and blindly converting the existing text 757 into a separate document, the working group chose to give careful consideration to the deficiencies, as well as benefits, 758 of the existing specification and related specifications made available over the last 15 years, and therefore to pursue enhancement. 759 This turned the project into something rather more ambitious than was first intended. Interestingly, the result is not massively 760 different from that original, although decisions, such as removing the list notation, came as a surprise. 761 </p> 762 <p id="rfc.section.A.p.3">This "separated" version of the specification was part of the DRUMS working group, with significant contributions from Jerome 763 Abela, Harald Alvestrand, Robert Elz, Roger Fajman, Aviva Garrett, Tom Harsch, Dan Kohn, Bill McQuillan, Keith Moore, Chris 764 Newman, Pete Resnick, and Henning Schulzrinne. 765 </p> 766 <p id="rfc.section.A.p.4">Julian Reschke warrants a special thanks for converting the Draft Standard version to XML source form.</p> 767 <hr class="noprint"> 768 <h1 id="rfc.section.B" class="np"><a href="#rfc.section.B">B.</a> <a id="CORE" href="#CORE">Core ABNF of ABNF</a></h1> 769 <p id="rfc.section.B.p.1">This appendix contains some basic rules that are in common use. Basic rules are in uppercase. Note that these rules are only 770 valid for ABNF encoded in 7-bit ASCII or in characters sets that are a superset of 7-bit ASCII. 771 </p> 772 <h2 id="rfc.section.B.1"><a href="#rfc.section.B.1">B.1</a> Core Rules 773 </h2> 774 <p id="rfc.section.B.1.p.1">Certain basic rules are in uppercase, such as SP, HTAB, CRLF, DIGIT, ALPHA, etc.</p> 775 <div id="rfc.figure.u.27"></div> <pre class="inline"> 446 776 ALPHA = %x41-5A / %x61-7A ; A-Z / a-z 447 777 … … 495 825 496 826 WSP = SP / HTAB 497 ; white space </pre> <h2 id="rfc.section.B.2"><a href="#rfc.section.B.2">B.2</a> Common Encoding</h2><p id="rfc.section.B.2.p.1">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.</p><h1><a id="rfc.copyright" href="#rfc.copyright">Full Copyright Statement</a></h1><p>This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.</p><p>This document and the information contained herein are provided on an “AS IS” basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</p><hr class="noprint"><h1 class="np"><a id="rfc.ipr" href="#rfc.ipr">Intellectual Property</a></h1><p>The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.</p><p>Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at <<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>>.</p><p>The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at <a href="mailto:ietf-ipr@ietf.org">ietf-ipr@ietf.org</a>.</p></body></html> 827 ; white space </pre> <h2 id="rfc.section.B.2"><a href="#rfc.section.B.2">B.2</a> Common Encoding 828 </h2> 829 <p id="rfc.section.B.2.p.1">Externally, data are represented as "network virtual ASCII" (namely, 7-bit US-ASCII in an 8-bit field), with the high (8th) 830 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 831 side and are sent over the network first. 832 </p> 833 <h1><a id="rfc.copyright" href="#rfc.copyright">Full Copyright Statement</a></h1> 834 <p>This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the 835 authors retain all their rights. 836 </p> 837 <p>This document and the information contained herein are provided on an “AS IS” basis and THE CONTRIBUTOR, THE ORGANIZATION 838 HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE 839 DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN 840 WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 841 </p> 842 <hr class="noprint"> 843 <h1 class="np"><a id="rfc.ipr" href="#rfc.ipr">Intellectual Property</a></h1> 844 <p>The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might 845 be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any 846 license under such rights might or might not be available; nor does it represent that it has made any independent effort to 847 identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and 848 BCP 79. 849 </p> 850 <p>Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result 851 of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users 852 of this specification can be obtained from the IETF on-line IPR repository at <<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>>. 853 </p> 854 <p>The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary 855 rights that may cover technology that may be required to implement this standard. Please address the information to the IETF 856 at <a href="mailto:ietf-ipr@ietf.org">ietf-ipr@ietf.org</a>. 857 </p> 858 </body> 859 </html>
Note: See TracChangeset
for help on using the changeset viewer.