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

LSP regex handling inconsistent with YANG RFC? #239

Open
esmasth opened this issue Mar 25, 2024 · 1 comment
Open

LSP regex handling inconsistent with YANG RFC? #239

esmasth opened this issue Mar 25, 2024 · 1 comment

Comments

@esmasth
Copy link
Contributor

esmasth commented Mar 25, 2024

A YANG pattern "[a-zA-Z0-9!$%\\^()\\[\\]_\\-~{}.+]*" is flagged as type-error. As a second opinion CESNET/libyang yangre tool as well as mbj4668/pyang were used to check whether the regex is consistent, and it was found to be acceptable. Possibly need adjustment to regex handling in yang-lsp.

@esmasth
Copy link
Contributor Author

esmasth commented Aug 22, 2024

Possibly same underlying root cause as #227

Changing "[a-zA-Z0-9!$%\\^()\\[\\]_\\-~{}.+]*" to '[a-zA-Z0-9!$%\^()\[\]_\-~{}.+]*' makes the error go away.

esmasth added a commit to esmasth/yang-lsp that referenced this issue Sep 7, 2024
This addresses TypeFox#239

Signed-off-by: Siddharth Sharma <[email protected]>
esmasth added a commit to esmasth/yang-lsp that referenced this issue Sep 7, 2024
Escaped backslashes `\\` within double quoted pattern arguments
need to be unescaped before using xerces RegularExpression()

This addresses TypeFox#239

Signed-off-by: Siddharth Sharma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant