grammar ttcn3; A.1.6 TTCN 3 syntax BNF productions A.1.6.0 TTCN 3 module 1. TTCN3Module ::= TTCN3ModuleKeyword TTCN3ModuleId "{" [ModuleDefinitionsPart] [ModuleControlPart] "}" [WithStatement] [SemiColon] 2. TTCN3ModuleKeyword ::= "module" 3. TTCN3ModuleId ::= ModuleId 4. ModuleId ::= GlobalModuleId [LanguageSpec] 5. GlobalModuleId ::= ModuleIdentifier 6. ModuleIdentifier ::= Identifier 7. LanguageSpec ::= LanguageKeyword FreeText { "," FreeText } 8. LanguageKeyword ::= "language" A.1.6.1 Module definitions part A.1.6.1.0 General 9. ModuleDefinitionsPart ::= ModuleDefinitionsList 10. ModuleDefinitionsList ::= {ModuleDefinition [SemiColon]}+ 11. ModuleDefinition ::= ( ([Visibility] ( TypeDef | ConstDef | TemplateDef | ModuleParDef | FunctionDef | SignatureDef | TestcaseDef | AltstepDef | ImportDef | ExtFunctionDef | ExtConstDef ) ) | (["public"] GroupDef ) | (["private"] FriendModuleDef ) ) [WithStatement] 12. Visibility ::= "public" | "friend" | "private" A.1.6.1.1 Typedef definitions 13. TypeDef ::= TypeDefKeyword TypeDefBody 14. TypeDefBody ::= StructuredTypeDef | SubTypeDef 15. TypeDefKeyword ::= "type" 16. StructuredTypeDef ::= RecordDef | UnionDef | SetDef | RecordOfDef | SetOfDef | EnumDef | PortDef | ComponentDef 17. RecordDef ::= RecordKeyword StructDefBody 18. RecordKeyword ::= "record" 19. StructDefBody ::= (StructTypeIdentifier | AddressKeyword) "{" [StructFieldDef {"," StructFieldDef}] "}" 20. StructTypeIdentifier ::= Identifier 21. StructFieldDef ::= (Type | NestedTypeDef) StructFieldIdentifier [ArrayDef] [SubTypeSpec] [OptionalKeyword] 22. NestedTypeDef ::= NestedRecordDef | NestedUnionDef | NestedSetDef | NestedRecordOfDef | NestedSetOfDef | NestedEnumDef 23. NestedRecordDef ::= RecordKeyword "{" [StructFieldDef {"," StructFieldDef}] "}" 24. NestedUnionDef ::= UnionKeyword "{" UnionFieldDef {"," UnionFieldDef} "}" 25. NestedSetDef ::= SetKeyword "{" [StructFieldDef {"," StructFieldDef}] "}" 26. NestedRecordOfDef ::= RecordKeyword [StringLength] OfKeyword (Type | NestedTypeDef) 27. NestedSetOfDef ::= SetKeyword [StringLength] OfKeyword (Type | NestedTypeDef) 28. NestedEnumDef ::= EnumKeyword "{" EnumerationList "}" 29. StructFieldIdentifier ::= Identifier 30. OptionalKeyword ::= "optional" 31. UnionDef ::= UnionKeyword UnionDefBody 32. UnionKeyword ::= "union" 33. UnionDefBody ::= (StructTypeIdentifier | AddressKeyword) "{" UnionFieldDef {"," UnionFieldDef} "}" 34. UnionFieldDef ::= (Type | NestedTypeDef) StructFieldIdentifier [ArrayDef] [SubTypeSpec] 35. SetDef ::= SetKeyword StructDefBody 36. SetKeyword ::= "set" 37. RecordOfDef ::= RecordKeyword [StringLength] OfKeyword StructOfDefBody 38. OfKeyword ::= "of" 39. StructOfDefBody ::= (Type | NestedTypeDef) (StructTypeIdentifier | AddressKeyword) [SubTypeSpec] 40. SetOfDef ::= SetKeyword [StringLength] OfKeyword StructOfDefBody 41. EnumDef ::= EnumKeyword (EnumTypeIdentifier | AddressKeyword) "{" EnumerationList "}" 42. EnumKeyword ::= "enumerated" 43. EnumTypeIdentifier ::= Identifier 44. EnumerationList ::= Enumeration {"," Enumeration} 45. Enumeration ::= EnumerationIdentifier ["("[Minus] Number ")"] 46. EnumerationIdentifier ::= Identifier 47. SubTypeDef ::= Type (SubTypeIdentifier | AddressKeyword) [ArrayDef] [SubTypeSpec] 48. SubTypeIdentifier ::= Identifier 49. SubTypeSpec ::= AllowedValues [StringLength] | StringLength /* STATIC SEMANTICS - AllowedValues shall be of the same type as the field being subtyped */ 50. AllowedValues ::= "(" (ValueOrRange {"," ValueOrRange}) | CharStringMatch ")" 51. ValueOrRange ::= RangeDef | ConstantExpression | Type /* STATIC SEMANTICS - RangeDef production shall only be used with integer, charstring, universal charstring or float based types */ /* STATIC SEMANTICS - When subtyping charstring or universal charstring range and values shall not be mixed in the same SubTypeSpec */ 52. RangeDef ::= LowerBound ".." UpperBound 53. StringLength ::= LengthKeyword "(" SingleConstExpression [".." UpperBound] ")" /* STATIC SEMANTICS - StringLength shall only be used with String types or to limit set of and record of. SingleConstExpression and UpperBound shall evaluate to non-negative integer values (in case of UpperBound including infinity) */ 54. LengthKeyword ::= "length" 55. PortType ::= [GlobalModuleId Dot] PortTypeIdentifier 56. PortDef ::= PortKeyword PortDefBody 57. PortDefBody ::= PortTypeIdentifier PortDefAttribs 58. PortKeyword ::= "port" 59. PortTypeIdentifier ::= Identifier 60. PortDefAttribs ::= MessageAttribs | ProcedureAttribs | MixedAttribs 61. MessageAttribs ::= MessageKeyword "{" {MessageList [SemiColon]}+ "}" 62. MessageList ::= Direction AllOrTypeList 63. Direction ::= InParKeyword | OutParKeyword | InOutParKeyword 64. MessageKeyword ::= "message" 65. AllOrTypeList ::= AllKeyword | TypeList /* NOTE: The use of AllKeyword in port definitions is deprecated */ 66. AllKeyword ::= "all" 67. TypeList ::= Type {"," Type} 68. ProcedureAttribs ::= ProcedureKeyword "{" {ProcedureList [SemiColon]}+ "}" 69. ProcedureKeyword ::= "procedure" 70. ProcedureList ::= Direction AllOrSignatureList 71. AllOrSignatureList ::= AllKeyword | SignatureList 72. SignatureList ::= Signature {"," Signature} 73. MixedAttribs ::= MixedKeyword "{" {MixedList [SemiColon]}+ "}" 74. MixedKeyword ::= "mixed" 75. MixedList ::= Direction ProcOrTypeList 76. ProcOrTypeList ::= AllKeyword | (ProcOrType {"," ProcOrType}) 77. ProcOrType ::= Signature | Type 78. ComponentDef ::= ComponentKeyword ComponentTypeIdentifier [ExtendsKeyword ComponentType {"," ComponentType}] "{" [ComponentDefList] "}" 79. ComponentKeyword ::= "component" 80. ExtendsKeyword ::= "extends" 81. ComponentType ::= [GlobalModuleId Dot] ComponentTypeIdentifier 82. ComponentTypeIdentifier ::= Identifier 83. ComponentDefList ::= {ComponentElementDef [SemiColon]} 84. ComponentElementDef ::= PortInstance | VarInstance | TimerInstance | ConstDef 85. PortInstance ::= PortKeyword PortType PortElement {"," PortElement} 86. PortElement ::= PortIdentifier [ArrayDef] 87. PortIdentifier ::= Identifier A.1.6.1.2 Constant definitions 88. ConstDef ::= ConstKeyword Type ConstList 89. ConstList ::= SingleConstDef {"," SingleConstDef} 90. SingleConstDef ::= ConstIdentifier [ArrayDef] AssignmentChar ConstantExpression 91. ConstKeyword ::= "const" 92. ConstIdentifier ::= Identifier A.1.6.1.3 Template definitions 93. TemplateDef ::= TemplateKeyword [TemplateRestriction] BaseTemplate [DerivedDef] AssignmentChar TemplateBody 94. BaseTemplate ::= (Type | Signature) TemplateIdentifier ["(" TemplateFormalParList ")"] 95. TemplateKeyword ::= "template" 96. TemplateIdentifier ::= Identifier 97. DerivedDef ::= ModifiesKeyword TemplateRef 98. ModifiesKeyword ::= "modifies" 99. TemplateFormalParList ::= TemplateFormalPar {"," TemplateFormalPar} 100. TemplateFormalPar ::= FormalValuePar | FormalTemplatePar /* STATIC SEMANTICS - FormalValuePar shall resolve to an in parameter */ 101. TemplateBody ::= (SimpleSpec | FieldSpecList | ArrayValueOrAttrib) [ExtraMatchingAttributes] /* STATIC SEMANTICS - Within TeplateBody the ArrayValueOrAttrib can be used for array, record, record of and set of types. */ 102. SimpleSpec ::= SingleValueOrAttrib 103. FieldSpecList ::= "{"[FieldSpec {"," FieldSpec}] "}" 104. FieldSpec ::= FieldReference AssignmentChar TemplateBody 105. FieldReference ::= StructFieldRef | ArrayOrBitRef | ParRef 106. StructFieldRef ::= StructFieldIdentifier| PredefinedType | TypeReference /* STATIC SEMANTICS - PredefinedType and TypeReference shall be used for anytype value notation only. PredefinedType shall not be AnyTypeKeyword.*/ 107. ParRef ::= SignatureParIdentifier /* STATIC SEMANTICS - SignatureParIdentifier shall be a formal parameter identifier from the associated signature definition */ 108. SignatureParIdentifier ::= ValueParIdentifier 109. ArrayOrBitRef ::= "[" FieldOrBitNumber "]" /* STATIC SEMANTICS - ArrayRef shall be optionally used for array types and TTCN 3 record of and set of. The same notation can be used for a Bit reference inside an TTCN 3 charstring, universal charstring, bitstring, octetstring and hexstring type */ 110. FieldOrBitNumber ::= SingleExpression /* STATIC SEMANTICS - SingleExpression will resolve to a value of integer type */ 111. SingleValueOrAttrib ::= MatchingSymbol | SingleExpression | ( TemplateRefWithParList [ ExtendedFieldReference ] ) /* STATIC SEMANTIC - VariableIdentifier (accessed via singleExpression) may only be used in in-line template definitions to reference variables in the current scope */ 112. ArrayValueOrAttrib ::= "{" ArrayElementSpecList "}" 113. ArrayElementSpecList ::= ArrayElementSpec {"," ArrayElementSpec} 114. ArrayElementSpec ::= NotUsedSymbol | PermutationMatch | TemplateBody 115. NotUsedSymbol ::= Dash 116. MatchingSymbol ::= Complement | AnyValue | AnyOrOmit | ValueOrAttribList | Range | BitStringMatch | HexStringMatch | OctetStringMatch | CharStringMatch | SubsetMatch | SupersetMatch 117. ExtraMatchingAttributes ::= LengthMatch | IfPresentMatch | (LengthMatch IfPresentMatch) 118. BitStringMatch ::= "'" {BinOrMatch} "'" "B" 119. BinOrMatch ::= Bin | AnyValue | AnyOrOmit 120. HexStringMatch ::= "'" {HexOrMatch} "'" "H" 121. HexOrMatch ::= Hex | AnyValue | AnyOrOmit 122. OctetStringMatch ::= "'" {OctOrMatch} "'" "O" 123. OctOrMatch ::= Oct | AnyValue | AnyOrOmit 124. CharStringMatch ::= PatternKeyword Pattern {"&" (Pattern | ReferencedValue)} 125. PatternKeyword ::= "pattern" 126. Pattern ::= """ { PatternElement } """ 127. PatternElement ::= ("\" ("?" | "*" | "\" | "[" | "]" | "{" | "}" | """ | "|" | "(" | ")" | "#" | "+" | "d" | "w" | "t" | "n" | "r" | "s" | "b")) | ("?" | "*" | "\" | "|" | "+") | ("[" ["^"] [ {PatternChar ["-" PatternChar] } ] "]") | ("{" ReferencedValue "}") | ("\" "N" "{" (ReferencedValue | Type) "}") | (""" """) | ("(" PatternElement ")") | ("#" (Num | ("(" Num "," [Num] ")") | ("(" "," Num ")"))) | PatternChar 128. PatternChar ::= Char | PatternQuadruple 129. PatternQuadruple ::= "\" "q" "(" Group "," Plane "," Row "," Cell ")" 130. Complement ::= ComplementKeyword "(" TemplateBody {"," TemplateBody} ")" 131. ComplementKeyword ::= "complement" 132. SubsetMatch ::= SubsetKeyword ValueOrAttribList 133. SubsetKeyword ::= "subset" 134. SupersetMatch ::= SupersetKeyword ValueOrAttribList 135. SupersetKeyword ::= "superset" 136. PermutationMatch ::= PermutationKeyword PermutationList 137. PermutationKeyword ::= "permutation" 138. PermutationList ::= "(" TemplateBody { "," TemplateBody } ")" /* STATIC SEMANTICS: Restrictions on the content of TemplateBody are given in clause B.1.3.3 */ 139. AnyValue ::= "?" 140. AnyOrOmit ::= "*" 141. ValueOrAttribList ::= "(" TemplateBody {"," TemplateBody}+ ")" 142. LengthMatch ::= StringLength 143. IfPresentMatch ::= IfPresentKeyword 144. IfPresentKeyword ::= "ifpresent" 145. PresentKeyword ::= "present" 146. Range ::= "(" LowerBound ".." UpperBound ")" 147. LowerBound ::= SingleConstExpression | (Minus InfinityKeyword) 148. UpperBound ::= SingleConstExpression | InfinityKeyword /* STATIC SEMANTICS - LowerBound and UpperBound shall evaluate to types integer, charstring, universal charstring or float. In case LowerBound or UpperBound evaluates to types charstring or universal charstring, only SingleConstExpression may be present and the string length shall be 1*/ 149. InfinityKeyword ::= "infinity" 150. TemplateInstance ::= InLineTemplate 151. TemplateInstanceAssignment ::= ( TemplateParIdentifier | ValueParIdentifier ) ":=" InLineTemplate /* STATIC SEMANTICS – if a value parameter is used, the inline template shall evaluate to a value */ 152. TemplateRefWithParList ::= [GlobalModuleId Dot] ( TemplateIdentifier [TemplateActualParList] | TemplateParIdentifier ) 153. TemplateRef ::= [GlobalModuleId Dot] TemplateIdentifier | TemplateParIdentifier 154. InLineTemplate ::= [(Type | Signature) Colon] [DerivedRefWithParList AssignmentChar] TemplateBody 155. DerivedRefWithParList ::= ModifiesKeyword TemplateRefWithParList 156. TemplateActualParList ::= "(" [( TemplateActualPar {"," TemplateActualPar}) | ( TemplateActualParAssignment {"," TemplateActualParAssignment })]")" 157. TemplateActualPar ::= TemplateInstance | Dash /* STATIC SEMANTICS - When the corresponding formal parameter is not of template type the TemplateInstance production shall resolve to one or more SingleExpressions */ 158. TemplateActualParAssignment ::= TemplateInstanceAssignment 159. TemplateOps ::= MatchOp | ValueofOp 160. MatchOp ::= MatchKeyword "(" Expression "," TemplateInstance")" 161. MatchKeyword ::= "match" 162. ValueofOp ::= ValueofKeyword "(" TemplateInstance ")" 163. ValueofKeyword ::= "valueof" A.1.6.1.4 Function definitions 164. FunctionDef ::= FunctionKeyword FunctionIdentifier "("[FunctionFormalParList] ")" [RunsOnSpec] [ReturnType] StatementBlock 165. FunctionKeyword ::= "function" 166. FunctionIdentifier ::= Identifier 167. FunctionFormalParList ::= FunctionFormalPar {"," FunctionFormalPar} 168. FunctionFormalPar ::= FormalValuePar | FormalTimerPar | FormalTemplatePar | FormalPortPar 169. ReturnType ::= ReturnKeyword [TemplateKeyword | RestrictedTemplate] Type 170. ReturnKeyword ::= "return" 171. RunsOnSpec ::= RunsKeyword OnKeyword ComponentType 172. RunsKeyword ::= "runs" 173. OnKeyword ::= "on" 174. MTCKeyword ::= "mtc" 175. StatementBlock ::= "{" [FunctionDefList] [FunctionStatementList] "}" 176. FunctionDefList::= {(FunctionLocalDef | FunctionLocalInst)[SemiColon]}+ 177. FunctionStatementList::= {FunctionStatement [SemiColon]}+ 178. FunctionLocalInst ::= VarInstance | TimerInstance 179. FunctionLocalDef ::= ConstDef | TemplateDef 180. FunctionStatement ::= ConfigurationStatements | TimerStatements | CommunicationStatements | BasicStatements | BehaviourStatements | VerdictStatements | SUTStatements 181. FunctionInstance ::= FunctionRef "(" [FunctionActualParList] ")" 182. FunctionRef ::= [GlobalModuleId Dot] (FunctionIdentifier | ExtFunctionIdentifier ) | PreDefFunctionIdentifier 183. PreDefFunctionIdentifier ::= Identifier /* STATIC SEMANTICS - The Identifier shall be one of the pre-defined TTCN 3 Function Identifiers from Annex C of ES 201 873-1 */ 184. FunctionActualParList ::= ( FunctionActualPar {"," FunctionActualPar} ) | ( FunctionActualParAssignment { "," FunctionActualParAssignment } ) 185. FunctionActualPar ::= TimerRef | TemplateInstance | Port | ComponentRef | Dash /* STATIC SEMANTICS - When the corresponding formal parameter is not of template type the TemplateInstance production shall resolve to one or more SingleExpressions i.e. equivalent to the Expression production */ 186. FunctionActualParAssignment ::= TemplateInstanceAssignment | ComponentRefAssignment | PortAssignment | TimerRefAssignment 187. TimerRefAssignment ::= TimerParIdentifier ":=" TimerRef 188. PortAssignment ::= PortParIdentifier ":=" Port A.1.6.1.5 Signature definitions 189. SignatureDef ::= SignatureKeyword SignatureIdentifier "("[SignatureFormalParList] ")" [ReturnType | NoBlockKeyword] [ExceptionSpec] 190. SignatureKeyword ::= "signature" 191. SignatureIdentifier ::= Identifier 192. SignatureFormalParList ::= SignatureFormalPar {"," SignatureFormalPar} 193. SignatureFormalPar ::= FormalValuePar 194. ExceptionSpec ::= ExceptionKeyword "(" ExceptionTypeList ")" 195. ExceptionKeyword ::= "exception" 196. ExceptionTypeList ::= Type {"," Type} 197. NoBlockKeyword ::= "noblock" 198. Signature ::= [GlobalModuleId Dot] SignatureIdentifier A.1.6.1.6 Testcase definitions 199. TestcaseDef ::= TestcaseKeyword TestcaseIdentifier "("[TestcaseFormalParList] ")" ConfigSpec StatementBlock 200. TestcaseKeyword ::= "testcase" 201. TestcaseIdentifier ::= Identifier 202. TestcaseFormalParList ::= TestcaseFormalPar {"," TestcaseFormalPar} 203. TestcaseFormalPar ::= FormalValuePar | FormalTemplatePar 204. ConfigSpec ::= RunsOnSpec [SystemSpec] 205. SystemSpec ::= SystemKeyword ComponentType 206. SystemKeyword ::= "system" 207. TestcaseInstance ::= ExecuteKeyword "(" TestcaseRef "(" [TestcaseActualParList] ")" ["," TimerValue] ")" 208. ExecuteKeyword ::= "execute" 209. TestcaseRef ::= [GlobalModuleId Dot] TestcaseIdentifier 210. TestcaseActualParList ::= ( TestcaseActualPar {"," TestcaseActualPar} ) | ( TestcaseActualParAssignment { "," TestcaseActualParAssignment }) 211. TestcaseActualPar ::= TemplateInstance | Dash /* STATIC SEMANTICS - When the corresponding formal parameter is not of template type the TemplateInstance production shall resolve to one or more SingleExpressions i.e. equivalent to the Expression production */ 212. TestcaseActualParAssignment ::= TemplateInstanceAssignment A.1.6.1.7 Altstep definitions 213. AltstepDef ::= AltstepKeyword AltstepIdentifier "("[AltstepFormalParList] ")" [RunsOnSpec] "{" AltstepLocalDefList AltGuardList "}" 214. AltstepKeyword ::= "altstep" 215. AltstepIdentifier ::= Identifier 216. AltstepFormalParList ::= FunctionFormalParList 217. AltstepLocalDefList ::= {AltstepLocalDef [SemiColon]} 218. AltstepLocalDef ::= VarInstance | TimerInstance | ConstDef | TemplateDef 219. AltstepInstance ::= AltstepRef "(" [FunctionActualParList] ")" 220. AltstepRef ::= [GlobalModuleId Dot] AltstepIdentifier A.1.6.1.8 Import definitions 221. ImportDef ::= ImportKeyword ImportFromSpec (AllWithExcepts | ("{" ImportSpec "}")) 222. ImportKeyword ::= "import" 223. AllWithExcepts ::= AllKeyword [ExceptsDef] 224. ExceptsDef ::= ExceptKeyword "{" ExceptSpec "}" 225. ExceptKeyword ::= "except" 226. ExceptSpec ::= {ExceptElement [SemiColon]} 227. ExceptElement ::= ExceptGroupSpec | ExceptTypeDefSpec | ExceptTemplateSpec | ExceptConstSpec | ExceptTestcaseSpec | ExceptAltstepSpec | ExceptFunctionSpec | ExceptSignatureSpec | ExceptModuleParSpec 228. ExceptGroupSpec ::= GroupKeyword (ExceptGroupRefList | AllKeyword) 229. ExceptTypeDefSpec ::= TypeDefKeyword (TypeRefList | AllKeyword) 230. ExceptTemplateSpec ::= TemplateKeyword (TemplateRefList | AllKeyword) 231. ExceptConstSpec ::= ConstKeyword (ConstRefList | AllKeyword) 232. ExceptTestcaseSpec ::= TestcaseKeyword (TestcaseRefList | AllKeyword) 233. ExceptAltstepSpec ::= AltstepKeyword (AltstepRefList | AllKeyword) 234. ExceptFunctionSpec ::= FunctionKeyword (FunctionRefList | AllKeyword) 235. ExceptSignatureSpec ::= SignatureKeyword (SignatureRefList | AllKeyword) 236. ExceptModuleParSpec ::= ModuleParKeyword (ModuleParRefList | AllKeyword) 237. ImportSpec ::= {ImportElement [SemiColon]} 238. ImportElement ::= ImportGroupSpec | ImportTypeDefSpec | ImportTemplateSpec | ImportConstSpec | ImportTestcaseSpec | ImportAltstepSpec | ImportFunctionSpec | ImportSignatureSpec | ImportModuleParSpec | ImportImportSpec 239. ImportFromSpec ::= FromKeyword ModuleId [RecursiveKeyword] 240. RecursiveKeyword ::= "recursive" 241. ImportGroupSpec ::= GroupKeyword (GroupRefListWithExcept | AllGroupsWithExcept) 242. GroupRefList ::= FullGroupIdentifier {"," FullGroupIdentifier} 243. GroupRefListWithExcept ::= FullGroupIdentifierWithExcept {"," FullGroupIdentifierWithExcept} 244. AllGroupsWithExcept ::= AllKeyword [ExceptKeyword GroupRefList] 245. FullGroupIdentifier ::= GroupIdentifier {Dot GroupIdentifier} 246. FullGroupIdentifierWithExcept ::= FullGroupIdentifier [ExceptsDef] 247. ExceptGroupRefList ::= ExceptFullGroupIdentifier {"," ExceptFullGroupIdentifier} 248. ExceptFullGroupIdentifier ::= FullGroupIdentifier 249. ImportTypeDefSpec ::= TypeDefKeyword (TypeRefList | AllTypesWithExcept) 250. TypeRefList ::= TypeDefIdentifier {"," TypeDefIdentifier} 251. AllTypesWithExcept ::= AllKeyword [ExceptKeyword TypeRefList] 252. TypeDefIdentifier ::= StructTypeIdentifier | EnumTypeIdentifier | PortTypeIdentifier | ComponentTypeIdentifier | SubTypeIdentifier 253. ImportTemplateSpec ::= TemplateKeyword (TemplateRefList | AllTemplsWithExcept) 254. TemplateRefList ::= TemplateIdentifier {"," TemplateIdentifier} 255. AllTemplsWithExcept ::= AllKeyword [ExceptKeyword TemplateRefList] 256. ImportConstSpec ::= ConstKeyword (ConstRefList | AllConstsWithExcept) 257. ConstRefList ::= ConstIdentifier {"," ConstIdentifier} 258. AllConstsWithExcept ::= AllKeyword [ExceptKeyword ConstRefList] 259. ImportAltstepSpec ::= AltstepKeyword (AltstepRefList | AllAltstepsWithExcept) 260. AltstepRefList ::= AltstepIdentifier {"," AltstepIdentifier} 261. AllAltstepsWithExcept ::= AllKeyword [ExceptKeyword AltstepRefList] 262. ImportTestcaseSpec ::= TestcaseKeyword (TestcaseRefList | AllTestcasesWithExcept) 263. TestcaseRefList ::= TestcaseIdentifier {"," TestcaseIdentifier} 264. AllTestcasesWithExcept ::= AllKeyword [ExceptKeyword TestcaseRefList] 265. ImportFunctionSpec ::= FunctionKeyword (FunctionRefList | AllFunctionsWithExcept) 266. FunctionRefList ::= FunctionIdentifier {"," FunctionIdentifier} 267. AllFunctionsWithExcept ::= AllKeyword [ExceptKeyword FunctionRefList] 268. ImportSignatureSpec ::= SignatureKeyword (SignatureRefList | AllSignaturesWithExcept) 269. SignatureRefList ::= SignatureIdentifier {"," SignatureIdentifier} 270. AllSignaturesWithExcept ::= AllKeyword [ExceptKeyword SignatureRefList] 271. ImportModuleParSpec ::= ModuleParKeyword (ModuleParRefList | AllModuleParWithExcept) 272. ModuleParRefList ::= ModuleParIdentifier {"," ModuleParIdentifier} 273. AllModuleParWithExcept ::= AllKeyword [ExceptKeyword ModuleParRefList] 274. ImportImportSpec ::= ImportKeyword AllKeyword A.1.6.1.9 Group definitions 275. GroupDef ::= GroupKeyword GroupIdentifier "{" [ModuleDefinitionsPart] "}" 276. GroupKeyword ::= "group" 277. GroupIdentifier ::= Identifier A.1.6.1.10 External function definitions 278. ExtFunctionDef ::= ExtKeyword FunctionKeyword ExtFunctionIdentifier "("[FunctionFormalParList] ")" [ReturnType] 279. ExtKeyword ::= "external" 280. ExtFunctionIdentifier ::= Identifier A.1.6.1.11 External constant definitions 281. ExtConstDef ::= ExtKeyword ConstKeyword Type ExtConstIdentifierList 282. ExtConstIdentifierList ::= ExtConstIdentifier { "," ExtConstIdentifier } 283. ExtConstIdentifier ::= Identifier A.1.6.1.12 Module parameter definitions 284. ModuleParDef ::= ModuleParKeyword ( ModulePar | ("{" MultitypedModuleParList "}")) 285. ModuleParKeyword ::= "modulepar" 286. MultitypedModuleParList ::= { ModulePar [SemiColon] } 287. ModulePar ::= ModuleParType ModuleParList 288. ModuleParType ::= Type 289. ModuleParList ::= ModuleParIdentifier [AssignmentChar ConstantExpression] {","ModuleParIdentifier [AssignmentChar ConstantExpression]} 290. ModuleParIdentifier ::= Identifier A.1.6.1.13 Friend module definitions 291. FriendModuleDef ::= "friend" "module" ModuleIdentifier {"," ModuleIdentifier } [SemiColon] A.1.6.2 Control part A.1.6.2.0 General 292. ModuleControlPart ::= ControlKeyword "{" ModuleControlBody "}" [WithStatement] [SemiColon] 293. ControlKeyword ::= "control" 294. ModuleControlBody ::= [ControlStatementOrDefList] 295. ControlStatementOrDefList ::= {ControlStatementOrDef [SemiColon]}+ 296. ControlStatementOrDef ::= FunctionLocalDef | FunctionLocalInst | ControlStatement 297. ControlStatement ::= TimerStatements | BasicStatements | BehaviourStatements | SUTStatements | StopKeyword A.1.6.2.1 Variable instantiation 298. VarInstance ::= VarKeyword ((Type VarList) | (( TemplateKeyword | RestrictedTemplate ) Type TempVarList)) 299. VarList ::= SingleVarInstance {"," SingleVarInstance} 300. SingleVarInstance ::= VarIdentifier [ArrayDef] [AssignmentChar VarInitialValue] 301. VarInitialValue ::= Expression 302. VarKeyword ::= "var" 303. VarIdentifier ::= Identifier 304. TempVarList ::= SingleTempVarInstance {"," SingleTempVarInstance} 305. SingleTempVarInstance ::= VarIdentifier [ArrayDef] [AssignmentChar TempVarInitialValue] 306. TempVarInitialValue ::= TemplateBody 307. VariableRef ::= ( VarIdentifier | ValueParIdentifier | TemplateParIdentifier ) [ ExtendedFieldReference ] A.1.6.2.2 Timer instantiation 308. TimerInstance ::= TimerKeyword TimerList 309. TimerList ::= SingleTimerInstance{"," SingleTimerInstance} 310. SingleTimerInstance ::= TimerIdentifier [ArrayDef] [AssignmentChar TimerValue] 311. TimerKeyword ::= "timer" 312. TimerIdentifier ::= Identifier 313. TimerValue ::= Expression 314. TimerRef ::= (TimerIdentifier | TimerParIdentifier) {ArrayOrBitRef} A.1.6.2.3 Component operations 315. ConfigurationStatements ::= ConnectStatement | MapStatement | DisconnectStatement | UnmapStatement | DoneStatement | KilledStatement | StartTCStatement | StopTCStatement | KillTCStatement 316. ConfigurationOps ::= CreateOp | SelfOp | SystemOp | MTCOp | RunningOp | AliveOp 317. CreateOp ::= ComponentType Dot CreateKeyword ["(" SingleExpression ")"] [AliveKeyword] 318. SystemOp ::= SystemKeyword 319. SelfOp ::= "self" 320. MTCOp ::= MTCKeyword 321. DoneStatement ::= ComponentId Dot DoneKeyword 322. KilledStatement ::= ComponentId Dot KilledKeyword 323. ComponentId ::= ComponentOrDefaultReference | (AnyKeyword | AllKeyword) ComponentKeyword 324. DoneKeyword ::= "done" 325. KilledKeyword ::= "killed" 326. RunningOp ::= ComponentId Dot RunningKeyword 327. RunningKeyword ::= "running" 328. AliveOp ::= ComponentId Dot AliveKeyword 329. CreateKeyword ::= "create" 330. AliveKeyword ::= "alive" 331. ConnectStatement ::= ConnectKeyword SingleConnectionSpec 332. ConnectKeyword ::= "connect" 333. SingleConnectionSpec ::= "(" PortRef "," PortRef ")" 334. PortRef ::= ComponentRef Colon Port 335. ComponentRef ::= ComponentOrDefaultReference | SystemOp | SelfOp | MTCOp 336. ComponentRefAssignment ::= ValueParIdentifier ":=" ComponentRef 337. DisconnectStatement ::= DisconnectKeyword [SingleOrMultiConnectionSpec] 338. SingleOrMultiConnectionSpec ::= SingleConnectionSpec | AllConnectionsSpec | AllPortsSpec | AllCompsAllPortsSpec 339. AllConnectionsSpec ::= "(" PortRef ")" 340. AllPortsSpec ::= "(" ComponentRef ":" AllKeyword PortKeyword ")" 341. AllCompsAllPortsSpec ::= "(" AllKeyword ComponentKeyword ":" AllKeyword PortKeyword ")" 342. DisconnectKeyword ::= "disconnect" 343. MapStatement ::= MapKeyword SingleConnectionSpec 344. MapKeyword ::= "map" 345. UnmapStatement ::= UnmapKeyword [SingleOrMultiConnectionSpec] 346. UnmapKeyword ::= "unmap" 347. StartTCStatement ::= ComponentOrDefaultReference Dot StartKeyword "(" FunctionInstance ")" 348. StartKeyword ::= "start" 349. StopTCStatement ::= StopKeyword | (ComponentReferenceOrLiteral Dot StopKeyword) | (AllKeyword ComponentKeyword Dot StopKeyword) 350. ComponentReferenceOrLiteral ::= ComponentOrDefaultReference | MTCOp | SelfOp 351. KillTCStatement ::= KillKeyword | (ComponentReferenceOrLiteral Dot KillKeyword) | (AllKeyword ComponentKeyword Dot KillKeyword) 352. ComponentOrDefaultReference ::= VariableRef | FunctionInstance 353. KillKeyword ::= "kill" A.1.6.2.4 Port operations 354. Port ::= (PortIdentifier | PortParIdentifier) {ArrayOrBitRef} 355. CommunicationStatements ::= SendStatement | CallStatement | ReplyStatement | RaiseStatement | ReceiveStatement | TriggerStatement | GetCallStatement | GetReplyStatement | CatchStatement | CheckStatement | ClearStatement | StartStatement | StopStatement | HaltStatement 356. SendStatement ::= Port Dot PortSendOp 357. PortSendOp ::= SendOpKeyword "(" SendParameter ")" [ToClause] 358. SendOpKeyword ::= "send" 359. SendParameter ::= TemplateInstance 360. ToClause ::= ToKeyword ( AddressRef | AddressRefList | AllKeyword ComponentKeyword ) 361. AddressRefList ::= "(" AddressRef {"," AddressRef} ")" 362. ToKeyword ::= "to" 363. AddressRef ::= TemplateInstance 364. CallStatement ::= Port Dot PortCallOp [PortCallBody] 365. PortCallOp ::= CallOpKeyword "(" CallParameters ")" [ToClause] 366. CallOpKeyword ::= "call" 367. CallParameters ::= TemplateInstance ["," CallTimerValue] 368. CallTimerValue ::= TimerValue | NowaitKeyword 369. NowaitKeyword ::= "nowait" 370. PortCallBody ::= "{" CallBodyStatementList "}" 371. CallBodyStatementList ::= {CallBodyStatement [SemiColon]}+ 372. CallBodyStatement ::= CallBodyGuard StatementBlock 373. CallBodyGuard ::= AltGuardChar CallBodyOps 374. CallBodyOps ::= GetReplyStatement | CatchStatement 375. ReplyStatement ::= Port Dot PortReplyOp 376. PortReplyOp ::= ReplyKeyword "(" TemplateInstance [ReplyValue]")" [ToClause] 377. ReplyKeyword ::= "reply" 378. ReplyValue ::= ValueKeyword Expression 379. RaiseStatement ::= Port Dot PortRaiseOp 380. PortRaiseOp ::= RaiseKeyword "(" Signature "," TemplateInstance ")" [ToClause] 381. RaiseKeyword ::= "raise" 382. ReceiveStatement ::= PortOrAny Dot PortReceiveOp 383. PortOrAny ::= Port | AnyKeyword PortKeyword 384. PortReceiveOp ::= ReceiveOpKeyword ["(" ReceiveParameter ")"] [FromClause] [PortRedirect] 385. ReceiveOpKeyword ::= "receive" 386. ReceiveParameter ::= TemplateInstance 387. FromClause ::= FromKeyword ( AddressRef | AddressRefList | AnyKeyword ComponentKeyword ) 388. FromKeyword ::= "from" 389. PortRedirect ::= PortRedirectSymbol (ValueSpec [SenderSpec] | SenderSpec) 390. PortRedirectSymbol ::= "->" 391. ValueSpec ::= ValueKeyword ( VariableRef | ( "(" SingleValueSpec { "," SingleValueSpec } ")" ) ) 392. SingleValueSpec ::= VariableRef [ AssignmentChar FieldReference ExtendedFieldReference ] /*STATIC SEMANTICS – FieldReference shall not be ParRef and ExtendedFieldReference shall not be TypeDefIdentifier*/ 393. ValueKeyword ::= "value" 394. SenderSpec ::= SenderKeyword VariableRef 395. SenderKeyword ::= "sender" 396. TriggerStatement ::= PortOrAny Dot PortTriggerOp 397. PortTriggerOp ::= TriggerOpKeyword ["(" ReceiveParameter ")"] [FromClause] [PortRedirect] 398. TriggerOpKeyword ::= "trigger" 399. GetCallStatement ::= PortOrAny Dot PortGetCallOp 400. PortGetCallOp ::= GetCallOpKeyword ["(" ReceiveParameter ")"] [FromClause] [PortRedirectWithParam] 401. GetCallOpKeyword ::= "getcall" 402. PortRedirectWithParam ::= PortRedirectSymbol RedirectWithParamSpec 403. RedirectWithParamSpec ::= ParamSpec [SenderSpec] | SenderSpec 404. ParamSpec ::= ParamKeyword ParamAssignmentList 405. ParamKeyword ::= "param" 406. ParamAssignmentList ::= "(" (AssignmentList | VariableList) ")" 407. AssignmentList ::= VariableAssignment {"," VariableAssignment} 408. VariableAssignment ::= VariableRef AssignmentChar ParameterIdentifier 409. ParameterIdentifier ::= ValueParIdentifier 410. VariableList ::= VariableEntry {"," VariableEntry} 411. VariableEntry ::= VariableRef | NotUsedSymbol 412. GetReplyStatement ::= PortOrAny Dot PortGetReplyOp 413. PortGetReplyOp ::= GetReplyOpKeyword ["(" ReceiveParameter [ValueMatchSpec] ")"] [FromClause] [PortRedirectWithValueAndParam] 414. PortRedirectWithValueAndParam ::= PortRedirectSymbol RedirectWithValueAndParamSpec 415. RedirectWithValueAndParamSpec ::= ValueSpec [ParamSpec] [SenderSpec] | RedirectWithParamSpec 416. GetReplyOpKeyword ::= "getreply" 417. ValueMatchSpec ::= ValueKeyword TemplateInstance 418. CheckStatement ::= PortOrAny Dot PortCheckOp 419. PortCheckOp ::= CheckOpKeyword ["(" CheckParameter ")"] 420. CheckOpKeyword ::= "check" 421. CheckParameter ::= CheckPortOpsPresent | FromClausePresent | RedirectPresent 422. FromClausePresent ::= FromClause [PortRedirectSymbol SenderSpec] 423. RedirectPresent ::= PortRedirectSymbol SenderSpec 424. CheckPortOpsPresent ::= PortReceiveOp | PortGetCallOp | PortGetReplyOp | PortCatchOp 425. CatchStatement ::= PortOrAny Dot PortCatchOp 426. PortCatchOp ::= CatchOpKeyword ["("CatchOpParameter ")"] [FromClause] [PortRedirect] 427. CatchOpKeyword ::= "catch" 428. CatchOpParameter ::= Signature "," TemplateInstance | TimeoutKeyword 429. ClearStatement ::= PortOrAll Dot PortClearOp 430. PortOrAll ::= Port | AllKeyword PortKeyword 431. PortClearOp ::= ClearOpKeyword 432. ClearOpKeyword ::= "clear" 433. StartStatement ::= PortOrAll Dot PortStartOp 434. PortStartOp ::= StartKeyword 435. StopStatement ::= PortOrAll Dot PortStopOp 436. PortStopOp ::= StopKeyword 437. StopKeyword ::= "stop" 438. HaltStatement ::= PortOrAll Dot PortHaltOp 439. PortHaltOp ::= HaltKeyword 440. HaltKeyword ::= "halt" 441. AnyKeyword ::= "any" A.1.6.2.5 Timer operations 442. TimerStatements ::= StartTimerStatement | StopTimerStatement | TimeoutStatement 443. TimerOps ::= ReadTimerOp | RunningTimerOp 444. StartTimerStatement ::= TimerRef Dot StartKeyword ["(" TimerValue ")"] 445. StopTimerStatement ::= TimerRefOrAll Dot StopKeyword 446. TimerRefOrAll ::= TimerRef | AllKeyword TimerKeyword 447. ReadTimerOp ::= TimerRef Dot ReadKeyword 448. ReadKeyword ::= "read" 449. RunningTimerOp ::= TimerRefOrAny Dot RunningKeyword 450. TimeoutStatement ::= TimerRefOrAny Dot TimeoutKeyword 451. TimerRefOrAny ::= TimerRef | ( AnyKeyword TimerKeyword ) 452. TimeoutKeyword ::= "timeout" A.1.6.3 Type 453. Type ::= PredefinedType | ReferencedType 454. PredefinedType ::= BitStringKeyword | BooleanKeyword | CharStringKeyword | UniversalCharString | IntegerKeyword | OctetStringKeyword | HexStringKeyword | VerdictTypeKeyword | FloatKeyword | AddressKeyword | DefaultKeyword | AnyTypeKeyword 455. BitStringKeyword ::= "bitstring" 456. BooleanKeyword ::= "boolean" 457. IntegerKeyword ::= "integer" 458. OctetStringKeyword ::= "octetstring" 459. HexStringKeyword ::= "hexstring" 460. VerdictTypeKeyword ::= "verdicttype" 461. FloatKeyword ::= "float" 462. AddressKeyword ::= "address" 463. DefaultKeyword ::= "default" 464. AnyTypeKeyword ::= "anytype" 465. CharStringKeyword ::= "charstring" 466. UniversalCharString ::= UniversalKeyword CharStringKeyword 467. UniversalKeyword ::= "universal" 468. ReferencedType ::= [GlobalModuleId Dot] TypeReference [ExtendedFieldReference] 469. TypeReference ::= StructTypeIdentifier | EnumTypeIdentifier | SubTypeIdentifier | ComponentTypeIdentifier 470. ArrayDef ::= {"[" ArrayBounds [".." ArrayBounds] "]"}+ 471. ArrayBounds ::= SingleConstExpression /* STATIC SEMANTICS - ArrayBounds will resolve to a non negative value of integer type */ A.1.6.4 Value 472. Value ::= PredefinedValue | ReferencedValue 473. PredefinedValue ::= BitStringValue | BooleanValue | CharStringValue | IntegerValue | OctetStringValue | HexStringValue | VerdictTypeValue | EnumeratedValue | FloatValue | AddressValue | OmitValue 474. BitStringValue ::= Bstring 475. BooleanValue ::= "true" | "false" 476. IntegerValue ::= Number 477. OctetStringValue ::= Ostring 478. HexStringValue ::= Hstring 479. VerdictTypeValue ::= "pass" | "fail" | "inconc" | "none" | "error" 480. EnumeratedValue ::= EnumerationIdentifier 481. CharStringValue ::= Cstring | Quadruple 482. Quadruple ::= CharKeyword "(" Group "," Plane "," Row "," Cell ")" 483. CharKeyword ::= "char" 484. Group ::= Number 485. Plane ::= Number 486. Row ::= Number 487. Cell ::= Number 488. FloatValue ::= FloatDotNotation | FloatENotation | NaNKeyword 489. NaNKeyword ::= "not_a_number" 490. FloatDotNotation ::= Number Dot DecimalNumber 491. FloatENotation ::= Number [Dot DecimalNumber] Exponential [Minus] Number 492. Exponential ::= "E" 493. ReferencedValue ::= ValueReference [ExtendedFieldReference] 494. ValueReference ::= [GlobalModuleId Dot] (ConstIdentifier | ExtConstIdentifier | ModuleParIdentifier ) | ValueParIdentifier | VarIdentifier 495. Number ::= (NonZeroNum {Num}) | "0" 496. NonZeroNum ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" 497. DecimalNumber ::= {Num}+ 498. Num ::= "0" | NonZeroNum 499. Bstring ::= "'" {Bin} "'" "B" 500. Bin ::= "0" | "1" 501. Hstring ::= "'" {Hex} "'" "H" 502. Hex ::= Num | "A" | "B" | "C" | "D" | "E" | "F"| "a" | "b" | "c" | "d" | "e" | "f" 503. Ostring ::= "'" {Oct} "'" "O" 504. Oct ::= Hex Hex 505. Cstring ::= """ {Char} """ 506. Char ::= /* REFERENCE - A character defined by the relevant CharacterString type. For charstring a character from the character set defined in ISO/IEC 646. For universal charstring a character from any character set defined in ISO/IEC 10646 */ 507. Identifier ::= Alpha{AlphaNum | Underscore} 508. Alpha ::= UpperAlpha | LowerAlpha 509. AlphaNum ::= Alpha | Num 510. 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" 511. 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" 512. ExtendedAlphaNum ::= /* REFERENCE - A graphical character from the BASIC LATIN or from the LATIN-1 SUPPLEMENT character sets defined in ISO/IEC 10646 (characters from char (0,0,0,32) to char (0,0,0,126), from char (0,0,0,161) to char (0,0,0,172) and from char (0,0,0,174) to char (0,0,0,255) */ 513. FreeText ::= """ {ExtendedAlphaNum} """ 514. AddressValue ::= "null" 515. OmitValue ::= OmitKeyword 516. OmitKeyword ::= "omit" A.1.6.5 Parameterization 517. InParKeyword ::= "in" 518. OutParKeyword ::= "out" 519. InOutParKeyword ::= "inout" 520. FormalValuePar ::= [(InParKeyword | InOutParKeyword | OutParKeyword)] Type ValueParIdentifier [ ":=" ( Expression | Dash ) ] 521. ValueParIdentifier ::= Identifier 522. FormalPortPar ::= [InOutParKeyword] PortTypeIdentifier PortParIdentifier 523. PortParIdentifier ::= Identifier 524. FormalTimerPar ::= [InOutParKeyword] TimerKeyword TimerParIdentifier 525. TimerParIdentifier ::= Identifier 526. FormalTemplatePar ::= [( InParKeyword | OutParKeyword | InOutParKeyword )] ( TemplateKeyword | RestrictedTemplate ) Type TemplateParIdentifier [ ":=" ( TemplateInstance | Dash ) ] 527. TemplateParIdentifier ::= Identifier 528. RestrictedTemplate ::= OmitKeyword | ( TemplateKeyword TemplateRestriction ) 529. TemplateRestriction ::= "(" ( OmitKeyword | ValueKeyword | PresentKeyword ) ")" A.1.6.6 With statement 530. WithStatement ::= WithKeyword WithAttribList 531. WithKeyword ::= "with" 532. WithAttribList ::= "{" MultiWithAttrib "}" 533. MultiWithAttrib ::= {SingleWithAttrib [SemiColon]} 534. SingleWithAttrib ::= AttribKeyword [OverrideKeyword] [AttribQualifier] AttribSpec 535. AttribKeyword ::= EncodeKeyword | VariantKeyword | DisplayKeyword | ExtensionKeyword | OptionalKeyword 536. EncodeKeyword ::= "encode" 537. VariantKeyword ::= "variant" 538. DisplayKeyword ::= "display" 539. ExtensionKeyword ::= "extension" 540. OverrideKeyword ::= "override" 541. AttribQualifier ::= "(" DefOrFieldRefList ")" 542. DefOrFieldRefList ::= DefOrFieldRef {"," DefOrFieldRef} 543. DefOrFieldRef ::= DefinitionRef | ( FieldReference [ ExtendedFieldReference ] ) | ( "[" NotUsedSymbol | SingleExpression "]" ) | AllRef 544. DefinitionRef ::= StructTypeIdentifier | EnumTypeIdentifier | PortTypeIdentifier | ComponentTypeIdentifier | SubTypeIdentifier | ConstIdentifier | TemplateIdentifier | AltstepIdentifier | TestcaseIdentifier | FunctionIdentifier | SignatureIdentifier | VarIdentifier | TimerIdentifier | PortIdentifier | ModuleParIdentifier | FullGroupIdentifier 545. AllRef ::= ( GroupKeyword AllKeyword [ExceptKeyword "{" GroupRefList "}"]) | ( TypeDefKeyword AllKeyword [ExceptKeyword "{" TypeRefList "}"]) | ( TemplateKeyword AllKeyword [ExceptKeyword "{" TemplateRefList "}"]) | ( ConstKeyword AllKeyword [ExceptKeyword "{" ConstRefList "}"]) | ( AltstepKeyword AllKeyword [ExceptKeyword "{" AltstepRefList "}"]) | ( TestcaseKeyword AllKeyword [ExceptKeyword "{" TestcaseRefList "}"]) | ( FunctionKeyword AllKeyword [ExceptKeyword "{" FunctionRefList "}"]) | ( SignatureKeyword AllKeyword [ExceptKeyword "{" SignatureRefList "}"]) | ( ModuleParKeyword AllKeyword [ExceptKeyword "{" ModuleParRefList "}"]) 546. AttribSpec ::= FreeText A.1.6.7 Behaviour statements 547. BehaviourStatements ::= TestcaseInstance | FunctionInstance | ReturnStatement | AltConstruct | InterleavedConstruct | LabelStatement | GotoStatement | RepeatStatement | DeactivateStatement | AltstepInstance | ActivateOp | BreakStatement | ContinueStatement 548. VerdictStatements ::= SetLocalVerdict 549. VerdictOps ::= GetLocalVerdict 550. SetLocalVerdict ::= SetVerdictKeyword "(" SingleExpression { "," LogItem } ")" 551. SetVerdictKeyword ::= "setverdict" 552. GetLocalVerdict ::= "getverdict" 553. SUTStatements ::= ActionKeyword "(" ActionText {StringOp ActionText} ")" 554. ActionKeyword ::= "action" 555. ActionText ::= FreeText | Expression 556. ReturnStatement ::= ReturnKeyword [Expression | InLineTemplate] /* STATIC SEMANTICS - Expression shall evaluate to a value of a type compatible with the return type for functions returning a value. It shall evaluate to a value, template (literal or template instance), or a matching mechanism compatible with the return type for functions returning a template. */ 557. AltConstruct ::= AltKeyword "{" AltGuardList "}" 558. AltKeyword ::= "alt" 559. AltGuardList ::= {GuardStatement | ElseStatement [SemiColon]} 560. GuardStatement ::= AltGuardChar (AltstepInstance [StatementBlock] | GuardOp StatementBlock) 561. ElseStatement ::= "["ElseKeyword "]" StatementBlock 562. AltGuardChar ::= "[" [BooleanExpression] "]" 563. GuardOp ::= TimeoutStatement | ReceiveStatement | TriggerStatement | GetCallStatement | CatchStatement | CheckStatement | GetReplyStatement | DoneStatement | KilledStatement 564. InterleavedConstruct ::= InterleavedKeyword "{" InterleavedGuardList "}" 565. InterleavedKeyword ::= "interleave" 566. InterleavedGuardList ::= {InterleavedGuardElement [SemiColon]}+ 567. InterleavedGuardElement ::= InterleavedGuard InterleavedAction 568. InterleavedGuard ::= "[" "]" GuardOp 569. InterleavedAction ::= StatementBlock 570. LabelStatement ::= LabelKeyword LabelIdentifier 571. LabelKeyword ::= "label" 572. LabelIdentifier ::= Identifier 573. GotoStatement ::= GotoKeyword LabelIdentifier 574. GotoKeyword ::= "goto" 575. RepeatStatement ::= "repeat" 576. ActivateOp ::= ActivateKeyword "(" AltstepInstance ")" 577. ActivateKeyword ::= "activate" 578. DeactivateStatement ::= DeactivateKeyword ["(" ComponentOrDefaultReference ")"] 579. DeactivateKeyword ::= "deactivate" 580. BreakStatement ::= "break" 581. ContinueStatement ::= "continue" A.1.6.8 Basic statements 582. BasicStatements ::= Assignment | LogStatement | LoopConstruct | ConditionalConstruct | SelectCaseConstruct | StatementBlock 583. Expression ::= SingleExpression | CompoundExpression 584. CompoundExpression ::= FieldExpressionList | ArrayExpression /* STATIC SEMANTICS - Within CompoundExpression the ArrayExpression can be used for Arrays, record, record of and set of types. */ 585. FieldExpressionList ::= "{" FieldExpressionSpec {"," FieldExpressionSpec} "}" 586. FieldExpressionSpec ::= FieldReference AssignmentChar NotUsedOrExpression 587. ArrayExpression ::= "{" [ArrayElementExpressionList] "}" 588. ArrayElementExpressionList ::= NotUsedOrExpression {"," NotUsedOrExpression} 589. NotUsedOrExpression ::= Expression | NotUsedSymbol 590. ConstantExpression ::= SingleConstExpression | CompoundConstExpression 591. SingleConstExpression ::= SingleExpression 592. BooleanExpression ::= SingleExpression /* STATIC SEMANTICS - BooleanExpression shall resolve to a Value of type Boolean */ 593. CompoundConstExpression ::= FieldConstExpressionList | ArrayConstExpression /* STATIC SEMANTICS - Within CompoundConstExpression the ArrayConstExpression can be used for arrays, record, record of and set of types. */ 594. FieldConstExpressionList ::= "{" FieldConstExpressionSpec {"," FieldConstExpressionSpec} "}" 595. FieldConstExpressionSpec ::= FieldReference AssignmentChar ConstantExpression 596. ArrayConstExpression ::= "{" [ArrayElementConstExpressionList] "}" 597. ArrayElementConstExpressionList ::= ConstantExpression {"," ConstantExpression} 598. Assignment ::= VariableRef AssignmentChar (Expression | TemplateBody) /* STATIC SEMANTICS - The Expression on the right hand side of Assignment shall evaluate to an explicit value of a type compatible with the type of the left hand side for value variables and shall evaluate to an explicit value, template (literal or a template instance) or a matching mechanism compatible with the type of the left hand side for template variables. */ 599. SingleExpression ::= XorExpression { "or" XorExpression } /* STATIC SEMANTICS - If more than one XorExpression exists, then the XorExpressions shall evaluate to specific values of compatible types */ 600. XorExpression ::= AndExpression { "xor" AndExpression } /* STATIC SEMANTICS - If more than one AndExpression exists, then the AndExpressions shall evaluate to specific values of compatible types */ 601. AndExpression ::= NotExpression { "and" NotExpression } /* STATIC SEMANTICS - If more than one NotExpression exists, then the NotExpressions shall evaluate to specific values of compatible types */ 602. NotExpression ::= [ "not" ] EqualExpression /* STATIC SEMANTICS - Operands of the not operator shall be of type boolean or derivatives of type Boolean. */ 603. EqualExpression ::= RelExpression { EqualOp RelExpression } /* STATIC SEMANTICS - If more than one RelExpression exists, then the RelExpressions shall evaluate to specific values of compatible types */ 604. RelExpression ::= ShiftExpression [ RelOp ShiftExpression ] /* STATIC SEMANTICS - If both ShiftExpressions exist, then each ShiftExpression shall evaluate to a specific integer, Enumerated or float Value or derivatives of these types */ 605. ShiftExpression ::= BitOrExpression { ShiftOp BitOrExpression } /* STATIC SEMANTICS - Each Result shall resolve to a specific Value. If more than one Result exists the right-hand operand shall be of type integer or derivatives and if the shift op is "<<" or ">>" then the left-hand operand shall resolve to either bitstring, hexstring or octetstring type or derivatives of these types. If the shift op is "<@" or "@>" then the left-hand operand shall be of type bitstring, hexstring, octetstring, charstring, universal charstring, record of, set of, or array, or derivatives of these types */ 606. BitOrExpression ::= BitXorExpression { "or4b" BitXorExpression } /* STATIC SEMANTICS - If more than one BitXorExpression exists, then the BitXorExpressions shall evaluate to specific values of compatible types */ 607. BitXorExpression ::= BitAndExpression { "xor4b" BitAndExpression } /* STATIC SEMANTICS - If more than one BitAndExpression exists, then the BitAndExpressions shall evaluate to specific values of compatible types */ 608. BitAndExpression ::= BitNotExpression { "and4b" BitNotExpression } /* STATIC SEMANTICS - If more than one BitNotExpression exists, then the BitNotExpressions shall evaluate to specific values of compatible types */ 609. BitNotExpression ::= [ "not4b" ] AddExpression /* STATIC SEMANTICS - If the not4b operator exists, the operand shall be of type bitstring, octetstring or hexstring or derivatives of these types. */ 610. AddExpression ::= MulExpression { AddOp MulExpression } /* STATIC SEMANTICS - Each MulExpression shall resolve to a specific Value. If more than one MulExpression exists and the AddOp resolves to StringOp then the MulExpressions shall be valid operands for StringOp. If more than one MulExpression exists and the AddOp does not resolve to StringOp then the MulExpression shall both resolve to type integer or float or derivatives of these types.*/ 611. MulExpression ::= UnaryExpression { MultiplyOp UnaryExpression } /* STATIC SEMANTICS - Each UnaryExpression shall resolve to a specific Value. If more than one UnaryExpression exists then the UnaryExpressions shall resolve to type integer or float or derivatives of these types. */ 612. UnaryExpression ::= [ UnaryOp ] Primary /* STATIC SEMANTICS - Primary shall resolve to a specific Value of type integer or float or derivatives of these types.*/ 613. Primary ::= OpCall | Value | "(" SingleExpression ")" 614. ExtendedFieldReference ::= { ( Dot ( StructFieldIdentifier | TypeDefIdentifier ) ) | ArrayOrBitRef | ( "[" NotUsedSymbol "]" ) }+ /* STATIC SEMANTIC - The TypeDefIdentifier shall be used only if the type of the VarInstance or ReferencedValue in which the ExtendedFieldReference is used is anytype. ArrayOrBitRef shall be used when referencing elements of values or arrays. The square brackets with dash shall be used when referencing inner types of a record of or set of type. */ 615. OpCall ::= ConfigurationOps | VerdictOps | TimerOps | TestcaseInstance | ( FunctionInstance [ ExtendedFieldReference ] ) | ( TemplateOps [ ExtendedFieldReference ] ) | ActivateOp 616. AddOp ::= "+" | "-" | StringOp /* STATIC SEMANTICS - Operands of the "+" or "-" operators shall be of type integer or float or derivations of integer or float (i.e. subrange) */ 617. MultiplyOp ::= "*" | "/" | "mod" | "rem" /* STATIC SEMANTICS - Operands of the "*", "/", rem or mod operators shall be of type integer or float or derivations of integer or float (i.e. subrange) */ 618. UnaryOp ::= "+" | "-" /* STATIC SEMANTICS - Operands of the "+" or "-" operators shall be of type integer or float or derivations of integer or float (i.e. subrange) */ 619. RelOp ::= "<" | ">" | ">=" | "<=" /* STATIC SEMANTICS - the precedence of the operators is defined in Table 6 */ 620. EqualOp ::= "==" | "!=" 621. StringOp ::= "&" /* STATIC SEMANTICS - Operands of the list operator shall be bitstring, hexstring, octetstring, (universal) character string, record of, set of, or array types, or derivates of these types */ 622. ShiftOp ::= "<<" | ">>" | "<@" | "@>" 623. LogStatement ::= LogKeyword "(" LogItem { "," LogItem } ")" 624. LogKeyword ::= "log" 625. LogItem ::= FreeText | TemplateInstance 626. LoopConstruct ::= ForStatement | WhileStatement | DoWhileStatement 627. ForStatement ::= ForKeyword "(" Initial SemiColon Final SemiColon Step ")" StatementBlock 628. ForKeyword ::= "for" 629. Initial ::= VarInstance | Assignment 630. Final ::= BooleanExpression 631. Step ::= Assignment 632. WhileStatement ::= WhileKeyword "(" BooleanExpression ")" StatementBlock 633. WhileKeyword ::= "while" 634. DoWhileStatement ::= DoKeyword StatementBlock WhileKeyword "(" BooleanExpression ")" 635. DoKeyword ::= "do" 636. ConditionalConstruct ::= IfKeyword "(" BooleanExpression ")" StatementBlock {ElseIfClause}[ElseClause] 637. IfKeyword ::= "if" 638. ElseIfClause ::= ElseKeyword IfKeyword "(" BooleanExpression ")" StatementBlock 639. ElseKeyword ::= "else" 640. ElseClause ::= ElseKeyword StatementBlock 641. SelectCaseConstruct ::= SelectKeyword "(" SingleExpression ")" SelectCaseBody 642. SelectKeyword ::= "select" 643. SelectCaseBody ::= "{" { SelectCase }+ "}" 644. SelectCase ::= CaseKeyword ( "(" TemplateInstance {"," TemplateInstance } ")" | ElseKeyword ) StatementBlock 645. CaseKeyword ::= "case" A.1.6.9 Miscellaneous productions 646. Dot ::= "." 647. Dash ::= "-" 648. Minus ::= Dash 649. SemiColon ::= ";" 650. Colon ::= ":" 651. Underscore ::= "_" 652. AssignmentChar ::= ":="