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

Adding a comment breaks parsing of a Shex file #21

Open
tonicebrian opened this issue Dec 11, 2019 · 0 comments
Open

Adding a comment breaks parsing of a Shex file #21

tonicebrian opened this issue Dec 11, 2019 · 0 comments

Comments

@tonicebrian
Copy link
Contributor

tonicebrian commented Dec 11, 2019

Whenever I add a comment to a shape, the Shex fails to compile. For instance, this shape breaks the whole parsing:

:MyShape {
  obo:RO_0000081 IRI ; # Comment
}

with error:

line 1:1552 missing '}' at '<EOF>'
[info] - should validate against the Shex definition *** FAILED ***
[info]   Error at 1:1552 missing '}' at '<EOF>' (RDF4JMarshallerSpec.scala:88)

while

:MyShape {
  obo:RO_0000081 IRI ; 
}

compiles and works perfectly. It seems like the comment is commenting out the rest of the file till the end.

Could it be something related to the warning you can see when generating the code from the ANTLR file?

[error] warning(158): /Users/cebriant/forked_repos/shex-s/modules/shex/src/main/antlr4/ShExDoc.g4:599:62: fragment rule COMMENT contains an action or command which can never be executed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant