opencaesar / oml-rosetta

An Eclipse IDE that supports OML natively
Apache License 2.0
10 stars 1 forks source link

BUG: A missing space between an ID and the following operator (':', ':>') causes and error in Rosetta Editor #4

Closed JWT007 closed 3 years ago

JWT007 commented 4 years ago

Problem:

If a whitespace is omitted for example between an ci ID _ and the following ':' an error is raised in Rosetta. It is probably consuming the ':' as part of the ID.

image

The same thing occurs in a vocabulary between an aspect/concept and a 'super' (for example 'concept Cola:> Drink').

Note: Missing whitespace between the operator (':', ':>') and the following IRI does not cause an error.

Expected behavior: I would expect the parser to ignore whitespace and be able to deal with this for example: "ci SquarePart1:ShapedPartInstance"

melaasar commented 4 years ago

I debugged this issue, and it turns out that when the colon is attached to the id the tokenizer gets confused between two terminal rules: ID and ABBREV_IRI. The former is the right one to choose in this case, but it ends up choosing ABBREV_IRI, which is defined as ID:ID. Based on this, it thinks the token is ill-formed and it complains. I will look to see if there is a way to disambiguate the terminals definition.

melaasar commented 4 years ago

I think I have a fix for this one. It will make it into the next patch release of the OML server, then will update OML Theia to use it.

melaasar commented 3 years ago

This has been fixed in the latest OML release (v0.9.0)