Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-910

RFC7950Reactors.defaultReactor can not build the yang file with content "yang-version 1.0"

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • High
    • Resolution: Won't Do
    • 2.1.2
    • None
    • parser
    • 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.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            Leo29 Liu Hui
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: