Re: [netmod] whitespace stripping

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Fri, 09 January 2015 10:34 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8C5201A8743 for <netmod@ietfa.amsl.com>; Fri, 9 Jan 2015 02:34:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.56
X-Spam-Level:
X-Spam-Status: No, score=-1.56 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 016JPeJzNrs0 for <netmod@ietfa.amsl.com>; Fri, 9 Jan 2015 02:34:41 -0800 (PST)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CF1431A8742 for <netmod@ietf.org>; Fri, 9 Jan 2015 02:34:40 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id 990166F4; Fri, 9 Jan 2015 11:34:39 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.220]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id sYp9ExTIbt-f; Fri, 9 Jan 2015 11:34:32 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Fri, 9 Jan 2015 11:34:38 +0100 (CET)
Received: from localhost (demetrius3.jacobs-university.de [212.201.44.48]) by hermes.jacobs-university.de (Postfix) with ESMTP id D5E022002C; Fri, 9 Jan 2015 11:34:38 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius3.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id kPZPx0Mciz9Y; Fri, 9 Jan 2015 11:34:37 +0100 (CET)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 74F7A2002F; Fri, 9 Jan 2015 11:34:37 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id 5FC313053E4B; Fri, 9 Jan 2015 11:34:39 +0100 (CET)
Date: Fri, 09 Jan 2015 11:34:38 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Ladislav Lhotka <lhotka@nic.cz>
Message-ID: <20150109103438.GA19947@elstar.local>
Mail-Followup-To: Ladislav Lhotka <lhotka@nic.cz>, NETMOD Working Group <netmod@ietf.org>
References: <F7BAD819-9874-40BF-91C9-DFF44F1A0728@nic.cz>
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <F7BAD819-9874-40BF-91C9-DFF44F1A0728@nic.cz>
User-Agent: Mutt/1.4.2.3i
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/icz5SpgmxeMiUu4Z2_SK7dsXixA>
Cc: NETMOD Working Group <netmod@ietf.org>
Subject: Re: [netmod] whitespace stripping
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Jan 2015 10:34:42 -0000

We are supposed to be done in March with YANG 1.1. This is not the
time to add new issues unless they are bug fixes.

I do not think this is a bug fix.

/js

On Fri, Jan 09, 2015 at 11:25:57AM +0100, Ladislav Lhotka wrote:
> Hi,
> 
> YANG has this peculiar rule for double-quoted strings:
> 
>    If the double-quoted string contains a line break followed by space
>    or tab characters that are used to indent the text according to the
>    layout in the YANG file, this leading whitespace is stripped from the
>    string, up to and including the column of the double quote character,
>    or to the first non-whitespace character, whichever occurs first.  In
>    this process, a tab character is treated as 8 space characters.
> 
> As I recently found out, this kind of whitespace stripping is difficult to implement with some standard parser libraries because the parser has to be able to get the column of the opening double quote. And even if it is possible, it slows down parsing.
> 
> The existing practice shows such multi-line strings are only used in descriptions and references where whitespace stripping is not needed at all - e.g., for translation to YIN format such strings have to be re-formatted anyway. In all other cases it is IMO much better to use concatenation
> 
>   "..."
> + "..."
> 
> So I’d suggest to remove whitespace stripping in YANG 1.1, for the benefit of parsers and the spec itself.
> 
> Lada
> 
> --
> Ladislav Lhotka, CZ.NIC Labs
> PGP Key ID: E74E8C0C
> 
> 
> 
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>