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

String concatenation in YANG model leads to syntax error #265

Closed
dus7eh opened this issue Sep 16, 2021 · 3 comments
Closed

String concatenation in YANG model leads to syntax error #265

dus7eh opened this issue Sep 16, 2021 · 3 comments

Comments

@dus7eh
Copy link

dus7eh commented Sep 16, 2021

According to YANG RFC 7950 (https://datatracker.ietf.org/doc/html/rfc7950#section-6.1.3) quoted strings should be concatenated.

When parsing a YANG model with for example:

...
uses 'some_prefix:'+
     'grouping_name';
...

the following error is logged: syntax error at or before: '''

Expected behavior: yang model is parsed successfully

@olofhagsand
Copy link
Member

There are two errors:

  1. single quotes in some identifiers (eg uses above) causes errors.
  2. quoted string + quoted string as noted in the error description above is not implemented for many identifiers, including uses.
    Error (1) can be fixed separately
    Error (2) is related (not same) as Can't use + symbol in the enum statement without quotes #241 and needs a rewrite of the scanner.

olofhagsand added a commit that referenced this issue Sep 20, 2021
…rror](#265)

  * In this case, eg "uses", single quotes can now be used, but not `qstring + qstring` in this case
@olofhagsand
Copy link
Member

Error(1) fixed by patch above.

@olofhagsand
Copy link
Member

Error (2) patched by 9d65fb8

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

No branches or pull requests

2 participants