idnits 2.17.1 draft-kyzivat-case-sensitive-abnf-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC5234, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC5234, updated by this document, for RFC5378 checks: 2007-04-24) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (September 10, 2014) is 3478 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force P. Kyzivat 3 Internet-Draft 4 Updates: 5234 (if approved) September 10, 2014 5 Intended status: Standards Track 6 Expires: March 14, 2015 8 Case-Sensitive String Support in ABNF 9 draft-kyzivat-case-sensitive-abnf-02 11 Abstract 13 This document extends the base definition of ABNF (Augmented Backus- 14 Naur Form) to include a way to specify ASCII string literals that are 15 matched in a case-sensitive manner. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at http://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on March 14, 2015. 34 Copyright Notice 36 Copyright (c) 2014 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 2. Updates to RFC5234 . . . . . . . . . . . . . . . . . . . . . 2 53 2.1. Terminal values - literal text strings . . . . . . . . . 2 54 2.2. ABNF Definition of ABNF - char-val . . . . . . . . . . . 4 55 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 56 4. Security Considerations . . . . . . . . . . . . . . . . . . . 4 57 5. Normative References . . . . . . . . . . . . . . . . . . . . 4 58 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 4 60 1. Introduction 62 The base definition of ABNF (Augmented Backus-Naur Form) supports 63 ASCII string literals. Matching of these literals is done in a case- 64 insensitive manner. While this is often the desired behavior, in 65 some situations case-sensitive matching of string literals is needed. 66 Literals for case-sensitive matching must be specified using the 67 numeric representation of those characters. That is inconvenient and 68 error prone both to write and to read. 70 This document extends ABNF to have two different types of ASCII 71 string literals. One type is matched using case-sensitive matching, 72 while the other is matched using case-insensitive matching. These 73 types are denoted using type prefixes, similar to the type prefixes 74 used with numeric values. If no prefix is used, then case- 75 insensitive matching is used, consistent with previous behavior. 77 This document is structured as a set of changes to the full ABNF 78 specification [RFC5234]. 80 2. Updates to RFC5234 82 This document makes changes to two parts of RFC5234. The two changes 83 are: 85 o Replace the last half of section 2.3 of RFC5234 (beginning with 86 "ABNF permits the specification of literal text strings") with the 87 contents of Section 2.1 below. 89 o Replace the rule in section 4 of RFC5234 with the 90 contents of Section 2.2 below. 92 2.1. Terminal values - literal text strings 94 ABNF permits the specification of literal text strings directly, 95 enclosed in quotation marks. Hence: 97 command = "command string" 99 Literal text strings are interpreted as a concatenated set of 100 printable characters. The character set for these strings is US- 101 ASCII. 103 Literal text strings in ABNF may be either case sensitive or case 104 insensitive. The form of matching used with a literal text string is 105 denoted by a prefix to the quoted string. The following prefixes are 106 allowed: 108 %s = case-sensitive 109 %i = case-insensitive 111 To be consistent with prior implementations of ABNF, having no prefix 112 means that the string is case-insensitive, and is equivalent to 113 having the "%i" prefix. 115 Hence: 117 rulename = %i"aBc" 119 and: 121 rulename = "abc" 123 will both match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC", and 124 "ABC". 126 In contrast: 128 rulename = %s"aBc" 130 will match only "aBc", and will not match "abc", "Abc", "abC", "ABc", 131 "aBC", "AbC", or "ABC". 133 The way that has been used in the past to define a rule that is case 134 sensitive is to specify the individual characters numerically. 136 For example: 138 rulename = %d97 %d98 %d99 140 or 142 rulename = %x61.62.63 144 will match only the string that comprises only the lowercase 145 characters, abc. The new way (using a literal text string with a 146 prefix) has a clear readability advantage over the old way. 148 2.2. ABNF Definition of ABNF - char-val 150 char-val = case-insensitive-string / 151 case-sensitive-string 153 case-insensitive-string = 154 [ "%i" ] quoted-string 156 case-sensitive-string = 157 "%s" quoted-string 159 quoted-string = DQUOTE *(%x20-21 / %x23-7E) DQUOTE 160 ; quoted string of SP and VCHAR 161 ; without DQUOTE 163 3. IANA Considerations 165 This memo includes no request to IANA. 167 4. Security Considerations 169 Security is truly believed to be irrelevant to this document. 171 5. Normative References 173 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 174 Specifications: ABNF", STD 68, RFC 5234, January 2008. 176 Author's Address 178 Paul Kyzivat 179 Massachusetts 180 US 182 Email: pkyzivat@alum.mit.edu