Object Constraint Language (OCL) syntax checker

140 Views Asked by At

This topic may seem redundant with an old topic (OCL Syntax Checker), but as it's close since 10year, I think answers and possibilities may have changed.

I have been looking for an existing open-source syntax-checker for the Object Constraint Language (OCL). I intend to extend the syntax-checker with additional functionality not present in the OCL standard, so i need to access both lexical and syntaxic parser.

However, most of the projects I have found are based on the Eclipse Meta-Object Facility (MOF), while I seek only the ability to verify the grammar of an OCL expression (completely independent of any associated class diagrams, etc.)

Do you have any tool suggestion for my purpose ?

Thank you for your answer,

1

There are 1 best solutions below

0
Ed Willink On

I don't think that you will find just a syntax checker. Rather any OCL tool should support checking as part of its basic parsing/compilation.

OCL is of course almost useless by itself. It needs to be embedded in an environment that supplies models. Your observation that you don't need class diagrams neglects to identify what you use instead.

One possibility that might meet your requirements is to use the Eclipse OCL Xtext Console to enter (and evaluate) individual expressions that are parsed against a selected object that may come from a variety of contexts in open Ecore/UML/... files. If you really need no associated context the absence of a viable selection will operate with a null self.