TTCN-3 BNF v2.2.1

TTCN3Module   ::=   TTCN3ModuleKeyword TTCN3ModuleId BeginChar [ ModuleDefinitionsPart ] [ ModuleControlPart ] EndChar [ WithStatement ] [ SemiColon ]
TTCN3ModuleKeyword   ::=   "module"
TTCN3ModuleId   ::=   ModuleIdentifier [ DefinitiveIdentifier ]
ModuleIdentifier   ::=   Identifier
DefinitiveIdentifier   ::=   Dot ObjectIdentifierKeyword "{" DefinitiveObjIdComponentList "}"
DefinitiveObjIdComponentList   ::=   { DefinitiveObjIdComponent }+
DefinitiveObjIdComponent   ::=   NameForm | DefinitiveNumberForm | DefinitiveNameAndNumberForm
DefinitiveNumberForm   ::=   Number
DefinitiveNameAndNumberForm   ::=   Identifier "(" DefinitiveNumberForm ")"
ModuleDefinitionsPart   ::=   ModuleDefinitionsList
ModuleDefinitionsList   ::=   { ModuleDefinition [ SemiColon ] }+
ModuleDefinition   ::=   ( TypeDef | ConstDef | TemplateDef | ModuleParDef | FunctionDef | SignatureDef | TestcaseDef | AltstepDef | ImportDef | GroupDef | ExtFunctionDef | ExtConstDef ) [ WithStatement ]
TypeDef   ::=   TypeDefKeyword TypeDefBody
TypeDefBody   ::=   StructuredTypeDef | SubTypeDef
TypeDefKeyword   ::=   "type"
StructuredTypeDef   ::=   RecordDef | UnionDef | SetDef | RecordOfDef | SetOfDef | EnumDef | PortDef | ComponentDef
RecordDef   ::=   RecordKeyword StructDefBody
RecordKeyword   ::=   "record"
StructDefBody   ::=   ( StructTypeIdentifier [ StructDefFormalParList ] | AddressKeyword ) BeginChar [ StructFieldDef { "," StructFieldDef } ] EndChar
StructTypeIdentifier   ::=   Identifier
StructDefFormalParList   ::=   "(" StructDefFormalPar { "," StructDefFormalPar } ")"
StructDefFormalPar   ::=   FormalValuePar
StructFieldDef   ::=   Type StructFieldIdentifier [ ArrayDef ] [ SubTypeSpec ] [ OptionalKeyword ]
StructFieldIdentifier   ::=   Identifier
OptionalKeyword   ::=   "optional"
UnionDef   ::=   UnionKeyword UnionDefBody
UnionKeyword   ::=   "union"
UnionDefBody   ::=   ( StructTypeIdentifier [ StructDefFormalParList ] | AddressKeyword ) BeginChar UnionFieldDef { "," UnionFieldDef } EndChar
UnionFieldDef   ::=   Type StructFieldIdentifier [ ArrayDef ] [ SubTypeSpec ]
SetDef   ::=   SetKeyword StructDefBody
SetKeyword   ::=   "set"
RecordOfDef   ::=   RecordKeyword [ StringLength ] OfKeyword StructOfDefBody
OfKeyword   ::=   "of"
StructOfDefBody   ::=   Type ( StructTypeIdentifier | AddressKeyword ) [ SubTypeSpec ]
SetOfDef   ::=   SetKeyword [ StringLength ] OfKeyword StructOfDefBody
EnumDef   ::=   EnumKeyword ( EnumTypeIdentifier | AddressKeyword ) BeginChar EnumerationList EndChar
EnumKeyword   ::=   "enumerated"
EnumTypeIdentifier   ::=   Identifier
EnumerationList   ::=   Enumeration { "," Enumeration }
Enumeration   ::=   EnumerationIdentifier [ "(" Number ")" ]
EnumerationIdentifier   ::=   Identifier
SubTypeDef   ::=   Type ( SubTypeIdentifier | AddressKeyword ) [ ArrayDef ] [ SubTypeSpec ]
SubTypeIdentifier   ::=   Identifier
SubTypeSpec   ::=   AllowedValues | StringLength
AllowedValues   ::=   "(" ValueOrRange { "," ValueOrRange } ")"
ValueOrRange   ::=   RangeDef | SingleConstExpression
RangeDef   ::=   LowerBound ".." UpperBound
StringLength   ::=   LengthKeyword "(" SingleConstExpression [ ".." UpperBound ] ")"
LengthKeyword   ::=   "length"
PortType   ::=   [ GlobalModuleId Dot ] PortTypeIdentifier
PortDef   ::=   PortKeyword PortDefBody
PortDefBody   ::=   PortTypeIdentifier PortDefAttribs
PortKeyword   ::=   "port"
PortTypeIdentifier   ::=   Identifier
PortDefAttribs   ::=   MessageAttribs | ProcedureAttribs | MixedAttribs
MessageAttribs   ::=   MessageKeyword BeginChar { MessageList [ SemiColon ] }+ EndChar
MessageList   ::=   Direction AllOrTypeList
Direction   ::=   InParKeyword | OutParKeyword | InOutParKeyword
MessageKeyword   ::=   "message"
AllOrTypeList   ::=   AllKeyword | TypeList
AllKeyword   ::=   "all"
TypeList   ::=   Type { "," Type }
ProcedureAttribs   ::=   ProcedureKeyword BeginChar { ProcedureList [ SemiColon ] }+ EndChar
ProcedureKeyword   ::=   "procedure"
ProcedureList   ::=   Direction AllOrSignatureList
AllOrSignatureList   ::=   AllKeyword | SignatureList
SignatureList   ::=   Signature { "," Signature }
MixedAttribs   ::=   MixedKeyword BeginChar { MixedList [ SemiColon ] }+ EndChar
MixedKeyword   ::=   "mixed"
MixedList   ::=   Direction ProcOrTypeList
ProcOrTypeList   ::=   AllKeyword | ( ProcOrType { "," ProcOrType } )
ProcOrType   ::=   Signature | Type
ComponentDef   ::=   ComponentKeyword ComponentTypeIdentifier BeginChar [ ComponentDefList ] EndChar
ComponentKeyword   ::=   "component"
ComponentType   ::=   [ GlobalModuleId Dot ] ComponentTypeIdentifier
ComponentTypeIdentifier   ::=   Identifier
ComponentDefList   ::=   { ComponentElementDef [ SemiColon ] }
ComponentElementDef   ::=   PortInstance | VarInstance | TimerInstance | ConstDef
PortInstance   ::=   PortKeyword PortType PortElement { "," PortElement }
PortElement   ::=   PortIdentifier [ ArrayDef ]
PortIdentifier   ::=   Identifier
ConstDef   ::=   ConstKeyword Type ConstList
ConstList   ::=   SingleConstDef { "," SingleConstDef }
SingleConstDef   ::=   ConstIdentifier [ ArrayDef ] AssignmentChar ConstantExpression
ConstKeyword   ::=   "const"
ConstIdentifier   ::=   Identifier
TemplateDef   ::=   TemplateKeyword BaseTemplate [ DerivedDef ] AssignmentChar TemplateBody
BaseTemplate   ::=   ( Type | Signature ) TemplateIdentifier [ "(" TemplateFormalParList ")" ]
TemplateKeyword   ::=   "template"
TemplateIdentifier   ::=   Identifier
DerivedDef   ::=   ModifiesKeyword TemplateRef
ModifiesKeyword   ::=   "modifies"
TemplateFormalParList   ::=   TemplateFormalPar { "," TemplateFormalPar }
TemplateFormalPar   ::=   FormalValuePar | FormalTemplatePar
TemplateBody   ::=   SimpleSpec | FieldSpecList | ArrayValueOrAttrib
SimpleSpec   ::=   SingleValueOrAttrib
FieldSpecList   ::=   "{" [ FieldSpec { "," FieldSpec } ] "}"
FieldSpec   ::=   FieldReference AssignmentChar TemplateBody
FieldReference   ::=   StructFieldRef | ArrayOrBitRef | ParRef
StructFieldRef   ::=   StructFieldIdentifier
ParRef   ::=   SignatureParIdentifier
SignatureParIdentifier   ::=   ValueParIdentifier
ArrayOrBitRef   ::=   "[" FieldOrBitNumber "]"
FieldOrBitNumber   ::=   SingleExpression
SingleValueOrAttrib   ::=   MatchingSymbol [ ExtraMatchingAttributes ] | SingleExpression [ ExtraMatchingAttributes ] | TemplateRefWithParList
ArrayValueOrAttrib   ::=   "{" ArrayElementSpecList "}"
ArrayElementSpecList   ::=   ArrayElementSpec { "," ArrayElementSpec }
ArrayElementSpec   ::=   NotUsedSymbol | TemplateBody
NotUsedSymbol   ::=   Dash
MatchingSymbol   ::=   Complement | AnyValue | AnyOrOmit | ValueOrAttribList | Range | BitStringMatch | HexStringMatch | OctetStringMatch | CharStringMatch | SubsetMatch | SupersetMatch
ExtraMatchingAttributes   ::=   LengthMatch | IfPresentMatch | LengthMatch IfPresentMatch
BitStringMatch   ::=   "'" { BinOrMatch } "'" "B"
BinOrMatch   ::=   Bin | AnyValue | AnyOrOmit
HexStringMatch   ::=   "'" { HexOrMatch } "'" "H"
HexOrMatch   ::=   Hex | AnyValue | AnyOrOmit
OctetStringMatch   ::=   "'" { OctOrMatch } "'" "O"
OctOrMatch   ::=   Oct | AnyValue | AnyOrOmit
CharStringMatch   ::=   PatternKeyword Cstring
PatternKeyword   ::=   "pattern"
Complement   ::=   ComplementKeyword ValueList
ComplementKeyword   ::=   "complement"
ValueList   ::=   "(" ConstantExpression { "," ConstantExpression } ")"
SubsetMatch   ::=   SubsetKeyword ValueList
SubsetKeyword   ::=   "subset"
SupersetMatch   ::=   SupersetKeyword ValueList
SupersetKeyword   ::=   "superset"
AnyValue   ::=   "?"
AnyOrOmit   ::=   "*"
ValueOrAttribList   ::=   "(" TemplateBody { "," TemplateBody }+ ")"
LengthMatch   ::=   StringLength
IfPresentMatch   ::=   IfPresentKeyword
IfPresentKeyword   ::=   "ifpresent"
Range   ::=   "(" LowerBound ".." UpperBound ")"
LowerBound   ::=   SingleConstExpression | Minus InfinityKeyword
UpperBound   ::=   SingleConstExpression | InfinityKeyword
InfinityKeyword   ::=   "infinity"
TemplateInstance   ::=   InLineTemplate
TemplateRefWithParList   ::=   [ GlobalModuleId Dot ] TemplateIdentifier [ TemplateActualParList ] | TemplateParIdentifier
TemplateRef   ::=   [ GlobalModuleId Dot ] TemplateIdentifier | TemplateParIdentifier
InLineTemplate   ::=   [ ( Type | Signature ) Colon ] [ DerivedDef AssignmentChar ] TemplateBody
TemplateActualParList   ::=   "(" TemplateActualPar { "," TemplateActualPar } ")"
TemplateActualPar   ::=   TemplateInstance
TemplateOps   ::=   MatchOp | ValueofOp
MatchOp   ::=   MatchKeyword "(" Expression "," TemplateInstance ")"
MatchKeyword   ::=   "match"
ValueofOp   ::=   ValueofKeyword "(" TemplateInstance ")"
ValueofKeyword   ::=   "valueof"
FunctionDef   ::=   FunctionKeyword FunctionIdentifier "(" [ FunctionFormalParList ] ")" [ RunsOnSpec ] [ ReturnType ] StatementBlock
FunctionKeyword   ::=   "function"
FunctionIdentifier   ::=   Identifier
FunctionFormalParList   ::=   FunctionFormalPar { "," FunctionFormalPar }
FunctionFormalPar   ::=   FormalValuePar | FormalTimerPar | FormalTemplatePar | FormalPortPar
ReturnType   ::=   ReturnKeyword Type
ReturnKeyword   ::=   "return"
RunsOnSpec   ::=   RunsKeyword OnKeyword ComponentType
RunsKeyword   ::=   "runs"
OnKeyword   ::=   "on"
MTCKeyword   ::=   "mtc"
StatementBlock   ::=   BeginChar [ FunctionStatementOrDefList ] EndChar
FunctionStatementOrDefList   ::=   { FunctionStatementOrDef [ SemiColon ] }+
FunctionStatementOrDef   ::=   FunctionLocalDef | FunctionLocalInst | FunctionStatement
FunctionLocalInst   ::=   VarInstance | TimerInstance
FunctionLocalDef   ::=   ConstDef
FunctionStatement   ::=   ConfigurationStatements | TimerStatements | CommunicationStatements | BasicStatements | BehaviourStatements | VerdictStatements | SUTStatements
FunctionInstance   ::=   FunctionRef "(" [ FunctionActualParList ] ")"
FunctionRef   ::=   [ GlobalModuleId Dot ] ( FunctionIdentifier | ExtFunctionIdentifier ) | PreDefFunctionIdentifier
PreDefFunctionIdentifier   ::=   Identifier
FunctionActualParList   ::=   FunctionActualPar { "," FunctionActualPar }
FunctionActualPar   ::=   TimerRef | TemplateInstance | Port | ComponentRef
SignatureDef   ::=   SignatureKeyword SignatureIdentifier "(" [ SignatureFormalParList ] ")" [ ReturnType | NoBlockKeyword ] [ ExceptionSpec ]
SignatureKeyword   ::=   "signature"
SignatureIdentifier   ::=   Identifier
SignatureFormalParList   ::=   SignatureFormalPar { "," SignatureFormalPar }
SignatureFormalPar   ::=   FormalValuePar
ExceptionSpec   ::=   ExceptionKeyword "(" ExceptionTypeList ")"
ExceptionKeyword   ::=   "exception"
ExceptionTypeList   ::=   Type { "," Type }
NoBlockKeyword   ::=   "noblock"
Signature   ::=   [ GlobalModuleId Dot ] SignatureIdentifier
TestcaseDef   ::=   TestcaseKeyword TestcaseIdentifier "(" [ TestcaseFormalParList ] ")" ConfigSpec StatementBlock
TestcaseKeyword   ::=   "testcase"
TestcaseIdentifier   ::=   Identifier
TestcaseFormalParList   ::=   TestcaseFormalPar { "," TestcaseFormalPar }
TestcaseFormalPar   ::=   FormalValuePar | FormalTemplatePar
ConfigSpec   ::=   RunsOnSpec [ SystemSpec ]
SystemSpec   ::=   SystemKeyword ComponentType
SystemKeyword   ::=   "system"
TestcaseInstance   ::=   ExecuteKeyword "(" TestcaseRef "(" [ TestcaseActualParList ] ")" [ "," TimerValue ] ")"
ExecuteKeyword   ::=   "execute"
TestcaseRef   ::=   [ GlobalModuleId Dot ] TestcaseIdentifier
TestcaseActualParList   ::=   TestcaseActualPar { "," TestcaseActualPar }
TestcaseActualPar   ::=   TemplateInstance
AltstepDef   ::=   AltstepKeyword AltstepIdentifier "(" [ AltstepFormalParList ] ")" [ RunsOnSpec ] BeginChar AltstepLocalDefList AltGuardList EndChar
AltstepKeyword   ::=   "altstep"
AltstepIdentifier   ::=   Identifier
AltstepFormalParList   ::=   FunctionFormalParList
AltstepLocalDefList   ::=   { AltstepLocalDef [ SemiColon ] }
AltstepLocalDef   ::=   VarInstance | TimerInstance | ConstDef
AltstepInstance   ::=   AltstepRef "(" [ FunctionActualParList ] ")"
AltstepRef   ::=   [ GlobalModuleId Dot ] AltstepIdentifier
ImportDef   ::=   ImportKeyword ImportFromSpec ( AllWithExcepts | ( BeginChar ImportSpec EndChar ) )
ImportKeyword   ::=   "import"
AllWithExcepts   ::=   AllKeyword [ ExceptsDef ]
ExceptsDef   ::=   ExceptKeyword BeginChar ExceptSpec EndChar
ExceptKeyword   ::=   "except"
ExceptSpec   ::=   { ExceptElement [ SemiColon ] }
ExceptElement   ::=   ExceptGroupSpec | ExceptTypeDefSpec | ExceptTemplateSpec | ExceptConstSpec | ExceptTestcaseSpec | ExceptAltstepSpec | ExceptFunctionSpec | ExceptSignatureSpec | ExceptModuleParSpec
ExceptGroupSpec   ::=   GroupKeyword ( ExceptGroupRefList | AllKeyword )
ExceptTypeDefSpec   ::=   TypeDefKeyword ( TypeRefList | AllKeyword )
ExceptTemplateSpec   ::=   TemplateKeyword ( TemplateRefList | AllKeyword )
ExceptConstSpec   ::=   ConstKeyword ( ConstRefList | AllKeyword )
ExceptTestcaseSpec   ::=   TestcaseKeyword ( TestcaseRefList | AllKeyword )
ExceptAltstepSpec   ::=   AltstepKeyword ( AltstepRefList | AllKeyword )
ExceptFunctionSpec   ::=   FunctionKeyword ( FunctionRefList | AllKeyword )
ExceptSignatureSpec   ::=   SignatureKeyword ( SignatureRefList | AllKeyword )
ExceptModuleParSpec   ::=   ModuleParKeyword ( ModuleParRefList | AllKeyword )
ImportSpec   ::=   { ImportElement [ SemiColon ] }
ImportElement   ::=   ImportGroupSpec | ImportTypeDefSpec | ImportTemplateSpec | ImportConstSpec | ImportTestcaseSpec | ImportAltstepSpec | ImportFunctionSpec | ImportSignatureSpec | ImportModuleParSpec
ImportFromSpec   ::=   FromKeyword ModuleId [ RecursiveKeyword ]
ModuleId   ::=   GlobalModuleId [ LanguageSpec ]
LanguageKeyword   ::=   "language"
LanguageSpec   ::=   LanguageKeyword FreeText
GlobalModuleId   ::=   ModuleIdentifier [ Dot ObjectIdentifierValue ]
RecursiveKeyword   ::=   "recursive"
ImportGroupSpec   ::=   GroupKeyword ( GroupRefList | AllGroupsWithExcept )
GroupRefList   ::=   FullGroupIdentifier { "," FullGroupIdentifier }
AllGroupsWithExcept   ::=   AllKeyword [ ExceptKeyword GroupRefList ]
FullGroupIdentifier   ::=   GroupIdentifier { Dot GroupIdentifier } [ ExceptsDef ]
ExceptGroupRefList   ::=   ExceptFullGroupIdentifier { "," ExceptFullGroupIdentifier }
ExceptFullGroupIdentifier   ::=   GroupIdentifier { Dot GroupIdentifier }
ImportTypeDefSpec   ::=   TypeDefKeyword ( TypeRefList | AllTypesWithExcept )
TypeRefList   ::=   TypeDefIdentifier { "," TypeDefIdentifier }
AllTypesWithExcept   ::=   AllKeyword [ ExceptKeyword TypeRefList ]
TypeDefIdentifier   ::=   StructTypeIdentifier | EnumTypeIdentifier | PortTypeIdentifier | ComponentTypeIdentifier | SubTypeIdentifier
ImportTemplateSpec   ::=   TemplateKeyword ( TemplateRefList | AllTemplsWithExcept )
TemplateRefList   ::=   TemplateIdentifier { "," TemplateIdentifier }
AllTemplsWithExcept   ::=   AllKeyword [ ExceptKeyword TemplateRefList ]
ImportConstSpec   ::=   ConstKeyword ( ConstRefList | AllConstsWithExcept )
ConstRefList   ::=   ConstIdentifier { "," ConstIdentifier }
AllConstsWithExcept   ::=   AllKeyword [ ExceptKeyword ConstRefList ]
ImportAltstepSpec   ::=   AltstepKeyword ( AltstepRefList | AllAltstepsWithExcept )
AltstepRefList   ::=   AltstepIdentifier { "," AltstepIdentifier }
AllAltstepsWithExcept   ::=   AllKeyword [ ExceptKeyword AltstepRefList ]
ImportTestcaseSpec   ::=   TestcaseKeyword ( TestcaseRefList | AllTestcasesWithExcept )
TestcaseRefList   ::=   TestcaseIdentifier { "," TestcaseIdentifier }
AllTestcasesWithExcept   ::=   AllKeyword [ ExceptKeyword TestcaseRefList ]
ImportFunctionSpec   ::=   FunctionKeyword ( FunctionRefList | AllFunctionsWithExcept )
FunctionRefList   ::=   FunctionIdentifier { "," FunctionIdentifier }
AllFunctionsWithExcept   ::=   AllKeyword [ ExceptKeyword FunctionRefList ]
ImportSignatureSpec   ::=   SignatureKeyword ( SignatureRefList | AllSignaturesWithExcept )
SignatureRefList   ::=   SignatureIdentifier { "," SignatureIdentifier }
AllSignaturesWithExcept   ::=   AllKeyword [ ExceptKeyword SignatureRefList ]
ImportModuleParSpec   ::=   ModuleParKeyword ( ModuleParRefList | AllModuleParWithExcept )
ModuleParRefList   ::=   ModuleParIdentifier { "," ModuleParIdentifier }
AllModuleParWithExcept   ::=   AllKeyword [ ExceptKeyword ModuleParRefList ]
GroupDef   ::=   GroupKeyword GroupIdentifier BeginChar [ ModuleDefinitionsPart ] EndChar
GroupKeyword   ::=   "group"
GroupIdentifier   ::=   Identifier
ExtFunctionDef   ::=   ExtKeyword FunctionKeyword ExtFunctionIdentifier "(" [ FunctionFormalParList ] ")" [ ReturnType ]
ExtKeyword   ::=   "external"
ExtFunctionIdentifier   ::=   Identifier
ExtConstDef   ::=   ExtKeyword ConstKeyword Type ExtConstIdentifier
ExtConstIdentifier   ::=   Identifier
ModuleParDef   ::=   ModuleParKeyword "{" ModuleParList "}"
ModuleParKeyword   ::=   "modulepar"
ModuleParList   ::=   ModulePar { SemiColon ModulePar }
ModulePar   ::=   ModuleParType ModuleParIdentifier [ AssignmentChar ConstantExpression ] { "," ModuleParIdentifier [ AssignmentChar ConstantExpression ] }
ModuleParType   ::=   Type
ModuleParIdentifier   ::=   Identifier
ModuleControlPart   ::=   ControlKeyword BeginChar ModuleControlBody EndChar [ WithStatement ] [ SemiColon ]
ControlKeyword   ::=   "control"
ModuleControlBody   ::=   [ ControlStatementOrDefList ]
ControlStatementOrDefList   ::=   { ControlStatementOrDef [ SemiColon ] }+
ControlStatementOrDef   ::=   FunctionLocalInst | ControlStatement | FunctionLocalDef
ControlStatement   ::=   TimerStatements | BasicStatements | BehaviourStatements | SUTStatements
VarInstance   ::=   VarKeyword Type VarList
VarList   ::=   SingleVarInstance { "," SingleVarInstance }
SingleVarInstance   ::=   VarIdentifier [ ArrayDef ] [ AssignmentChar VarInitialValue ]
VarInitialValue   ::=   Expression
VarKeyword   ::=   "var"
VarIdentifier   ::=   Identifier
VariableRef   ::=   ( VarIdentifier | ValueParIdentifier ) [ ExtendedFieldReference ]
TimerInstance   ::=   TimerKeyword TimerList
TimerList   ::=   SingleTimerInstance { "," SingleTimerInstance }
SingleTimerInstance   ::=   TimerIdentifier [ ArrayDef ] [ AssignmentChar TimerValue ]
TimerKeyword   ::=   "timer"
TimerIdentifier   ::=   Identifier
TimerValue   ::=   Expression
TimerRef   ::=   TimerIdentifier [ ArrayOrBitRef ] | TimerParIdentifier [ ArrayOrBitRef ]
ConfigurationStatements   ::=   ConnectStatement | MapStatement | DisconnectStatement | UnmapStatement | DoneStatement | StartTCStatement | StopTCStatement
ConfigurationOps   ::=   CreateOp | SelfOp | SystemOp | MTCOp | RunningOp
CreateOp   ::=   ComponentType Dot CreateKeyword
SystemOp   ::=   SystemKeyword
SelfOp   ::=   "self"
MTCOp   ::=   MTCKeyword
DoneStatement   ::=   ComponentId Dot DoneKeyword
ComponentId   ::=   ComponentIdentifier | ( AnyKeyword | AllKeyword ) ComponentKeyword
DoneKeyword   ::=   "done"
RunningOp   ::=   ComponentId Dot RunningKeyword
RunningKeyword   ::=   "running"
CreateKeyword   ::=   "create"
ConnectStatement   ::=   ConnectKeyword PortSpec
ConnectKeyword   ::=   "connect"
PortSpec   ::=   "(" PortRef "," PortRef ")"
PortRef   ::=   ComponentRef Colon Port
ComponentRef   ::=   ComponentIdentifier | SystemOp | SelfOp | MTCOp
DisconnectStatement   ::=   DisconnectKeyword PortSpec
DisconnectKeyword   ::=   "disconnect"
MapStatement   ::=   MapKeyword PortSpec
MapKeyword   ::=   "map"
UnmapStatement   ::=   UnmapKeyword PortSpec
UnmapKeyword   ::=   "unmap"
StartTCStatement   ::=   ComponentIdentifier Dot StartKeyword "(" FunctionInstance ")"
StartKeyword   ::=   "start"
StopTCStatement   ::=   StopKeyword | ComponentIdentifier Dot StopKeyword | AllKeyword ComponentKeyword Dot StopKeyword
ComponentIdentifier   ::=   VariableRef | FunctionInstance
Port   ::=   ( PortIdentifier | PortParIdentifier ) [ ArrayOrBitRef ]
CommunicationStatements   ::=   SendStatement | CallStatement | ReplyStatement | RaiseStatement | ReceiveStatement | TriggerStatement | GetCallStatement | GetReplyStatement | CatchStatement | CheckStatement | ClearStatement | StartStatement | StopStatement
SendStatement   ::=   Port Dot PortSendOp
PortSendOp   ::=   SendOpKeyword "(" SendParameter ")" [ ToClause ]
SendOpKeyword   ::=   "send"
SendParameter   ::=   TemplateInstance
ToClause   ::=   ToKeyword AddressRef
ToKeyword   ::=   "to"
AddressRef   ::=   VariableRef | FunctionInstance
CallStatement   ::=   Port Dot PortCallOp [ PortCallBody ]
PortCallOp   ::=   CallOpKeyword "(" CallParameters ")" [ ToClause ]
CallOpKeyword   ::=   "call"
CallParameters   ::=   TemplateInstance [ "," CallTimerValue ]
CallTimerValue   ::=   TimerValue | NowaitKeyword
NowaitKeyword   ::=   "nowait"
PortCallBody   ::=   BeginChar CallBodyStatementList EndChar
CallBodyStatementList   ::=   { CallBodyStatement [ SemiColon ] }+
CallBodyStatement   ::=   CallBodyGuard StatementBlock
CallBodyGuard   ::=   AltGuardChar CallBodyOps
CallBodyOps   ::=   GetReplyStatement | CatchStatement
ReplyStatement   ::=   Port Dot PortReplyOp
PortReplyOp   ::=   ReplyKeyword "(" TemplateInstance [ ReplyValue ] ")" [ ToClause ]
ReplyKeyword   ::=   "reply"
ReplyValue   ::=   ValueKeyword Expression
RaiseStatement   ::=   Port Dot PortRaiseOp
PortRaiseOp   ::=   RaiseKeyword "(" Signature "," TemplateInstance ")" [ ToClause ]
RaiseKeyword   ::=   "raise"
ReceiveStatement   ::=   PortOrAny Dot PortReceiveOp
PortOrAny   ::=   Port | AnyKeyword PortKeyword
PortReceiveOp   ::=   ReceiveOpKeyword [ "(" ReceiveParameter ")" ] [ FromClause ] [ PortRedirect ]
ReceiveOpKeyword   ::=   "receive"
ReceiveParameter   ::=   TemplateInstance
FromClause   ::=   FromKeyword AddressRef
FromKeyword   ::=   "from"
PortRedirect   ::=   PortRedirectSymbol ( ValueSpec [ SenderSpec ] | SenderSpec )
PortRedirectSymbol   ::=   "->"
ValueSpec   ::=   ValueKeyword VariableRef
ValueKeyword   ::=   "value"
SenderSpec   ::=   SenderKeyword VariableRef
SenderKeyword   ::=   "sender"
TriggerStatement   ::=   PortOrAny Dot PortTriggerOp
PortTriggerOp   ::=   TriggerOpKeyword [ "(" ReceiveParameter ")" ] [ FromClause ] [ PortRedirect ]
TriggerOpKeyword   ::=   "trigger"
GetCallStatement   ::=   PortOrAny Dot PortGetCallOp
PortGetCallOp   ::=   GetCallOpKeyword [ "(" ReceiveParameter ")" ] [ FromClause ] [ PortRedirectWithParam ]
GetCallOpKeyword   ::=   "getcall"
PortRedirectWithParam   ::=   PortRedirectSymbol RedirectSpec
RedirectSpec   ::=   ValueSpec [ ParaSpec ] [ SenderSpec ] | ParaSpec [ SenderSpec ] | SenderSpec
ParaSpec   ::=   ParaKeyword ParaAssignmentList
ParaKeyword   ::=   "param"
ParaAssignmentList   ::=   "(" ( AssignmentList | VariableList ) ")"
AssignmentList   ::=   VariableAssignment { "," VariableAssignment }
VariableAssignment   ::=   VariableRef AssignmentChar ParameterIdentifier
ParameterIdentifier   ::=   ValueParIdentifier | TimerParIdentifier | TemplateParIdentifier | PortParIdentifier
VariableList   ::=   VariableEntry { "," VariableEntry }
VariableEntry   ::=   VariableRef | NotUsedSymbol
GetReplyStatement   ::=   PortOrAny Dot PortGetReplyOp
PortGetReplyOp   ::=   GetReplyOpKeyword [ "(" ReceiveParameter [ ValueMatchSpec ] ")" ] [ FromClause ] [ PortRedirectWithParam ]
GetReplyOpKeyword   ::=   "getreply"
ValueMatchSpec   ::=   ValueKeyword TemplateInstance
CheckStatement   ::=   PortOrAny Dot PortCheckOp
PortCheckOp   ::=   CheckOpKeyword [ "(" CheckParameter ")" ]
CheckOpKeyword   ::=   "check"
CheckParameter   ::=   CheckPortOpsPresent | FromClausePresent | RedirectPresent
FromClausePresent   ::=   FromClause [ PortRedirectSymbol SenderSpec ]
RedirectPresent   ::=   PortRedirectSymbol SenderSpec
CheckPortOpsPresent   ::=   PortReceiveOp | PortGetCallOp | PortGetReplyOp | PortCatchOp
CatchStatement   ::=   PortOrAny Dot PortCatchOp
PortCatchOp   ::=   CatchOpKeyword [ "(" CatchOpParameter ")" ] [ FromClause ] [ PortRedirect ]
CatchOpKeyword   ::=   "catch"
CatchOpParameter   ::=   Signature "," TemplateInstance | TimeoutKeyword
ClearStatement   ::=   PortOrAll Dot PortClearOp
PortOrAll   ::=   Port | AllKeyword PortKeyword
PortClearOp   ::=   ClearOpKeyword
ClearOpKeyword   ::=   "clear"
StartStatement   ::=   PortOrAll Dot PortStartOp
PortStartOp   ::=   StartKeyword
StopStatement   ::=   PortOrAll Dot PortStopOp
PortStopOp   ::=   StopKeyword
StopKeyword   ::=   "stop"
AnyKeyword   ::=   "any"
TimerStatements   ::=   StartTimerStatement | StopTimerStatement | TimeoutStatement
TimerOps   ::=   ReadTimerOp | RunningTimerOp
StartTimerStatement   ::=   TimerRef Dot StartKeyword [ "(" TimerValue ")" ]
StopTimerStatement   ::=   TimerRefOrAll Dot StopKeyword
TimerRefOrAll   ::=   TimerRef | AllKeyword TimerKeyword
ReadTimerOp   ::=   TimerRef Dot ReadKeyword
ReadKeyword   ::=   "read"
RunningTimerOp   ::=   TimerRefOrAny Dot RunningKeyword
TimeoutStatement   ::=   TimerRefOrAny Dot TimeoutKeyword
TimerRefOrAny   ::=   TimerRef | AnyKeyword TimerKeyword
TimeoutKeyword   ::=   "timeout"
Type   ::=   PredefinedType | ReferencedType
PredefinedType   ::=   BitStringKeyword | BooleanKeyword | CharStringKeyword | UniversalCharString | CharKeyword | UniversalChar | IntegerKeyword | OctetStringKeyword | ObjectIdentifierKeyword | HexStringKeyword | VerdictTypeKeyword | FloatKeyword | AddressKeyword | DefaultKeyword | AnyTypeKeyword
BitStringKeyword   ::=   "bitstring"
BooleanKeyword   ::=   "boolean"
IntegerKeyword   ::=   "integer"
OctetStringKeyword   ::=   "octetstring"
ObjectIdentifierKeyword   ::=   "objid"
HexStringKeyword   ::=   "hexstring"
VerdictTypeKeyword   ::=   "verdicttype"
FloatKeyword   ::=   "float"
AddressKeyword   ::=   "address"
DefaultKeyword   ::=   "default"
AnyTypeKeyword   ::=   "anytype"
CharStringKeyword   ::=   "charstring"
UniversalCharString   ::=   UniversalKeyword CharStringKeyword
UniversalKeyword   ::=   "universal"
CharKeyword   ::=   "char"
UniversalChar   ::=   UniversalKeyword CharKeyword
ReferencedType   ::=   [ GlobalModuleId Dot ] TypeReference [ ExtendedFieldReference ]
TypeReference   ::=   StructTypeIdentifier [ TypeActualParList ] | EnumTypeIdentifier | SubTypeIdentifier | ComponentTypeIdentifier
TypeActualParList   ::=   "(" TypeActualPar { "," TypeActualPar } ")"
TypeActualPar   ::=   ConstantExpression
ArrayDef   ::=   { "[" ArrayBounds [ ".." ArrayBounds ] "]" }+
ArrayBounds   ::=   SingleConstExpression
Value   ::=   PredefinedValue | ReferencedValue
PredefinedValue   ::=   BitStringValue | BooleanValue | CharStringValue | IntegerValue | OctetStringValue | ObjectIdentifierValue | HexStringValue | VerdictTypeValue | EnumeratedValue | FloatValue | AddressValue | OmitValue
BitStringValue   ::=   Bstring
BooleanValue   ::=   "true" | "false"
IntegerValue   ::=   Number
OctetStringValue   ::=   Ostring
ObjectIdentifierValue   ::=   ObjectIdentifierKeyword "{" ObjIdComponentList "}"
ObjIdComponentList   ::=   { ObjIdComponent }+
ObjIdComponent   ::=   NameForm | NumberForm | NameAndNumberForm
NumberForm   ::=   Number | ReferencedValue
NameAndNumberForm   ::=   Identifier "(" NumberForm ")"
NameForm   ::=   Identifier
HexStringValue   ::=   Hstring
VerdictTypeValue   ::=   "pass" | "fail" | "inconc" | "none" | "error"
EnumeratedValue   ::=   EnumerationIdentifier
CharStringValue   ::=   Cstring | Quadruple
Quadruple   ::=   CharKeyword "(" Group "," Plane "," Row "," Cell ")"
Group   ::=   Number
Plane   ::=   Number
Row   ::=   Number
Cell   ::=   Number
FloatValue   ::=   FloatDotNotation | FloatENotation
FloatDotNotation   ::=   Number Dot DecimalNumber
FloatENotation   ::=   Number [ Dot DecimalNumber ] Exponential [ Minus ] Number
Exponential   ::=   "E"
ReferencedValue   ::=   ValueReference [ ExtendedFieldReference ]
ValueReference   ::=   [ GlobalModuleId Dot ] ( ConstIdentifier | ExtConstIdentifier ) | ValueParIdentifier | ModuleParIdentifier | VarIdentifier
Number   ::=   ( NonZeroNum { Num } ) | "0"
NonZeroNum   ::=   "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
DecimalNumber   ::=   { Num }+
Num   ::=   "0" | NonZeroNum
Bstring   ::=   "'" { Bin } "'" "B"
Bin   ::=   "0" | "1"
Hstring   ::=   "'" { Hex } "'" "H"
Hex   ::=   Num | "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f"
Ostring   ::=   "'" { Oct } "'" "O"
Oct   ::=   Hex Hex
Cstring   ::=   """ { Char } """
Char   ::=  
Identifier   ::=   Alpha { AlphaNum | Underscore }
Alpha   ::=   UpperAlpha | LowerAlpha
AlphaNum   ::=   Alpha | Num
UpperAlpha   ::=   "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"
LowerAlpha   ::=   "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"
ExtendedAlphaNum   ::=  
FreeText   ::=   """ { ExtendedAlphaNum } """
AddressValue   ::=   "null"
OmitValue   ::=   OmitKeyword
OmitKeyword   ::=   "omit"
InParKeyword   ::=   "in"
OutParKeyword   ::=   "out"
InOutParKeyword   ::=   "inout"
FormalValuePar   ::=   [ ( InParKeyword | InOutParKeyword | OutParKeyword ) ] Type ValueParIdentifier
ValueParIdentifier   ::=   Identifier
FormalPortPar   ::=   [ InOutParKeyword ] PortTypeIdentifier PortParIdentifier
PortParIdentifier   ::=   Identifier
FormalTimerPar   ::=   [ InOutParKeyword ] TimerKeyword TimerParIdentifier
TimerParIdentifier   ::=   Identifier
FormalTemplatePar   ::=   [ InParKeyword ] TemplateKeyword Type TemplateParIdentifier
TemplateParIdentifier   ::=   Identifier
WithStatement   ::=   WithKeyword WithAttribList
WithKeyword   ::=   "with"
WithAttribList   ::=   "{" MultiWithAttrib "}"
MultiWithAttrib   ::=   { SingleWithAttrib [ SemiColon ] }+
SingleWithAttrib   ::=   AttribKeyword [ OverrideKeyword ] [ AttribQualifier ] AttribSpec
AttribKeyword   ::=   EncodeKeyword | VariationKeyword | DisplayKeyword | ExtensionKeyword
EncodeKeyword   ::=   "encode"
VariationKeyword   ::=   "variant"
DisplayKeyword   ::=   "display"
ExtensionKeyword   ::=   "extension"
OverrideKeyword   ::=   "override"
AttribQualifier   ::=   "(" DefOrFieldRefList ")"
DefOrFieldRefList   ::=   DefOrFieldRef { "," DefOrFieldRef }
DefOrFieldRef   ::=   DefinitionRef | FieldReference | AllRef | PredefinedType
DefinitionRef   ::=   StructTypeIdentifier | EnumTypeIdentifier | PortTypeIdentifier | ComponentTypeIdentifier | SubTypeIdentifier | ConstIdentifier | TemplateIdentifier | AltstepIdentifier | TestcaseIdentifier | FunctionIdentifier | SignatureIdentifier | VarIdentifier | TimerIdentifier | PortIdentifier | ModuleParIdentifier | FullGroupIdentifier
AllRef   ::=   ( GroupKeyword AllKeyword [ ExceptKeyword BeginChar GroupRefList EndChar ] ) | ( TypeDefKeyword AllKeyword [ ExceptKeyword BeginChar TypeRefList ] EndChar ) | ( TemplateKeyword AllKeyword [ ExceptKeyword BeginChar TemplateRefList ] EndChar ) | ( ConstKeyword AllKeyword [ ExceptKeyword BeginChar ConstRefList ] EndChar ) | ( AltstepKeyword AllKeyword [ ExceptKeyword BeginChar AltstepRefList ] EndChar ) | ( TestcaseKeyword AllKeyword [ ExceptKeyword BeginChar TestcaseRefList ] EndChar ) | ( FunctionKeyword AllKeyword [ ExceptKeyword BeginChar FunctionRefList ] EndChar ) | ( SignatureKeyword AllKeyword [ ExceptKeyword BeginChar SignatureRefList ] EndChar ) | ( ModuleParKeyword AllKeyword [ ExceptKeyword BeginChar ModuleParRefList ] EndChar )
AttribSpec   ::=   FreeText
BehaviourStatements   ::=   TestcaseInstance | FunctionInstance | ReturnStatement | AltConstruct | InterleavedConstruct | LabelStatement | GotoStatement | RepeatStatement | DeactivateStatement | AltstepInstance
VerdictStatements   ::=   SetLocalVerdict
VerdictOps   ::=   GetLocalVerdict
SetLocalVerdict   ::=   SetVerdictKeyword "(" SingleExpression ")"
SetVerdictKeyword   ::=   "setverdict"
GetLocalVerdict   ::=   "getverdict"
SUTStatements   ::=   ActionKeyword "(" ( FreeText | TemplateRefWithParList ) ")"
ActionKeyword   ::=   "action"
ReturnStatement   ::=   ReturnKeyword [ Expression ]
AltConstruct   ::=   AltKeyword BeginChar AltGuardList EndChar
AltKeyword   ::=   "alt"
AltGuardList   ::=   { GuardStatement [ SemiColon ] }+ [ ElseStatement [ SemiColon ] ]
GuardStatement   ::=   AltGuardChar ( AltstepInstance | GuardOp StatementBlock )
ElseStatement   ::=   "[" ElseKeyword "]" StatementBlock
AltGuardChar   ::=   "[" [ BooleanExpression ] "]"
GuardOp   ::=   TimeoutStatement | ReceiveStatement | TriggerStatement | GetCallStatement | CatchStatement | CheckStatement | GetReplyStatement | DoneStatement
InterleavedConstruct   ::=   InterleavedKeyword BeginChar InterleavedGuardList EndChar
InterleavedKeyword   ::=   "interleave"
InterleavedGuardList   ::=   { InterleavedGuardElement [ SemiColon ] }+
InterleavedGuardElement   ::=   InterleavedGuard InterleavedAction
InterleavedGuard   ::=   "[" "]" GuardOp
InterleavedAction   ::=   StatementBlock
LabelStatement   ::=   LabelKeyword LabelIdentifier
LabelKeyword   ::=   "label"
LabelIdentifier   ::=   Identifier
GotoStatement   ::=   GotoKeyword LabelIdentifier
GotoKeyword   ::=   "goto"
RepeatStatement   ::=   "repeat"
ActivateOp   ::=   ActivateKeyword "(" AltstepInstance ")"
ActivateKeyword   ::=   "activate"
DeactivateStatement   ::=   DeactivateKeyword [ "(" Expression ")" ]
DeactivateKeyword   ::=   "deactivate"
BasicStatements   ::=   Assignment | LogStatement | LoopConstruct | ConditionalConstruct
Expression   ::=   SingleExpression | CompoundExpression
CompoundExpression   ::=   FieldExpressionList | ArrayExpression
FieldExpressionList   ::=   "{" FieldExpressionSpec { "," FieldExpressionSpec } "}"
FieldExpressionSpec   ::=   FieldReference AssignmentChar Expression
ArrayExpression   ::=   "{" [ ArrayElementExpressionList ] "}"
ArrayElementExpressionList   ::=   NotUsedOrExpression { "," NotUsedOrExpression }
NotUsedOrExpression   ::=   Expression | NotUsedSymbol
ConstantExpression   ::=   SingleConstExpression | CompoundConstExpression
SingleConstExpression   ::=   SingleExpression
BooleanExpression   ::=   SingleExpression
CompoundConstExpression   ::=&nb