Ad/2010-08-01 Concrete Syntax for a uml action Language for Foundational uml (Alf) Second Revised Submission



Download 1.74 Mb.
Page62/62
Date28.01.2017
Size1.74 Mb.
#9041
1   ...   54   55   56   57   58   59   60   61   62

/* EQUALITY EXPRESSIONS */

EqualityExpression = UnaryExpression


ClassificationExpressionCompletion

EqualityExpressionCompletion = ClassificationExpressionCompletion


( EqualityOperator ClassificationExpression)*

EqualityOperator = |

/* LOGICAL EXPRESSIONS */

AndExpression = UnaryExpression AndExpressionCompletion

AndExpressionCompletion = EqualityExpressionCompletion
( EqualityExpression )*

ExclusiveOrExpression = UnaryExpression


ExclusiveOrExpressionCompletion

ExclusiveOrExpressionCompletion


= AndExpressionCompletion
( AndExpression )*

InclusiveOrExpression = UnaryExpression


InclusiveOrExpressionCompletion

InclusiveOrExpressionCompletion


= ExclusiveOrExpressionCompletion
( ExclusiveOrExpression )*

/* CONDITIONAL LOGICAL EXPRESSIONS */

ConditionalAndExpression = UnaryExpression
ConditionalAndExpressionCompletion

ConditionalAndExpressionCompletion


= InclusiveOrExpressionCompletion
( InclusiveOrExpression )*

ConditionalOrExpression = UnaryExpression


ConditionalOrExpressionCompletion

ConditionalOrExpressionCompletion


= ConditionalAndExpressionCompletion
( ConditionalAndExpression )*

/* CONDITIONAL-TEST EXPRESSIONS */

ConditionalExpression = UnaryExpression
ConditionalExpressionCompletion

ConditionalExpressionCompletion


= ConditionalOrExpressionCompletion
( Expression
ConditionalExpression )?

/* ASSIGNMENT EXPRESSIONS */

AssignmentExpressionCompletion
= AssignmentOperator Expression

AssignmentOperator =


|

|


|
|
|
|
|
|
|
|
|

/**************

* STATEMENTS *

**************/

StatementSequence = ( DocumentedStatement )*

DocumentedStatement = ( )? Statement

Statement = AnnotatedStatement
| InLineStatement
| BlockStatement
| EmptyStatement
| LocalNameDeclarationOrExpressionStatement
| LocalNameDeclarationStatement
| IfStatement
| SwitchStatement
| WhileStatement
| ForStatement
| DoStatement
| BreakStatement
| ReturnStatement
| AcceptStatement
| ClassifyStatement

/* BLOCK */

Block = StatementSequence

/* ANNOTATED STATEMENTS */

AnnotatedStatement = Annotations Statement

Annotations = Annotation ( Annotation )*

Annotation = ( NameList )?

NameList = Name ( Name )*

/* IN-LINE STATEMENTS */

InLineStatement = Name


/* BLOCK STATEMENTS */

BlockStatement = Block

/* EMPTY STATEMENTS */

EmptyStatement =

/* LOCAL NAME DECLARATION AND EXPRESSION STATEMENTS */

LocalNameDeclarationOrExpressionStatement
= PotentiallyAmbiguousQualifiedName
( ( MultiplicityIndicator )? Name
LocalNameDeclarationStatementCompletion
| NameToExpressionCompletion
)
| NonNameExpression

LocalNameDeclarationStatement = Name TypeName


( MultiplicityIndicator )?
LocalNameDeclarationStatementCompletion

LocalNameDeclarationStatementCompletion


= InitializationExpression

InitializationExpression = Expression


| SequenceInitializationExpression
| InstanceInitializationExpression

InstanceInitializationExpression


= Tuple

/* IF STATEMENTS */

IfStatement = SequentialClauses ( FinalClause )?

SequentialClauses = ConcurrentClauses


( ConcurrentClauses )*

ConcurrentClauses = NonFinalClause ( NonFinalClause )*

NonFinalClause = Expression Block

FinalClause = Block

/* SWITCH STATEMENTS */

SwitchStatement = Expression


( SwitchClause )*
( SwitchDefaultClause )?

SwitchClause = SwitchCase ( SwitchCase )*


NonEmptyStatementSequence

SwitchCase = Expression

SwitchDefaultClause = NonEmptyStatementSequence

NonEmptyStatementSequence = ( DocumentedStatement )+

/* WHILE STATEMENTS */

WhileStatement = Expression Block

/* DO STATEMENTS */

DoStatement = Block Expression


/* FOR STATEMENTS */

ForStatement = ForControl Block

ForControl = LoopVariableDefinition


( LoopVariableDefinition )*

LoopVariableDefinition = Name Expression


( Expression )?
| QualifiedName Name Expression

/* BREAK STATEMENTS */

BreakStatement =

/* RETURN STATEMENTS */

ReturnStatement = Expression

/* ACCEPT STATEMENTS */

AcceptStatement = AcceptClause
( SimpleAcceptStatementCompletion
| CompoundAcceptStatementCompletion )

SimpleAcceptStatementCompletion


=

CompoundAcceptStatementCompletion


= Block ( AcceptBlock )*

AcceptBlock = AcceptClause Block

AcceptClause = ( Name )?
QualifiedNameList

/* CLASSIFY STATEMENTS */

ClassifyStatement = Expression ClassificationClause

ClassificationClause = ClassificationFromClause


( ClassificationToClause )?
| ( ReclassifyAllClause )?
ClassificationToClause

ClassificationFromClause = QualifiedNameList

ClassificationToClause = QualifiedNameList

ReclassifyAllClause =

QualifiedNameList = QualifiedName ( QualifiedName )*

/*********

* UNITS *

*********/

UnitDefinition = ( NamespaceDeclaration )?
( ImportDeclaration )*
( )?
StereotypeAnnotations NamespaceDefinition

StereotypeAnnotations = ( StereotypeAnnotation )*

StereotypeAnnotation = QualifiedName
( TaggedValues )?

TaggedValues = QualifiedNameList


| TaggedValueList

TaggedValueList = TaggedValue ( "," TaggedValue )*

TaggedValue = Name
(
|
|
| (
| )?
(
|
|
|
)
)

NamespaceDeclaration = QualifiedName

ImportDeclaration = ImportVisibilityIndicator
ImportReference

ImportVisibilityIndicator =


|

ImportReference = ColonQualifiedName


(
| AliasDefinition )?
| DotQualifiedName
( | AliasDefinition )?
| Name
( ( | )
| AliasDefinition )?

AliasDefinition = Name

/* NAMESPACES */

NamespaceDefinition = PackageDefinition | ClassifierDefinition

VisibilityIndicator = ImportVisibilityIndicator |

/* PACKAGES */

PackageDeclaration =
Name

PackageDefinition = PackageDeclaration PackageBody

PackageDefinitionOrStub = PackageDeclaration
( | PackageBody )

PackageBody = ( PackagedElement )*

PackagedElement = ( )?
StereotypeAnnotations
ImportVisibilityIndicator
PackagedElementDefinition

PackagedElementDefinition = PackageDefinitionOrStub


| ClassifierDefinitionOrStub

/***************

* CLASSIFIERS *

***************/

ClassifierDefinition = ClassDefinition
| ActiveClassDefinition
| DataTypeDefinition
| EnumerationDefinition
| AssociationDefinition
| SignalDefinition
| ActivityDefinition

ClassifierDefinitionOrStub = ClassDefinitionOrStub


| ActiveClassDefinitionOrStub
| DataTypeDefinitionOrStub
| EnumerationDefinitionOrStub
| AssociationDefinitionOrStub
| SignalDefinitionOrStub
| ActivityDefinitionOrStub

ClassifierSignature = Name ( TemplateParameters )?


( SpecializationClause )?

TemplateParameters = ClassifierTemplateParameter


( ClassifierTemplateParameter )*

ClassifierTemplateParameter = ( )? Name


( QualifiedName )?

SpecializationClause = QualifiedNameList

/* CLASSES */

ClassDeclaration = ( )? ClassifierSignature

ClassDefinition = ClassDeclaration ClassBody

ClassDefinitionOrStub = ClassDeclaration ( | ClassBody )

ClassBody = ( ClassMember )*

ClassMember = ( )?


StereotypeAnnotations
( VisibilityIndicator )?
ClassMemberDefinition

ClassMemberDefinition = ClassifierDefinitionOrStub


| FeatureDefinitionOrStub

/* ACTIVE CLASSES */

ActiveClassDeclaration = ( )?
ClassifierSignature

ActiveClassDefinition = ActiveClassDeclaration ActiveClassBody

ActiveClassDefinitionOrStub = ActiveClassDeclaration
( | ActiveClassBody )

ActiveClassBody = ( ActiveClassMember )*


( BehaviorClause )?

BehaviorClause = Block | Name

ActiveClassMember = ( )?
StereotypeAnnotations
( VisibilityIndicator )?
ActiveClassMemberDefinition

ActiveClassMemberDefinition = ClassMemberDefinition


| ActiveFeatureDefinitionOrStub

/* DATA TYPES */

DataTypeDeclaration = ( )?
ClassifierSignature

DataTypeDefinition = DataTypeDeclaration StructuredBody

DataTypeDefinitionOrStub = DataTypeDeclaration
( | StructuredBody )

StructuredBody = ( StructuredMember )*

StructuredMember = ( )?
StereotypeAnnotations (
)?
PropertyDefinition

/* ASSOCIATIONS */

AssociationDeclaration = ( )? ClassifierSignature

AssociationDefinition = AssociationDeclaration StructuredBody

AssociationDefinitionOrStub = AssociationDeclaration
( | StructuredBody )

/* ENUMERATIONS */

EnumerationDeclaration = Name ( SpecializationClause )?

EnumerationDefinition = EnumerationDeclaration EnumerationBody

EnumerationDefinitionOrStub = EnumerationDeclaration
( | EnumerationBody )

EnumerationBody = EnumerationLiteralName


( EnumerationLiteralName )*

EnumerationLiteralName = ( )? Name

/* SIGNALS */

SignalDeclaration = ( )? ClassifierSignature

SignalDefinition = SignalDeclaration StructuredBody

SignalDefinitionOrStub = SignalDeclaration


( | StructuredBody )

/* ACTIVITIES */

ActivityDeclaration = Name ( TemplateParameters )?
FormalParameters ( TypePart )?

ActivityDefinition = ActivityDeclaration Block

ActivityDefinitionOrStub = ActivityDeclaration ( | Block )

FormalParameters = ( FormalParameterList )?

FormalParameterList = FormalParameter ( FormalParameter )*

FormalParameter = ( )?


StereotypeAnnotations ParameterDirection Name
TypePart

ParameterDirection = | |

/* FEATURES */

FeatureDefinitionOrStub = AttributeDefinition


| OperationDefinitionOrStub

ActiveFeatureDefinitionOrStub = ReceptionDefinition


| SignalReceptionDefinitionOrStub

/* PROPERTIES */

PropertyDefinition = PropertyDeclaration

AttributeDefinition = PropertyDeclaration ( AttributeInitializer )?


AttributeInitializer = InitializationExpression

PropertyDeclaration = Name ( )? TypePart

TypePart = TypeName ( Multiplicity )?

TypeName = ( QualifiedName | )

Multiplicity = ( MultiplicityRange )?


( ( )?
| ( )?
|
)?

MultiplicityRange = ( )?


UnlimitedNaturalLiteral

UnlimitedNaturalLiteral = |

/* OPERATIONS */

OperationDeclaration = ( )? Name FormalParameters


( TypePart )? ( RedefinitionClause )?

OperationDefinitionOrStub = OperationDeclaration ( | Block )

RedefinitionClause = QualifiedNameList

/* RECEPTIONS */

ReceptionDefinition = QualifiedName

SignalReceptionDeclaration = Name


( SpecializationClause )?

SignalReceptionDefinitionOrStub


= SignalReceptionDeclaration
( | StructuredBody )



Download 1.74 Mb.

Share with your friends:
1   ...   54   55   56   57   58   59   60   61   62




The database is protected by copyright ©ininet.org 2024
send message

    Main page