B.2 EBNF Rules for Expression


 _________________________________________________________________ OclExpressionCS ::=           PropertyCallExpCS             VariableExpCS             LiteralExpCS             LetExpCS             OclMessageExpCS             IfExpCS _________________________________________________________________ VariableExpCS ::= simpleNameCS _________________________________________________________________ simpleNameCS ::= <String> _________________________________________________________________ pathNameCS ::= simpleNameCS ('::' pathNameCS )? _________________________________________________________________ LiteralExpCS ::=              EnumLiteralExpCS             CollectionLiteralExpCS             TupleLiteralExpCS             PrimitiveLiteralExpCS _________________________________________________________________ EnumLiteralExpCS ::= pathNameCS '::' simpleNameCS _________________________________________________________________ CollectionLiteralExpCS ::= CollectionTypeIdentifierCS                             '{' CollectionLiteralPartsCS? '}' _________________________________________________________________ CollectionTypeIdentifierCS ::=              'Set'             'Bag'             'Sequence'             'OrderedSet'             'Collection' _________________________________________________________________ CollectionLiteralPartsCS = CollectionLiteralPartCS                          ( ',' CollectionLiteralPartsCS )? _________________________________________________________________ CollectionLiteralPartCS ::=              CollectionRangeCS             OclExpressionCS _________________________________________________________________ CollectionRangeCS ::= OclExpressionCS '..' OclExpressionCS _________________________________________________________________ PrimitiveLiteralExpCS ::=              IntegerLiteralExpCS             RealLiteralExpCS             StringLiteralExpCS             BooleanLiteralExpCS _________________________________________________________________ TupleLiteralExpCS ::= 'Tuple' '{' variableDeclarationListCS '}' _________________________________________________________________ IntegerLiteralExpCS ::= <String> _________________________________________________________________ RealLiteralExpCS ::= <String> _________________________________________________________________ StringLiteralExpCS ::= ''' <String> ''' _________________________________________________________________ BooleanLiteralExpCS ::=              'true'             'false' _________________________________________________________________ PropertyCallExpCS ::=              ModelPropertyCallExpCS             LoopExpCS _________________________________________________________________ LoopExpCS ::=              IteratorExpCS             IterateExpCS _________________________________________________________________ IteratorExpCS ::=              OclExpressionCS '->' simpleNameCS                       '(' (VariableDeclarationCS,                            (',' VariableDeclarationCS)? '' )?                           OclExpressionCS                       ')'             OclExpressionCS '.' simpleNameCS '('argumentsCS?')'             OclExpressionCS '.' simpleNameCS             OclExpressionCS '.' simpleNameCS ('[' argumentsCS ']')? _________________________________________________________________ IterateExpCS ::= OclExpressionCS '->' 'iterate'                   '(' (VariableDeclarationCS ';')?                        VariableDeclarationCS ''                        OclExpressionCS                   ')' _________________________________________________________________ VariableDeclarationCS ::= simpleNameCS (':' typeCS)?                            ( '=' OclExpressionCS )? _________________________________________________________________ typeCS ::=              pathNameCS             collectionTypeCS             tupleTypeCS _________________________________________________________________ collectionTypeCS ::= collectionTypeIdentifierCS '(' typeCS ')' _________________________________________________________________ tupletypeCS ::= 'TupleType' '(' variableDeclarationListCS? ')' _________________________________________________________________ ModelPropertyCallExpCS ::=              OperationCallExpCS             AttributeCallExpCS             NavigationCallExpCS _________________________________________________________________ OperationCallExpCS ::=              OclExpressionCS simpleNameCS OclExpressionCS             OclExpressionCS '->' simpleNameCS '(' argumentsCS? ')'             OclExpressionCS '.' simpleNameCS '(' argumentsCS? ')'             simpleNameCS  '(' argumentsCS? ')'             OclExpressionCS '.' simpleNameCS isMarkedPreCS                                                   '(' argumentsCS? ')'             simpleNameCS isMarkedPreCS '(' argumentsCS? ')'             pathNameCS  '(' argumentsCS? ')'             simpleNameCS OclExpressionCS _________________________________________________________________ AttributeCallExpCS ::=              OclExpressionCS '.' simpleNameCS isMarkedPreCS?             simpleNameCS isMarkedPreCS?             pathNameCS _________________________________________________________________ NavigationCallExpCS ::= AssociationEndCallExpCS             AssociationClassCallExpCS _________________________________________________________________ AssociationEndCallExpCS ::= (OclExpressionCS '.')? simpleNameCS                                  ('[' argumentsCS ']')? isMarkedPreCS? _________________________________________________________________ AssociationClassCallExpCS ::=              OclExpressionCS '.' simpleNameCS                       ('[' argumentsCS ']')? isMarkedPreCS?             simpleNameCS                       ('[' argumentsCS ']')? isMarkedPreCS? _________________________________________________________________ isMarkedPreCS ::= '@' 'pre' _________________________________________________________________ argumentsCS ::= OclExpressionCS ( ',' argumentsCS )? _________________________________________________________________ LetExpCS ::= 'let' VariableDeclarationCS                     LetExpSubCS _________________________________________________________________ LetExpSubCS ::=              ',' VariableDeclarationCS LetExpSubCS             'in' OclExpressionCS _________________________________________________________________ OclMessageExpCS ::=              OclExpressionCS '^^'                   simpleNameCS '(' OclMessageArgumentsCS? ')'             OclExpressionCS '^'                   simpleNameCS '(' OclMessageArgumentsCS? ')' _________________________________________________________________ OclMessageArgumentsCS ::= OclMessageArgCS (',' OclMessageArgumentsCS)? _________________________________________________________________ OclMessageArgCS ::=              '?' (':' typeCS)?             OclExpressionCS _________________________________________________________________ IfExpCS ::= 'if'   OclExpression                  'then' OclExpression                  'else' OclExpression                  'endif' _________________________________________________________________ AttributeDefinitionCS ::= 'attr' VariableDeclarationListCS _________________________________________________________________ OperationDefinitionListCS ::= 'oper' OperationListCS _________________________________________________________________ OperationListCS ::= OperationDefinitionCS (',' OperationListCS) _________________________________________________________________ OperationDefinitionCS ::= 'simpleNameCS '(' parametersCS? ')'                                  ':' typeCS ('=' OclExpresionCS)? _________________________________________________________________ parametersCS ::= variableDeclarationCS (',' parametersCS )? 


Object Constraint Language, The. Getting Your Models Ready for MDA
The Object Constraint Language: Getting Your Models Ready for MDA (2nd Edition)
ISBN: 0321179366
EAN: 2147483647
Year: 2003
Pages: 137

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net