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

Parser Error with an Extension containing Optional Block of Substatements

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: Mac OS
      Platform: Macintosh

    • 394
    • Low

    Description

      The following container definition which includes an extension with sub-statements is failing to parse.

      container logrecords {
      tailf:info "Shows logrecords information";
      tailf:action show {

      tailf:info "Shows the log records";
      tailf:actionpoint logging-logrecord-show;

      input {
      leaf from

      { type yang:date-and-time; default 2000-01-01T00:00:00-00:00; description "Shows the log records from the given time"; }

      leaf to

      { type yang:date-and-time; default 2099-01-01T00:00:00-00:00; description "Shows the log records up to the given time"; }

      }
      output {
      leaf data

      { tailf:cli-drop-node-name; type string; description "Shows the log records according to the given input"; }

      }
      }
      }

      The problem is reported as follows:

      [ERROR] yang-to-sources: Unable to parse yang files from /private/tmp/r/myartifactId/src/main/yang
      org.opendaylight.yangtools.yang.parser.util.YangParseException:
      Error in module 'atlas-logging' at line 241: missing '}' at 'tailf:actionpoint'
      Error in module 'atlas-logging' at line 243: extraneous input 'input' expecting

      {'}', 'when', 'uses', 'typedef', 'status', 'reference', 'presence', 'must', 'list', 'leaf-list', 'leaf', 'if-feature', 'grouping', 'description', 'container', 'config', 'choice', 'anyxml', IDENTIFIER}
      Error in module 'atlas-logging' at line 255: extraneous input 'output' expecting {'}

      ', 'uses', 'typedef', 'status', 'reference', 'list', 'leaf-list', 'leaf', 'grouping', 'description', 'container', 'choice', 'anyxml', IDENTIFIER}

      Attachments

        Issue Links

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

          Activity

            People

              mvitez@cisco.com Martin Vitez
              doneill@btisystems.com Damian ONeill
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: