Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range parsing is not RFC 7950 compliant #71

Closed
loeliger opened this issue Jan 25, 2019 · 4 comments
Closed

Range parsing is not RFC 7950 compliant #71

loeliger opened this issue Jan 25, 2019 · 4 comments
Labels

Comments

@loeliger
Copy link

A leaf node with a range like this:

leaf thing {
    type uint8 {
	range "7 .. 17";
    }
}

fails to parse properly even though it is RFC-7950 compliant.
The RFC says:

;; Ranges

   range-arg-str       = < a string that matches the rule >
                         < range-arg >

   range-arg           = range-part *(optsep "|" optsep range-part)

   range-part          = range-boundary
                         [optsep ".." optsep range-boundary]

   range-boundary      = min-keyword / max-keyword /
                         integer-value / decimal-value

    optsep              = *(WSP / line-break)

   WSP                 = SP / HTAB
                         ; whitespace

I think clixon needs to relax its parsing an allow white spaces
around the three range tokens.

@olofhagsand
Copy link
Member

This should have been fixed recently in develop, see:
c7e847c
Did you see this on master or on an earlier develop checkout?

@olofhagsand
Copy link
Member

This should work

@olofhagsand
Copy link
Member

Reopening. still broken.

@olofhagsand olofhagsand reopened this Feb 5, 2019
@olofhagsand olofhagsand added the bug label Feb 5, 2019
olofhagsand added a commit that referenced this issue Feb 5, 2019
…ltiple values](#59).

  * Should work for netconf and restconf, but not for CLI.
* Fixed again: [Range parsing is not RFC 7950 compliant](#71)
@olofhagsand
Copy link
Member

Fixed (again)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants