#310 unhelpful Manchester parse exception

closed
None
5
2012-10-13
2012-02-23
No

This issue was found while using the incremental manchester syntax
parser in Protege 4.1. The end result for the Protege 4.1 user was
that the parser did not give an understandable error message.

Suppose that the entity checker understands the string "p" as a
datatype property and understands the string "rdfs:Literal" as a
datatype. When the Manchester OWL syntax parser tries to parse "p
some Literal" it throws a RuntimeException that does not appear to
have much to do with the real problem. The Runtime exception states
that the problem is that "Prefix not registered for prefix namne: :".
The actual problem is that "Literal" does not represent a datatype;
the user should have typed rdfs:Literal.

If instead I ask the parser to parse "p some Litera" then I get an
understandable error message. If I ask the parser to parse "p some
rdfs:Literal" the parse succeeds (as it should).

I have attached a program that demonstrates the problem. A key part
of the problem appears to be that for the text "p some Literal" when
the code is trying to parse "Literal" (and knows that it is a
datatype), the isDatatypeName(tok) in the following code

private OWLDataRange parseDataRangePrimary() throws ParserException {
String tok = peekToken();

if (isDatatypeName(tok)) {

from ManchesterOWLSyntaxEditorParser returns true.

Discussion

  • Ignazio Palmisano

    • status: open --> closed
     
  • Ignazio Palmisano

    All vocabulary entries are added the same way as rdfs:Literal. I have removed them, leaving the full IRI and the ones with standard abbreviations.

     
  • Ignazio Palmisano

    • assigned_to: nobody --> ignazio1977
     

Log in to post a comment.