-
Notifications
You must be signed in to change notification settings - Fork 85
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
handleing multiple invalid \ in a model #71
Comments
Thanks for reporting this. To confirm, the source data you're referring to here is the ASCII-art in After the deadlock is resolved, would you expect |
Yes, that should be the issue. I think there was a gap in the SMIV2 to YANG conversion procedure (rfc6643), and these backslashes should be transformed into
Goyang can process other MIB files that include a few invalid \ (I think less than 3). I would expect the procedure to be the same. It will be painful to fail due to these errors, but that is life. |
Following up on this issue; First, this is only strictly made invalid by the YANG 1.1 specification. YANG 1.1, after mentioning the four escaped characters (tab, newline, CR and backslash), mentions (s6.1.3, p46):
YANG 1.0 lacks this statement, leaving the meaning of e.g., So, in this case, for YANG 1.0 modules, we can either ignore or drop (or produce an error, maybe?) the undefined escape characters, in YANG 1.1, the spec says we must produce an error. Does that sound like a reasonable approach to you? (i.e., allowing YANG 1.0 modules to parse, but failing for YANG 1.1 modules with such undefined escape characters) (The reason I bring this bug up is I'm doing an issue scrub for YANG 1.1 related issues presently as we plan and do the remaining development work - apologies for the delay) |
Yes, I think that makes sense. |
Sounds good, we will warn or simply ignore those errors for YANG 1.0. |
And confirming that in the explicit case of |
Hello,
I am using goyang to process MIB-YANG modules obtained after converting SMIv2 files with SMIDUMP.
This issue is about handling multiple invalid characters after a backslash () in a YANG module.
To reproduce:
goyang CISCO-IMAGE-TC.yang
Output should be:
The problem seems to be "the storage" of errors.
Remark: There could be a hole in the SMIv2 to YANG conversion (rfc6643). YANG only supports four special characters after a backslash (which is correctly handled by goyang), but there is no such impediment in SMIv2 modules; and the conversion does not force to deal with these cases.
The text was updated successfully, but these errors were encountered: