Closed darshana-jk closed 5 years ago
This was not intentional to include the \n character. We will need to fix this in the next publication.
I'm not convinced that it's wrong. Tracing down the BNF I think we get to sep
which includes "\n" (LF).
7.20.2. The "if-feature" Statement
...
The if-feature boolean expression syntax is formally defined by the rule "if-feature-expr" in Section 14.
14. YANG ABNF Grammar
...
if-feature-expr = if-feature-term
[sep or-keyword sep if-feature-expr]
if-feature-term = if-feature-factor
[sep and-keyword sep if-feature-term]
if-feature-factor = not-keyword sep if-feature-factor /
"(" optsep if-feature-expr optsep ")" /
identifier-ref-arg
sep = 1*(WSP / line-break)
; unconditional separator
optsep = *(WSP / line-break)
WSP = SP / HTAB
; whitespace
line-break = CRLF / LF
Ok, considering the newline as a separator/optional separator makes more sense. Thank you for the clarification.
In bbf-l2-forwarding-mac-learning-control.yang, lines 129-131,
There's a newline in the if-feature expression string. According to the RFC7950-section-6.1.3.1, the expression effectively becomes:
For a YANG parser, the newline character doesn't have a meaning there, is this intended?