O'Reilly logo

Object Constraint Language, The: Getting Your Models Ready for MDA, Second Edition by Anneke Kleppe, Jos Warmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. OCL Grammar Rules

This appendix describes the grammar for OCL context declarations and expressions. This section is taken from [OCL03], which is the part of the UML 2.0 OMG standard that defines OCL. A free version of the Octopus tool, which implements this grammar, is available from the Klasse Objecten Web site: www.klasse.nl/ocl.

The grammar description uses the EBNF syntax, in which | means a choice, ? means optionality, * means zero or more times, and + means one or more times. In the description, the syntax for lexical tokens is not made explicit. Instead, it is indicated by <String>. This enables developers to use the grammar together with different natural language alphabets.

EBNF Rules for Context Declaration

 _________________________________________________________________ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required