DMTF / YANG-to-Redfish-Converter

This tool converts a YANG model file to the corresponding Redfish schema, specified in OData CSDL, in accordance with the YANG-to-CSDL Mapping Specification.
Other
4 stars 5 forks source link

[Bridge model] Fault when Include statement value is alphanumeric #3

Closed tomasg2012 closed 6 years ago

tomasg2012 commented 6 years ago

As quoted:

(Converting ieee2-dot1Q-bridge.yang) ieee2-dot1Q-bridge.yang.txt

Traceback (most recent call last):
  File "src/yang_to_csdl_tool.py", line 157, in <module>
    execute(filename, args.output_grammar, args.target_dir, logger)
  File "src/yang_to_csdl_tool.py", line 56, in execute
    result = myparser.parse_text(content)
  File "C:\Users\jcleung\AppData\Local\Programs\Python\Python35-32\lib\site-packages\modgrammar\__init__.py", line 508, in parse_text
    for result in self._parse_text(string, bol, eof, data, matchtype):
  File "C:\Users\jcleung\AppData\Local\Programs\Python\Python35-32\lib\site-packages\modgrammar\__init__.py", line 455, in _parse_text
    count, obj = self._parse(pos, session, matchtype)
  File "C:\Users\jcleung\AppData\Local\Programs\Python\Python35-32\lib\site-packages\modgrammar\__init__.py", line 395, in _parse
    raise ParseError(self.grammar, self.text.string, errpos, char, line=line, col=col, expected=expected)
modgrammar.ParseError: [line 8, column 14] Expected 'anyxml' or 'augment' or 'choice' or 'contact' or 'container' or 'description' or 'deviation' or 'feature' or 'grouping' or 'identity' or 'import' or 'include' or 'namespace' or 'notification' or 'organization' or 'prefix' or 'reference' or 'revision' or 'rpc' or 'submodule' or 'typedef' or 'yang-version' or '}': Found '1Q-types; '

Followup comments: Periods are NOT allowed in CSDL, Yang files use UTF-8

https://github.com/DMTF/spmf-tools/issues/167

Additional issues: Can we parse UTF-8 completely with modgrammar?