Details
-
Bug
-
Status: Resolved
-
High
-
Resolution: Won't Do
-
2.1.2
-
None
-
None
Description
In my project, I'm trying to parse the yang files with yangtools parser, and RFC7950Reactors.defaultReactor is chosen as below:
CrossSourceStatementReactor.BuildAction reactor = RFC7950Reactors.defaultReactor().newBuild();
addSourceFiles(reactor, compatibleDir);
SchemaContext schemaContext= reactor.buildEffective();
Then I test the yang files in compatibleDir, if the yang file is specified with "yang-version 1.0", I'll get the Exception below:
org.opendaylight.yangtools.yang.parser.spi.meta.SomeModifiersUnresolvedException: Some of FULL_DECLARATION modifiers for statements were not resolved.
org.opendaylight.yangtools.yang.parser.stmt.reactor.BuildGlobalContext.propagateException(BuildGlobalContext.java:256)
org.opendaylight.yangtools.yang.parser.stmt.reactor.BuildGlobalContext.loadPhaseStatementsFor(BuildGlobalContext.java:310)
org.opendaylight.yangtools.yang.parser.stmt.reactor.BuildGlobalContext.loadPhaseStatements(BuildGlobalContext.java:300)
org.opendaylight.yangtools.yang.parser.stmt.reactor.BuildGlobalContext.executePhases(BuildGlobalContext.java:218)
org.opendaylight.yangtools.yang.parser.stmt.reactor.BuildGlobalContext.buildEffective(BuildGlobalContext.java:230)
And if I remove the content "yang-version 1.0" or replace it with "yang-version 1.1", I'll get the yang file parsed correctly, no exceptions occured.
Can anyone help with the issue I encountered.Thacks.