[YANGTOOLS-471] Use of reference keyword in a YANG extension causes YangSyntaxErrorException Created: 25/Jun/15 Updated: 10/Apr/22 Due: 13/Aug/15 Resolved: 26/Aug/15 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Claudia Hwang | Assignee: | Martin Ciglan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 3859 |
| Description |
|
Here is a small example of a yang file to demonstrate the problem. It includes the extension in the same module for brevity. The Yangtools version is 0.6.5-Helium-SR3. module extension-with-reference { description extension myalias { argument "descriptor"; } container foo { } This causes following exception: org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException: extraneous input 'reference' expecting {'}', 'yin-element', 'yang-version', 'when', 'value', 'uses', 'units', 'unique', 'typedef', 'type', 'submodule', 'status', 'rpc', 'revision-date', 'revision', 'require-instance', 'refine', 'range', 'presence', 'prefix', 'position', 'pattern', 'path', 'output', 'organization', 'ordered-by', 'notification', 'namespace', 'must', 'module', 'min-elements', 'max-elements', 'mandatory', 'list', 'length', 'leaf-list', 'leaf', 'key', 'input', 'include', 'import', 'if-feature', 'identity', 'grouping', 'fraction-digits', 'feature', 'deviate', 'deviation', 'extension', 'error-message', 'error-app-tag', 'enum', 'description', 'default', 'container', 'contact', 'config', 'choice', 'case', 'bit', 'belongs-to', 'base', 'augment', 'anyxml', IDENTIFIER} in module extension-with-reference on line 15 character 12 |
| Comments |
| Comment by Claudia Hwang [ 30/Jun/15 ] |
|
(In reply to Martin Ciglan from comment #1) The bug is similar but is not the same.
|
| Comment by Martin Ciglan [ 19/Aug/15 ] |
|
Hi I had a look again and for sure, reference stmt is not added into unknown stmt as sub-stmt, so I can confirm this bug in yangtools Helium branch. |
| Comment by Martin Ciglan [ 21/Aug/15 ] |
|
fix pushed: |