[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [YANG] YANG syntax



Martin Bjorklund píše v Pá 28. 03. 2008 v 14:53 +0100:
>    default +1;    // nok
>    default "+1";  // ok

That's actually another thing I wanted to mention: if I read the grammar
correctly, +1 is not a valid number - the plus sign is not allowed. I
think it should be.

> 
> 
> 
> > - I don't really understand the keyref statement and its path
> > expression. An example would be helpful.
> 
> Do you need more than what's in 8.8.4?

Oh, sorry, I confused the literal "/" with ABNF operator / in
path-key-expr. I have to correct it in the YIN schema.
 
> > - unique-arg  should have "1*SP" instead of "1*sp"
> 
> Yes, but it is actually valid ABNF (by accident!) since rule names are
> case insensitive.
> 
> But I think it should be "sep" instead of "1*sp".   That also
> allows newlines, just like key-arg.   Alternatively, both key-arg and
> unique-arg should use "1*SP", and if you want newlines you can use
> string concatenation.

I vote for 1*sep.

> 
> 
> > - descendant-schema-nodeid should be an alternative?
> >   descendant-schema-nodeid
> >                        = node-identifier /
> >                          absolute-schema-nodeid
> 
> No, if it is absolute it is not descendant.  descendant-schema-nodeid
> means that it is a relative w/o leading dots, i.e. it reference
> soemthing below the current point.

The descendant-schema-nodeid now doesn't allow a single node-identifier,
it must be at least node-identifier "/" node-identifier. So the rule
should probably be

descendant-schema-nodeid
                       = node-identifier
                         [absolute-schema-nodeid]

Lada

-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C

_______________________________________________
YANG mailing list
YANG at ietf.org
https://www.ietf.org/mailman/listinfo/yang