Skip to content

rnc2rng failure #3

@mildred

Description

@mildred

I have the following rnc schema:

namespace xsd = "http://www.w3.org/2001/XMLSchema"

grammar {
    start = element svn {
        # Path to the svn dump file
        attribute dump-file { xsd:string }?,

        # Content of the .SVNAccessFile inline in the XML
        element access-file { xsd:string }?

        # E-mail subscriptions
        & element notification {
            attribute path { xsd:string },
            attribute emails { xsd:string }
        }*
    }
}

Running rnc2rng version 2.0 yields:

Traceback (most recent call last):
  File "/bin/rnc2rng", line 9, in <module>
    load_entry_point('rnc2rng==2.0', 'console_scripts', 'rnc2rng')()
  File "/usr/lib/python3.5/site-packages/rnc2rng/__main__.py", line 9, in main
    xml = serializer.XMLSerializer().toxml(parser.parse(input))
  File "/usr/lib/python3.5/site-packages/rnc2rng/parser.py", line 390, in parse
    return parser.parse(lex(src), state=State())
  File "/usr/lib/python3.5/site-packages/rply/parser.py", line 62, in parse
    self.error_handler(state, lookahead)
  File "/usr/lib/python3.5/site-packages/rnc2rng/parser.py", line 375, in error
    raise Exception(s, t)
Exception: (<rnc2rng.parser.State object at 0x7f78692afa20>, Token('LBRACE', '{'))

I believe my rnc file is correct (but I can't be so sure because I cannot find a converter that would work). If the rnc file is incorrect, I would at least expect a better error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions