I am writing a Java program for a course that takes a UML class diagram, which is a metamodel, as input and allows the user to create diagrams of the type specified in the metamodel. The user should then be able to model instances of what this diagram modeled.
As such, I am parsing the generated XML file that represents the UML and extract all classes and associations. So far, so good.
But then there are constraints which I'll need to know about and warn when the user violates them. However, I have no idea how to do the OCL parsing. I have looked into dresden OCL but I'm not sure if this is what I want, as I need to parse the OCL during runtime, as opposed to importing a model and generate java code from OCL using eclipse.
As such, I'd really appreciate it if someone could point me to a way of parsing OCL and extracting its basic syntax.
Best Regards, João Fernandes