Subject: [netmod] canonical order

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 6 Dec 2012 10:21:15 +0100

Hi,

RFC 6020 says in Sec. 12:

"The ABNF grammar [RFC5234] defines the canonical order."

Does this also include the order of top level nodes as specified in the ABNF production "body-stmts"?
For instance, in the canonical order, should typedefs and groupings come before data definition statements?

Lada

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

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 06 Dec 2012 10:41:23 +0100 (CET)

> come before data definition statements?

No, since the ABNF defines this as:

   body-stmts          = *((extension-stmt /
                            feature-stmt /
                            identity-stmt /
                            typedef-stmt /
                            grouping-stmt /
                            data-def-stmt /
                            augment-stmt /
                            rpc-stmt /
                            notification-stmt /
                            deviation-stmt) stmtsep)

I.e., the grammar explicitly allows any order.

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 6 Dec 2012 10:48:22 +0100

> I.e., the grammar explicitly allows any order.

Yet this is probably the level where a canonical ordering is most important because the items are most spread apart. For instance, if one is looking for a typedef in a module, it would be good to know that it is supposed to be somewhere near the beginning of the module.

Lada