clicon / clixon

YANG-based toolchain including NETCONF and RESTCONF interfaces and an interactive CLI
http://www.clicon.org/
Other
215 stars 72 forks source link

String concatenation in YANG model leads to syntax error #265

Closed dus7eh closed 2 years ago

dus7eh commented 3 years ago

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 commented 3 years ago

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 https://github.com/clicon/clixon/issues/241 and needs a rewrite of the scanner.
olofhagsand commented 3 years ago

Error(1) fixed by patch above.

olofhagsand commented 2 years ago

Error (2) patched by https://github.com/clicon/clixon/commit/9d65fb81d75493fb9c996b0638e9ea1e6e9eb7a1