idnits 2.17.1 draft-kyzivat-case-sensitive-abnf-01.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 (August 18, 2014) is 3532 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) August 18, 2014 5 Intended status: Standards Track 6 Expires: February 19, 2015 8 Case-Sensitive String Support in ABNF 9 draft-kyzivat-case-sensitive-abnf-01 11 Abstract 13 This document extends the base definition of ABNF (Augmented Mackus- 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 February 19, 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 Mackus-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 If no prefix is present then the string is case-insensitive. 113 Hence: 115 rulename = %i"aBc" 117 and: 119 rulename = "abc" 121 will both match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC", and 122 "ABC". 124 In contrast: 126 rulename = %s"aBc" 128 will match only "aBc", and will not match "abc", "Abc", "abC", "ABc", 129 "aBC", "AbC", or "ABC". 131 The way that has been used in the past to define a rule that is case 132 sensitive is to specify the individual characters numerically. 134 For example: 136 rulename = %d97 %d98 %d99 138 or 140 rulename = %x61.62.63 142 will match only the string that comprises only the lowercase 143 characters, abc. This mechanism has a clear readability 144 disadvantage, with respect to using a literal text string with a 145 prefix, and new the prefix mechanism is preferred. 147 2.2. ABNF Definition of ABNF - char-val 149 char-val = case-insensitive-string / 150 case-sensitive-string 152 case-insensitive-string = 153 [ "%i" ] quoted-string 155 case-sensitive-string = 156 "%s" quoted-string 158 quoted-string = DQUOTE *(%x20-21 / %x23-7E) DQUOTE 159 ; quoted string of SP and VCHAR 160 ; without DQUOTE 162 3. IANA Considerations 164 This memo includes no request to IANA. 166 4. Security Considerations 168 Security is truly believed to be irrelevant to this document. 170 5. Normative References 172 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 173 Specifications: ABNF", STD 68, RFC 5234, January 2008. 175 Author's Address 177 Paul Kyzivat 178 Massachusetts 179 US 181 Email: pkyzivat@alum.mit.edu