You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following (valid) turtle document is not parsed correctly:
<iri1> <iri2> <iri3> ;
;
.
The problem is triggered by the second line with a semicolon without any verb and objectList, which is allowed based on the turtle grammar.
I assume the cause of the problem is the grammar in TurtleParser.jj line 264 were the rule for predicateObjectList looks different than the one from the standard.
The detailed error message when parsing the example on the top is the following:
Parser: org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParser@2cf3d63b
Stack trace:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException: Encountered unexpected token: ";" ";"
at line 2, column 2.
Was expecting:
"."
org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParser.parse(TurtleOntologyParser.java:58)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:195)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.load(OWLOntologyManagerImpl.java:1105)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1055)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1005)
org.example.Main.loadTurtle(Main.java:87)
org.example.Main.main(Main.java:23)
Encountered unexpected token: ";" ";"
at line 2, column 2.
Was expecting:
"."
org.semanticweb.owlapi.rdf.turtle.parser.TurtleParser.generateParseException(TurtleParser.java:1034)
org.semanticweb.owlapi.rdf.turtle.parser.TurtleParser.jj_consume_token(TurtleParser.java:902)
org.semanticweb.owlapi.rdf.turtle.parser.TurtleParser.parseDocument(TurtleParser.java:160)
org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParser.parse(TurtleOntologyParser.java:54)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:195)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.load(OWLOntologyManagerImpl.java:1105)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1055)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1005)
org.example.Main.loadTurtle(Main.java:87)
org.example.Main.main(Main.java:23)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:236)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.load(OWLOntologyManagerImpl.java:1105)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1055)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1005)
at org.example.Main.loadTurtle(Main.java:87)
at org.example.Main.main(Main.java:23)
The text was updated successfully, but these errors were encountered:
Indeed, the standard allows for separators that don't separate anything. One could argue whether it was intentional or a typo. I wonder what's the history behind that.
The following (valid) turtle document is not parsed correctly:
The problem is triggered by the second line with a semicolon without any verb and objectList, which is allowed based on the turtle grammar.
I assume the cause of the problem is the grammar in TurtleParser.jj line 264 were the rule for
predicateObjectList
looks different than the one from the standard.The detailed error message when parsing the example on the top is the following:
The text was updated successfully, but these errors were encountered: