Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser error #2

Open
hsolbrig opened this issue Jan 18, 2018 · 1 comment
Open

Parser error #2

hsolbrig opened this issue Jan 18, 2018 · 1 comment
Assignees
Labels

Comments

@hsolbrig
Copy link
Contributor

"<S1> {<p1> [<o1>]} produces the following trace:

    ...
  File "/Users/mrf7578/Development/git/shexSpec/grammar/parsers/python/pyshexc/parser/ShExDocParser.py", line 1011, in accept
    return visitor.visitShapeExprDecl(self)
  File "/Users/mrf7578/Development/git/shexSpec/grammar/parsers/python/pyshexc/parser_impl/shex_doc_parser.py", line 67, in visitShapeExprDecl
    label = self.context.shapeexprlabel_to_IRI(ctx.shapeExprLabel())
  File "/Users/mrf7578/Development/git/shexSpec/grammar/parsers/python/pyshexc/parser_impl/parser_context.py", line 129, in shapeexprlabel_to_IRI
    return self.iri_to_iriref(shapeExprLabel.iri())
  File "/Users/mrf7578/Development/git/shexSpec/grammar/parsers/python/pyshexc/parser_impl/parser_context.py", line 115, in iri_to_iriref
    return ShExJ.IRIREF(self.iri_to_str(iri_))
  File "/Users/mrf7578/Development/git/shexSpec/grammar/parsers/python/pyshexc/parser_impl/parser_context.py", line 107, in iri_to_str
    return self.iriref_to_str(iri_.IRIREF())
  File "/Users/mrf7578/Development/git/shexSpec/grammar/parsers/python/pyshexc/parser_impl/parser_context.py", line 68, in iriref_to_str
    return rval if ':' in rval else self.base.val + rval
AttributeError: 'NoneType' object has no attribute 'val'
hsolbrig pushed a commit that referenced this issue Jan 18, 2018
Fixes issue #2 (version 0.3.2).  Also adds a default context to shexj file (0.3.1)
@hsolbrig hsolbrig reopened this Jan 18, 2018
@hsolbrig
Copy link
Contributor Author

The shexTest.validation suite expects the base to derive from the file name. We also need to add the ability to pass a default_base into the parser itself

@hsolbrig hsolbrig self-assigned this Apr 10, 2018
@hsolbrig hsolbrig added the bug label Apr 10, 2018
hsolbrig pushed a commit that referenced this issue Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant