Juergen Schoenwaelder <[email protected]> wrote: > On Wed, Jun 08, 2016 at 12:29:59PM +0200, Martin Bjorklund wrote: > > > > > Note that this is legal YANG: > > > > > > > > leaf type { > > > > type string; > > > > } > > > > > > So keywords aren't reserved; they can also be used as identifiers. > > > > Yes. > > > > That's a lot clearer. Though you can shorten it to: > > > > > > An unquoted string is any sequence of characters that is not a > > > keyword, and does not contain any space, tab, or newline > > > characters, a single or double quote character, a semicolon (";"), > > > braces ("{" or "}"), or comment sequences ("//", "/*", or "*/"). > > > > Thanks, better. > > The does the 'is not a keyword' not contratict the example shown > above? My reading of the new suggested text would make me believe > I would have to write the example as follows > > leaf "type" { > type string; > } > > which is different from the YANG 1.0 syntax rules I think.
Note that I also wrote: > > In section 6.3 we must also do: > > > > OLD: > > > > The argument is a string, as defined in Section 6.1.2. > > > > NEW: > > > > The argument is a string or a keyword, as defined in Section 6.1.2. The alternative is to keep the current text. But it means that the scanner is context-dependent (logically at least). IMO it doesn't really matter - this is just a conceptual explanation; an implementation is free to implement this in whatever clever way it wants. /martin _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
