Subject: [netmod] [Technical Errata Reported] RFC6020 (4285)

From: RFC Errata System <[email-masked]>
Date: Mon, 2 Mar 2015 13:18:08 -0800 (PST)

The following errata report has been submitted for RFC6020,
"YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)".

--------------------------------------
You may review the report below and at:
http://www.rfc-editor.org/errata_search.php?rfc=6020&eid=4285

--------------------------------------
Type: Technical
Reported by: Cesar Crusius <[email-masked]>

Section: 12

Original Text
-------------
revision-date-stmt = revision-date-keyword sep revision-date stmtend

Corrected Text
--------------
revision-date-stmt =
    revision-date-keyword sep revision-date optsep stmtend

Notes
-----
Allow spaces between the date string and the statement's end.

Instructions:
-------------
This erratum is currently posted as "Reported". If necessary, please
use "Reply All" to discuss whether it should be verified or
rejected. When a decision is reached, the verifying party (IESG)
can log in to change the status and edit the report, if necessary. 

--------------------------------------
RFC6020 (draft-ietf-netmod-yang-13)
--------------------------------------
Title               : YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)
Publication Date    : October 2010
Author(s)           : M. Bjorklund, Ed.
Category            : PROPOSED STANDARD
Source              : NETCONF Data Modeling Language
Area                : Operations and Management
Stream              : IETF
Verifying Party     : IESG

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 03 Mar 2015 09:05:31 +0100 (CET)

Hi,

The reported errata is correct.  But there is a bigger issue - maybe
half of all usages of "stmtend" are preceded by "optsep" while the
rest are not.  Since whitespace should always be allowed before
stmtend I suggest another fix:

OLD:

   stmtend             = ";" / "{" *unknown-statement "}"

NEW:

   stmtend             = optsep (";" / "{" *unknown-statement "}")

Combined with errata 4283 this would be:

   stmtend             = optsep (";" / "{" stmtsep "}")

Now, we already have rules like this:

   namespace-stmt      = namespace-keyword sep uri-str optsep stmtend

Together with the proposed new rule for "stmtend" this looks a bit
confusing (two consecutive "optsep"s), but it is technically correct,
and makes the errata smaller.

I also suggest that in 6020bis, we introduce this new rule for
"stmtend", but remove all redundant "optsep"s.

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 03 Mar 2015 11:10:47 +0100

>    stmtend             = optsep (";" / "{" stmtsep "}")

Hmm, but that means it is possible to use "{}" instead of a colon. Is it
reasonable?

> "stmtend", but remove all redundant "optsep"s.

+1

Lada

> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 03 Mar 2015 11:44:06 +0100 (CET)

> Hmm, but that means it is possible to use "{}" instead of a colon. Is it

Sure, and this is possible already today.

/martin

---

From: "Cesar Crusius (ccrusius)" <[email-masked]>
Date: Tue, 3 Mar 2015 17:01:29 +0000

Hi,

I agree with that, and if the goal is to simplify space handling, I would
also add add a "stmtsep" to the end of "stmtend," which would allow the
removal of a lot of "stmtsep"s in the syntax (stmtends are usually
followed by stmtsep, and when they are not it is usually an error).

   stmtend             = optsep (";" / "{" stmtsep "}") stmtsep

Best,

- Cesar

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 04 Mar 2015 10:45:27 +0100 (CET)

[Pruning Cc, changing subject]

>    stmtend             = optsep (";" / "{" stmtsep "}") stmtsep

Yes this makes sense.  It means that stmtsep needs to be added to
quite a few rules, such as:

argument-stmt       = argument-keyword sep identifier-arg-str optsep
                      (";" /
                       "{" stmtsep
                           [yin-element-stmt]
                       "}") stmtsep
                            ^^^^^^^  ADDED

But this is still better and somewhat less error-prone than before.

I will include this change (and the others) in the next revision (to
be published before monday); please review!

/martin

---

From: Benoit Claise <[email-masked]>
Date: Fri, 06 Mar 2015 14:38:22 +0100

Cesar,

Provide me the exact new text, and I'll cut and paste in the errata.

Regards, Benoit

---

From: "Cesar Crusius (ccrusius)" <[email-masked]>
Date: Fri, 6 Mar 2015 16:24:54 +0000

Hi Benoit,

4285 can be discarded with the new text for 4283. In 4283, there is both a
new replacement text, and a bigger note:

Section 12 says:

It should say:

Notes:2

   The original "stmtend" rule does not allow for spaces between unknown
statements,
   which requires the "*unknown-statement" fix in "stmtend".

   There is at least one place ("revision-date-stmt") where "stmtend" end
is not
   preceded by "optsep". Instead of fixing those rules, it is better to
include
   "optsep" in "stmtend" itself, since it should always be present.

   On the same note, almost all "stmtend" uses are followed by a
"stmtsep", and any cases
   where that does not happen are probably an error, so again it is better
to make that
   explicit in the "stmtend" rule itself.

   With the change in this errata, there will be a lot of rules in the
ABNF with redundant
   (but not technically incorrect) "optsep" and "stmtsep" parts, as for
example

      module-header-stmts = ;; these stmts can appear in any order
                            [yang-version-stmt stmtsep]
                            namespace-stmt stmtsep
                            prefix-stmt stmtsep

   which now could be replaced with

      module-header-stmts = ;; these stmts can appear in any order
                            [yang-version-stmt]
                            namespace-stmt
                            prefix-stmt

      namespace-stmt = namespace-keyword sep uri-str stmtend

   These changes should probably be incorporated into the next ABNF
revision.

Best,

- Cesar

On 3/6/15, 5:38 AM, "Benoit Claise (bclaise)" <[email-masked]> wrote:

>>>> "YANG - A Data Modeling Language for the Network Configuration
>>>>Protocol
>>>> (NETCONF)".
>>>>

---

From: "Cesar Crusius (ccrusius)" <[email-masked]>
Date: Fri, 6 Mar 2015 16:37:52 +0000

On 3/4/15, 1:45 AM, "Martin Bjorklund" <[email-masked]> wrote:

>                       "}") stmts.

Actually, that rule does not need to change. It is used only in
"extension-stmt", and in there it is already followed by a "stmtsep". Some
fine-tooth combing is needed to see if any "stmtsep"s really need to be
added, and which ones can be removed.

If one has the stomach, a perhaps safer way would be to introduce new rules

   colon-end = optsep ";" stmtsep
   open-brace = optsep "{" stmtsep
   close-brace = "}" stmtsep

(maybe with different names), and replace uses of ";", "{", and "}"
throughout. This, together with the new "stmtend" rule, should reduce the
number of optsep/stmtsep to almost zero, and make the grammar more
consistent.

Best,

- Cesar

---

From: Martin Bjorklund <[email-masked]>
Date: Fri, 06 Mar 2015 21:58:23 +0100 (CET)

> added, and which ones can be removed.

Sorry, I should have included the updated usage of argument-stmt as
well; the complete rule is now:

extension-stmt      = extension-keyword sep identifier-arg-str optsep
                      (";" /
                       "{" stmtsep
                           ;; these stmts can appear in any order
                           [argument-stmt]
                           [status-stmt]
                           [description-stmt]
                           [reference-stmt]
                       "}") stmtsep

>    close-brace = "}" stmtsep

Yes I was thinking about that, but I thought the current style is more
clear.  But maybe this is a better approach.

/martin