On 14/10/2015 18:14, Martin Bjorklund wrote:
Robert Wilton <[email protected]> wrote:
Hi Martin,

I was looking at the YANG ABNF grammar a bit more last night (to see
how hard it would be to write a parser for it) and I had a couple more
observations.  Apologies that this is after the WG last call ...

1. [Trivial] The indentation of the range statement in 9.3.5 looks
wrong.

9.3.5. Usage Example

      typedef my-decimal {
        type decimal64 {
          fraction-digits 2;
            range "1 .. 3.14 | 10 | 20..max";
        }
      }


I presume that it should be:

9.3.5. Usage Example

      typedef my-decimal {
        type decimal64 {
          fraction-digits 2;
          range "1 .. 3.14 | 10 | 20..max";
        }
      }
Fixed.

2.  The description of yang-char (around page 186) doesn't seem to be
quite accurate (relative to description of legal characters in 6. YANG
Syntax), and given that it excludes character values outside the
unicode range.
Hmm, which characters are outside the unicode range?
I was thinking of anything above 0xFFFF, but it looks like my definition (and possibly quite a few others on the Internet) of Unicode vs UTF-16 is out of date.


    ;; any Unicode character including tab, carriage return, and line
    ;; feed, but excluding the other C0 control characters, the surrogate
    ;; blocks, and the noncharacters.
    yang-char = %x9 / %xA / %xD / %x20-D7FF /
    ...


Should this be:

    ;; any Unicode or IOS/IEC 10646 character including tab, carriage return,
    ;; and line
    ;; feed, but excluding the other C0 control characters, the surrogate
    ;; blocks, and the noncharacters.
    yang-char = %x9 / %xA / %xD / %x20-D7FF /
I think this would be ok.

3. There are lots of comments where "these stmts can appear in any
order", e.g.

    linkageStmts       = ;; these stmts can appear in any order
                          *importStmt
                          *includeStmt

Am I right in interpreting that there can be any number of import and
include statements and they can be interleaved in any arbitrary
order?
Yes.

E.g. this specific example (but not in the general case) could equally
have been written *(importStmt / includeStmt).
Well, the grammar defines the canonical order.  With the alternative
rule above, the canonical order would be different.
Thanks for the clarification,
Rob



/martin
.


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

Reply via email to