ttcn3

A.1.6 TTCN-3 Syntax Productions

1. TTCN3Module ::= TTCN3ModuleKeyword ModuleId “{ ” [ ModuleDefinitionsList ] [ ModuleControlPart ] “} ” [ WithStatement ] [ SemiColon ]

2. TTCN3ModuleKeyword ::= “module”

3. ModuleId ::= Identifier [ LanguageSpec ]

4. LanguageSpec ::= LanguageKeyword FreeText {  “,” FreeText }

5. LanguageKeyword ::= “language”

A.1.6.1 Module definitions part

A.1.6.1.0 General

6. ModuleDefinitionsList ::= {  ModuleDefinition [ SemiColon ] } +

7. ModuleDefinition ::= ( ( [ Visibility ] ( TypeDef | ConstDef | TemplateDef | ModuleParDef | FunctionDef | SignatureDef | TestcaseDef | AltstepDef | ImportDef | ExtFunctionDef | ExtConstDef ) ) | ( [ “public” ] GroupDef ) | ( [ “private” ] FriendModuleDef ) ) [ WithStatement ]

8. Visibility ::= “public” | “friend” | “private”

A.1.6.1.1 Typedef definitions

9. TypeDef ::= TypeDefKeyword TypeDefBody

10. TypeDefBody ::= StructuredTypeDef | SubTypeDef

11. TypeDefKeyword ::= “type”

12. StructuredTypeDef ::= RecordDef | UnionDef | SetDef | RecordOfDef | SetOfDef | EnumDef | PortDef | ComponentDef

13. RecordDef ::= RecordKeyword StructDefBody

14. RecordKeyword ::= “record”

15. StructDefBody ::= ( Identifier | AddressKeyword ) “{ ” [ StructFieldDef {  “,” StructFieldDef }  ] “} ”

16. StructFieldDef ::= ( Type | NestedTypeDef ) Identifier [ ArrayDef ] [ SubTypeSpec ] [ OptionalKeyword ]

17. NestedTypeDef ::= NestedRecordDef | NestedUnionDef | NestedSetDef | NestedRecordOfDef | NestedSetOfDef | NestedEnumDef

18. NestedRecordDef ::= RecordKeyword “{ ” [ StructFieldDef {  “,” StructFieldDef }  ] “} ”

19. NestedUnionDef ::= UnionKeyword “{ ” UnionFieldDef {  “,” UnionFieldDef }  “} ”

20. NestedSetDef ::= SetKeyword “{ ” [ StructFieldDef {  “,” StructFieldDef }  ] “} ”

21. NestedRecordOfDef ::= RecordKeyword [ StringLength ] OfKeyword ( Type | NestedTypeDef )

22. NestedSetOfDef ::= SetKeyword [ StringLength ] OfKeyword ( Type | NestedTypeDef )

23. NestedEnumDef ::= EnumKeyword “{ ” EnumerationList “} ”

24. OptionalKeyword ::= “optional”

25. UnionDef ::= UnionKeyword UnionDefBody

26. UnionKeyword ::= “union”

27. UnionDefBody ::= ( Identifier | AddressKeyword ) “{ ” UnionFieldDef {  “,” UnionFieldDef }  “} ”

28. UnionFieldDef ::= ( Type | NestedTypeDef ) Identifier [ ArrayDef ] [ SubTypeSpec ]

29. SetDef ::= SetKeyword StructDefBody

30. SetKeyword ::= “set”

31. RecordOfDef ::= RecordKeyword [ StringLength ] OfKeyword StructOfDefBody

32. OfKeyword ::= “of”

33. StructOfDefBody ::= ( Type | NestedTypeDef ) ( Identifier | AddressKeyword ) [ SubTypeSpec ]

34. SetOfDef ::= SetKeyword [ StringLength ] OfKeyword StructOfDefBody

35. EnumDef ::= EnumKeyword ( Identifier | AddressKeyword ) “{ ” EnumerationList “} ”

36. EnumKeyword ::= “enumerated”

37. EnumerationList ::= Enumeration {  “,” Enumeration }

38. Enumeration ::= Identifier [ “(” IntegerValueOrRange {  “,” IntegerValueOrRange }  “)” ]

39. IntegerValueOrRange ::= IntegerValue [ “..” IntegerValue ]

40. IntegerValue ::= [ Minus ] Number

41. SubTypeDef ::= Type ( Identifier | AddressKeyword ) [ ArrayDef ] [ SubTypeSpec ]

42. SubTypeSpec ::= AllowedValuesSpec [ StringLength ] | StringLength

/* STATIC SEMANTICS - AllowedValues shall be of the same type as the field being subtyped */

43. AllowedValuesSpec ::= “(” ( ( TemplateOrRange {  “,” TemplateOrRange }  ) | CharStringMatch ) “)”

44. TemplateOrRange ::= RangeDef | TemplateBody | 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 */

45. RangeDef ::= Bound “..” Bound

46. StringLength ::= LengthKeyword “(” SingleExpression [ “..” ( SingleExpression | InfinityKeyword ) ] “)”

/* STATIC SEMANTICS - StringLength shall only be used with String types or to limit set of and record of. SingleExpression and Bound shall evaluate to non-negative integer values (in case of Bound including infinity) */

47. LengthKeyword ::= “length”

48. PortDef ::= PortKeyword PortDefBody

49. PortDefBody ::= Identifier PortDefAttribs

50. PortKeyword ::= “port”

51. PortDefAttribs ::= MessageAttribs | ProcedureAttribs | MixedAttribs

52. MessageAttribs ::= MessageKeyword “{ ” {  ( AddressDecl | MessageList | ConfigParamDef ) [ SemiColon ] } + “} ”

53. ConfigParamDef ::= MapParamDef | UnmapParamDef

54. MapParamDef ::= MapKeyword ParamKeyword “(” FormalValuePar {  “,” FormalValuePar }  “)”

55. UnmapParamDef ::= UnmapKeyword ParamKeyword “(” FormalValuePar {  “,” FormalValuePar }  “)”

56. AddressDecl ::= AddressKeyword Type

57. MessageList ::= Direction AllOrTypeList

58. Direction ::= InParKeyword | OutParKeyword | InOutParKeyword

59. MessageKeyword ::= “message”

60. AllOrTypeList ::= AllKeyword | TypeList

/* NOTE: The use of AllKeyword in port definitions is deprecated */

61. AllKeyword ::= “all”

62. TypeList ::= Type {  “,” Type }

63. ProcedureAttribs ::= ProcedureKeyword “{ ” {  ( AddressDecl | ProcedureList | ConfigParamDef ) [ SemiColon ] } + “} ”

64. ProcedureKeyword ::= “procedure”

65. ProcedureList ::= Direction AllOrSignatureList

66. AllOrSignatureList ::= AllKeyword | SignatureList

67. SignatureList ::= Signature {  “,” Signature }

68. MixedAttribs ::= MixedKeyword “{ ” {  ( AddressDecl | MixedList | ConfigParamDef ) [ SemiColon ] } + “} ”

69. MixedKeyword ::= “mixed”

70. MixedList ::= Direction ProcOrTypeList

71. ProcOrTypeList ::= AllKeyword | ( ProcOrType {  “,” ProcOrType }  )

72. ProcOrType ::= Signature | Type

73. ComponentDef ::= ComponentKeyword Identifier [ ExtendsKeyword ComponentType {  “,” ComponentType }  ] “{ ” [ ComponentDefList ] “} ”

74. ComponentKeyword ::= “component”

75. ExtendsKeyword ::= “extends”

76. ComponentType ::= ExtendedIdentifier

77. ComponentDefList ::= {  ComponentElementDef [ WithStatement ] [ SemiColon ] }

78. ComponentElementDef ::= PortInstance | VarInstance | TimerInstance | ConstDef | TemplateDef

79. PortInstance ::= PortKeyword ExtendedIdentifier PortElement {  “,” PortElement }

80. PortElement ::= Identifier [ ArrayDef ]

A.1.6.1.2 Constant definitions

81. ConstDef ::= ConstKeyword Type ConstList

82. ConstList ::= SingleConstDef {  “,” SingleConstDef }

83. SingleConstDef ::= Identifier [ ArrayDef ] AssignmentChar ConstantExpression

84. ConstKeyword ::= “const”

A.1.6.1.3 Template definitions

85. TemplateDef ::= TemplateKeyword [ TemplateRestriction ] [ FuzzyModifier ] BaseTemplate [ DerivedDef ] AssignmentChar TemplateBody

86. BaseTemplate ::= ( Type | Signature ) Identifier [ “(” TemplateOrValueFormalParList “)” ]

87. TemplateKeyword ::= “template”

88. DerivedDef ::= ModifiesKeyword ExtendedIdentifier

89. ModifiesKeyword ::= “modifies”

90. TemplateOrValueFormalParList ::= TemplateOrValueFormalPar {  “,” TemplateOrValueFormalPar }

91. TemplateOrValueFormalPar ::= FormalValuePar | FormalTemplatePar

/* STATIC SEMANTICS - FormalValuePar shall resolve to an in parameter */

92. TemplateBody ::= ( SimpleSpec | FieldSpecList | ArrayValueOrAttrib ) [ ExtraMatchingAttributes ]

/* STATIC SEMANTICS - Within TeplateBody the ArrayValueOrAttrib can be used for array, record, record of and set of types. */

93. SimpleSpec ::= ( SingleExpression [ “&” SimpleTemplateSpec ] ) | SimpleTemplateSpec

94. SimpleTemplateSpec ::= SingleTemplateExpression [ “&” SimpleSpec ]

95. SingleTemplateExpression ::= MatchingSymbol | ( TemplateRefWithParList [ ExtendedFieldReference ] ) | ExtendedIdentifier EnumTemplateExtension

/** STATIC Semantics: ExtendedIdentifier shall refer to an enumerated value with associated value */

96. EnumTemplateExtension ::= “(” TemplateBody {  “,” TemplateBody }  “)”

/** STATIC Semantics: each TemplateBody shall be an integer template */

97. FieldSpecList ::= “{ ” FieldSpec {  “,” FieldSpec }  “} ”

98. FieldSpec ::= FieldReference AssignmentChar ( TemplateBody | Minus )

99. FieldReference ::= StructFieldRef | ArrayOrBitRef | ParRef

100. StructFieldRef ::= Identifier | PredefinedType | TypeReference

/* STATIC SEMANTICS - PredefinedType and TypeReference shall be used for anytype value notation only. PredefinedType shall not be AnyTypeKeyword.*/

101. ParRef ::= Identifier

/* STATIC SEMANTICS - Identifier in ParRef shall be a formal parameter identifier from the associated signature definition */

102. 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 */

103. FieldOrBitNumber ::= SingleExpression

/* STATIC SEMANTICS - SingleExpression will resolve to a value of integer type */

104. ArrayValueOrAttrib ::= “{ ” [ ArrayElementSpecList ] “} ”

105. ArrayElementSpecList ::= ArrayElementSpec {  “,” ArrayElementSpec }

106. ArrayElementSpec ::= Minus | PermutationMatch | TemplateBody

107. MatchingSymbol ::= Complement | ( AnyValue [ WildcardLengthMatch ] ) | ( AnyOrOmit [ WildcardLengthMatch ] ) | ListOfTemplates | Range | BitStringMatch | HexStringMatch | OctetStringMatch | CharStringMatch | SubsetMatch | SupersetMatch | DecodedContentMatch

108. DecodedContentMatch ::= DecodedMatchKeyword [ “(” [ Expression ] “)” ] TemplateInstance

108. DecodedMatchKeyword ::= “decmatch”

/* STATIC SEMANTIC – WildcardLengthMatch shall be used when MatchingSymbol is used in fractions of a concatenated string or list (see clause 15.11) and shall not be used in other cases. In this case, the Complement, ListOfTemplates, Range, BitStringMatch, HexStringMatch, OctetStringMatch, CharStringMatch, SubsetMatch and SupersetMatch productions shall not be used. */

109. ExtraMatchingAttributes ::= StringLength | IfPresentKeyword | ( StringLength IfPresentKeyword )

110. BitStringMatch ::= “’” {  BinOrMatch }  “’” “B”

111. BinOrMatch ::= Bin | AnyValue | AnyOrOmit

112. HexStringMatch ::= “’” {  HexOrMatch }  “’” “H”

113. HexOrMatch ::= Hex | AnyValue | AnyOrOmit

114. OctetStringMatch ::= “’” {  OctOrMatch }  “’” “O”

115. OctOrMatch ::= Oct | AnyValue | AnyOrOmit

116. CharStringMatch ::= PatternKeyword [ CaseInsenModifier ] PatternParticle {  “&” PatternParticle }

117. PatternParticle ::= Pattern | ReferencedValue

118. PatternKeyword ::= “pattern”

119. Pattern ::= “”” {  PatternElement }  “””

120. PatternElement ::= ( ( “\ ” ( “?” | “*” | “\ ” | “[” | “]” | “{ ” | “} ” | “”” | “|” | “(” | “)” | “#” | “+” | “d” | “w” | “t” | “n” | “r” | “s” | “b” ) ) | ( “?” | “*” | “\ ” | “|” | “+” ) | ( “[” [ “^” ] [ {  PatternClassChar [ “-” PatternClassChar ] }  ] “]” ) | ( “{ ” [ “\ ” ] ReferencedValue “} ” ) | ( “\ ” “N” “{ ” ( ReferencedValue | Type ) “} ” ) | ( “”” “”” ) | ( “(” PatternElement “)” ) | ( “#” ( Num | ( “(” Number “,” [ Number ] “)” ) | ( “(” “,” Number “)” ) | ( “(” [ “,” ] “)” ) Num “)” ) ) ) | PatternChar

121. PatternChar ::= NonSpecialPatternChar | PatternQuadruple

/* STATIC SEMANTICS: Characters “?”, “*”, “\ ”, “[”, “]”, “{ ”, “} ”, “””, “|”, “(”, “)”, “#”, “+”, “d”, “^”, “N” have special semantics – they are metacharacters for the definition of pattern elements – only if they follow the BNF as defined above, if not they are interpreted like normal characters */

122. NonSpecialPatternChar ::= Char

123. PatternClassChar ::= NonSpecialPatternClassChar | PatternQuadruple | “\ ” EscapedPatternClassChar

124. NonSpecialPatternClassChar ::= Char

/* STATIC SEMANTICS: Characters “[”, “-”, “^”, “]”, “\ ”, “q”, “,”have special semantics – they are metacharacters for the definition of pattern class characters – only if they follow the BNF as defined above, if not they are interpreted like normal characters */

125. EscapedPatternClassChar ::= “[” | “-” | “^” | “]”

126. PatternQuadruple ::= “\ ” “q” “(” Number “,” Number “,” Number “,” Number “)”

127. Complement ::= ComplementKeyword ListOfTemplates

128. ComplementKeyword ::= “complement”

129. ListOfTemplates ::= “(” TemplateListItem {  “,” TemplateListItem }  “)”

130. TemplateListItem ::= TemplateBody | AllElementsFrom

131. AllElementsFrom ::= AllKeyword FromKeyword TemplateBody

132. SubsetMatch ::= SubsetKeyword ListOfTemplates

133. SubsetKeyword ::= “subset”

134. SupersetMatch ::= SupersetKeyword ListOfTemplates

135. SupersetKeyword ::= “superset”

136. PermutationMatch ::= PermutationKeyword ListOfTemplates

/* STATIC SEMANTICS: Restrictions on the content of TemplateBody within the ListOfTemplates are given in clause B.1.3.3. */

137. PermutationKeyword ::= “permutation”

138. AnyValue ::= “?”

139. AnyOrOmit ::= “*”

140. WildcardLengthMatch ::= LengthKeyword “(” SingleExpression “)”

/* STATIC SEMANTICS: SingleExpression shall evaluate to type integer */

141. IfPresentKeyword ::= “ifpresent”

142. PresentKeyword ::= “present”

143. Range ::= “(” Bound “..” Bound “)”

144. Bound ::= ( [ “!” ] SingleExpression ) | ( [ Minus ] InfinityKeyword )

/* STATIC SEMANTICS - Bounds shall evaluate to types integer, charstring, universal charstring or float. In case they evaluate to types charstring or universal charstring, the string length shall be 1. infinity as lower bound and –infinity as upper bound are allowed for float types only. */

145. InfinityKeyword ::= “infinity”

146. TemplateInstanceAssignment ::= Identifier “:=” TemplateInstance

/* STATIC SEMANTICS – if a value parameter is used, the inlinein-line template shall evaluate to a value */

147. TemplateRefWithParList ::= ExtendedIdentifier [ TemplateActualParList ]

148. TemplateInstance ::= [ ( Type | Signature ) Colon ] [ DerivedRefWithParList AssignmentChar ] TemplateBody

149. DerivedRefWithParList ::= ModifiesKeyword TemplateRefWithParList

150. TemplateActualParList ::= “(” [ ( TemplateInstanceActualPar {  “,” TemplateInstanceActualPar }  ) | ( TemplateInstanceAssignment {  “,” TemplateInstanceAssignment }  ) ] “)”

151. TemplateInstanceActualPar ::= TemplateInstance | Minus

/* STATIC SEMANTICS - When the corresponding formal parameter is not of template type the TemplateInstance production shall resolve to one or more SingleExpressions */

152. TemplateOps ::= MatchOp | ValueofOp

153. MatchOp ::= MatchKeyword “(” Expression “,” TemplateInstance “)”

154. MatchKeyword ::= “match”

155. ValueofOp ::= ValueofKeyword “(” TemplateInstance “)”

156. ValueofKeyword ::= “valueof”

A.1.6.1.4 Function definitions

157. FunctionDef ::= FunctionKeyword [ DeterministicModifier ] Identifier “(” [ FunctionFormalParList ] “)” [ RunsOnSpec ] [ MtcSpec ] [ SystemSpec ] [ ReturnType ] StatementBlock

158. FunctionKeyword ::= “function”

159. FunctionFormalParList ::= FunctionFormalPar {  “,” FunctionFormalPar }

160. FunctionFormalPar ::= FormalValuePar | FormalTimerPar | FormalTemplatePar | FormalPortPar

161. ReturnType ::= ReturnKeyword [ TemplateKeyword | RestrictedTemplate ] Type

162. ReturnKeyword ::= “return”

163. RunsOnSpec ::= RunsKeyword OnKeyword ComponentType

164. RunsKeyword ::= “runs”

165. OnKeyword ::= “on”

166. MtcSpec ::= MTCKeyword ComponentType

167. MTCKeyword ::= “mtc”

168. StatementBlock ::= “{ ” [ FunctionDefList ] [ FunctionStatementList ] “} ”

169. FunctionDefList ::= {  ( FunctionLocalDef | FunctionLocalInst ) [ WithStatement ] [ SemiColon ] } +

170. FunctionStatementList ::= {  FunctionStatement [ SemiColon ] } +

171. FunctionLocalInst ::= VarInstance | TimerInstance

172. FunctionLocalDef ::= ConstDef | TemplateDef

173. FunctionStatement ::= ConfigurationStatements | TimerStatements | CommunicationStatements | BasicStatements | BehaviourStatements | SetLocalVerdict | SUTStatements | TestcaseOperation

174. FunctionInstance ::= FunctionRef “(” [ FunctionActualParList ] “)”

175. FunctionRef ::= [ Identifier Dot ] ( Identifier | PreDefFunctionIdentifier )

176. PreDefFunctionIdentifier ::= Identifier [ CaseInsenModifier ]

/* STATIC SEMANTICS - The Identifier shall be one of the pre-definedpredefined TTCN-3 function identifiers from Annex C of ES 201 873-1. CaseInsenModifier shall be present only if Identifier is “regexp”. */

177. FunctionActualParList ::= ( FunctionActualPar {  “,” FunctionActualPar }  ) | ( FunctionActualParAssignment {  “,” FunctionActualParAssignment }  )

178. FunctionActualPar ::= ArrayIdentifierRef | TemplateInstance | ComponentRef | Minus

/* 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 */

179. FunctionActualParAssignment ::= TemplateInstanceAssignment | ComponentRefAssignment | ArrayIdentifierRefAssignment

180. ArrayIdentifierRefAssignment ::= Identifier “:=” ArrayIdentifierRef

A.1.6.1.5 Signature definitions

181. SignatureDef ::= SignatureKeyword Identifier “(” [ SignatureFormalParList ] “)” [ ReturnType | NoBlockKeyword ] [ ExceptionSpec ]

182. SignatureKeyword ::= “signature”

183. SignatureFormalParList ::= FormalValuePar {  “,” FormalValuePar }

184. ExceptionSpec ::= ExceptionKeyword “(” TypeList “)”

185. ExceptionKeyword ::= “exception”

186. Signature ::= ExtendedIdentifier

187. NoBlockKeyword ::= “noblock”

A.1.6.1.6 Testcase definitions

188. TestcaseDef ::= TestcaseKeyword Identifier “(” [ TemplateOrValueFormalParList ] “)” ConfigSpec StatementBlock

189. TestcaseKeyword ::= “testcase”

190. ConfigSpec ::= RunsOnSpec [ SystemSpec ]

191. SystemSpec ::= SystemKeyword ComponentType

192. SystemKeyword ::= “system”

193. TestcaseInstance ::= ExecuteKeyword “(” ExtendedIdentifier “(” [ TestcaseActualParList ] “)” [ “,” ( Expression | Minus ) [ “,” SingleExpression ] ] “)”

194. ExecuteKeyword ::= “execute”

195. TestcaseActualParList ::= ( TemplateInstanceActualPar {  “,” TemplateInstanceActualPar }  ) | ( TemplateInstanceAssignment {  “,” TemplateInstanceAssignment }  )

/* 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 */

A.1.6.1.7 Altstep definitions

196. AltstepDef ::= AltstepKeyword Identifier “(” [ FunctionFormalParList ] “)” [ RunsOnSpec ] [ MtcSpec ] [ SystemSpec ] “{ ” AltstepLocalDefList AltGuardList “} ”

197. AltstepKeyword ::= “altstep”

198. AltstepLocalDefList ::= {  AltstepLocalDef [ WithStatement ] [ SemiColon ] }

199. AltstepLocalDef ::= VarInstance | TimerInstance | ConstDef | TemplateDef

200. AltstepInstance ::= ExtendedIdentifier “(” [ FunctionActualParList ] “)”

A.1.6.1.8 Import definitions

201. ImportDef ::= ImportKeyword ImportFromSpec ( AllWithExcepts | ( “{ ” ImportSpec “} ” ) )

202. ImportKeyword ::= “import”

203. AllWithExcepts ::= AllKeyword [ ExceptsDef ]

204. ExceptsDef ::= ExceptKeyword “{ ” ExceptSpec “} ”

205. ExceptKeyword ::= “except”

206. ExceptSpec ::= {  ExceptElement [ SemiColon ] }

207. ExceptElement ::= ExceptGroupSpec | ExceptTypeDefSpec | ExceptTemplateSpec | ExceptConstSpec | ExceptTestcaseSpec | ExceptAltstepSpec | ExceptFunctionSpec | ExceptSignatureSpec | ExceptModuleParSpec

208. ExceptGroupSpec ::= GroupKeyword ( QualifiedIdentifierList | AllKeyword )

209. IdentifierListOrAll ::= IdentifierList | AllKeyword

210. ExceptTypeDefSpec ::= TypeDefKeyword IdentifierListOrAll

211. ExceptTemplateSpec ::= TemplateKeyword IdentifierListOrAll

212. ExceptConstSpec ::= ConstKeyword IdentifierListOrAll

213. ExceptTestcaseSpec ::= TestcaseKeyword IdentifierListOrAll

214. ExceptAltstepSpec ::= AltstepKeyword IdentifierListOrAll

215. ExceptFunctionSpec ::= FunctionKeyword IdentifierListOrAll

216. ExceptSignatureSpec ::= SignatureKeyword IdentifierListOrAll

217. ExceptModuleParSpec ::= ModuleParKeyword IdentifierListOrAll

218. ImportSpec ::= {  ImportElement [ SemiColon ] }

219. ImportElement ::= ImportGroupSpec | ImportTypeDefSpec | ImportTemplateSpec | ImportConstSpec | ImportTestcaseSpec | ImportAltstepSpec | ImportFunctionSpec | ImportSignatureSpec | ImportModuleParSpec | ImportImportSpec

220. ImportFromSpec ::= FromKeyword ModuleId [ RecursiveKeyword ]

221. RecursiveKeyword ::= “recursive”

222. ImportGroupSpec ::= GroupKeyword ( GroupRefListWithExcept | AllGroupsWithExcept )

223. GroupRefListWithExcept ::= QualifiedIdentifierWithExcept {  “,” QualifiedIdentifierWithExcept }

224. AllGroupsWithExcept ::= AllKeyword [ ExceptKeyword QualifiedIdentifierList ]

225. QualifiedIdentifierWithExcept ::= QualifiedIdentifier [ ExceptsDef ]

226. IdentifierListOrAllWithExcept ::= IdentifierList | AllWithExcept

227. ImportTypeDefSpec ::= TypeDefKeyword IdentifierListOrAllWithExcept

228. AllWithExcept ::= AllKeyword [ ExceptKeyword IdentifierList ]

229. ImportTemplateSpec ::= TemplateKeyword IdentifierListOrAllWithExcept

230. ImportConstSpec ::= ConstKeyword IdentifierListOrAllWithExcept

231. ImportAltstepSpec ::= AltstepKeyword IdentifierListOrAllWithExcept

232. ImportTestcaseSpec ::= TestcaseKeyword IdentifierListOrAllWithExcept

233. ImportFunctionSpec ::= FunctionKeyword IdentifierListOrAllWithExcept

234. ImportSignatureSpec ::= SignatureKeyword IdentifierListOrAllWithExcept

235. ImportModuleParSpec ::= ModuleParKeyword IdentifierListOrAllWithExcept

236. ImportImportSpec ::= ImportKeyword AllKeyword

A.1.6.1.9 Group definitions

237. GroupDef ::= GroupKeyword Identifier “{ ” [ ModuleDefinitionsList ] “} ”

238. GroupKeyword ::= “group”

A.1.6.1.10 External function definitions

239. ExtFunctionDef ::= ExtKeyword FunctionKeyword [ DeterministicModifier ] Identifier “(” [ FunctionFormalParList ] “)” [ ReturnType ]

240. ExtKeyword ::= “external”

A.1.6.1.11 External constant definitions

241. ExtConstDef ::= ExtKeyword ConstKeyword Type IdentifierList

A.1.6.1.12 Module parameter definitions

242. ModuleParDef ::= ModuleParKeyword ( ModulePar | ( “{ ” MultitypedModuleParList “} ” ) )

243. ModuleParKeyword ::= “modulepar”

244. MultitypedModuleParList ::= {  ModulePar [ SemiColon ] }

245. ModulePar ::= Type ModuleParList

246. ModuleParList ::= Identifier [ AssignmentChar ConstantExpression ] {  “,” Identifier [ AssignmentChar ConstantExpression ] }

A.1.6.1.13 Friend module definitions

247. FriendModuleDef ::= “friend” “module” IdentifierList [ SemiColon ]

A.1.6.2 Control part

248. ModuleControlPart ::= ControlKeyword “{ ” ModuleControlBody “} ” [ WithStatement ] [ SemiColon ]

249. ControlKeyword ::= “control”

250. ModuleControlBody ::= [ ControlStatementOrDefList ]

251. ControlStatementOrDefList ::= {  ControlStatementOrDef [ SemiColon ] } +

252. ControlStatementOrDef ::= ( FunctionLocalDef | FunctionLocalInst ) [ WithStatement ] | ControlStatement

253. ControlStatement ::= TimerStatements | BasicStatements | BehaviourStatements | SUTStatements | StopKeyword

A.1.6.3 Local definitions

A.1.6.3.1 Variable instantiation

254. VarInstance ::= VarKeyword ( ( [ LazyModifier | FuzzyModifier ] Type VarList ) | ( ( TemplateKeyword | RestrictedTemplate ) [ LazyModifier | FuzzyModifier ] Type TempVarList ) )

255. VarList ::= SingleVarInstance {  “,” SingleVarInstance }

256. SingleVarInstance ::= Identifier [ ArrayDef ] [ AssignmentChar Expression ]

257. VarKeyword ::= “var”

258. TempVarList ::= SingleTempVarInstance {  “,” SingleTempVarInstance }

259. SingleTempVarInstance ::= Identifier [ ArrayDef ] [ AssignmentChar TemplateBody ]

260. VariableRef ::= Identifier [ ExtendedFieldReference ]

A.1.6.3.2 Timer instantiation

261. TimerInstance ::= TimerKeyword VarList

262. TimerKeyword ::= “timer”

263. ArrayIdentifierRef ::= Identifier {  ArrayOrBitRef }

A.1.6.4 Operations

A.1.6.4.1 Component operations

264. ConfigurationStatements ::= ConnectStatement | MapStatement | DisconnectStatement | UnmapStatement | DoneStatement | KilledStatement | StartTCStatement | StopTCStatement | KillTCStatement

265. ConfigurationOps ::= CreateOp | SelfOp | SystemKeyword | MTCKeyword | RunningOp | AliveOp

266. CreateOp ::= ComponentType Dot CreateKeyword [ “(” ( SingleExpression | Minus ) [ “,” SingleExpression ] “)” ] [ AliveKeyword ]

267. SelfOp ::= “self”

268. DoneStatement ::= ComponentOrAny Dot DoneKeyword [ PortRedirectSymbol [ ValueStoreSpec ] [ IndexSpec ] ]

/*STATIC SEMANTICS – If PortRedirectSymbol is present, at least one of ValueStoreSpec and IndexSpec shall be present*/

269. ComponentOrAny ::= ComponentOrDefaultReference | ( AnyKeyword ( ComponentKeyword | FromKeyword VariableRef ) ) | ( AllKeyword ComponentKeyword )

270. ValueStoreSpec ::= ValueKeyword VariableRef

271. IndexAssignment ::= PortRedirectSymbol IndexSpec

272. IndexSpec ::= IndexModifier ValueStoreSpec

273. KilledStatement ::= ComponentOrAny Dot KilledKeyword [ PortRedirectSymbol [ ValueStoreSpec ] [ IndexSpec ] ]

/*STATIC SEMANTICS – If PortRedirectSymbol is present, at least one of ValueStoreSpec and IndexSpec shall be present*/

274. DoneKeyword ::= “done”

275. KilledKeyword ::= “killed”

276. RunningOp ::= ComponentOrAny Dot RunningKeyword [ IndexAssignment ]

277. RunningKeyword ::= “running”

278. AliveOp ::= ComponentOrAny Dot AliveKeyword [ IndexAssignment ]

279. CreateKeyword ::= “create”

280. AliveKeyword ::= “alive”

281. ConnectStatement ::= ConnectKeyword SingleConnectionSpec

282. ConnectKeyword ::= “connect”

283. SingleConnectionSpec ::= “(” PortRef “,” PortRef “)”

284. PortRef ::= ComponentRef Colon ArrayIdentifierRef

285. ComponentRef ::= ComponentOrDefaultReference | SystemKeyword | SelfOp | MTCKeyword

286. ComponentRefAssignment ::= Identifier “:=” ComponentRef

287. DisconnectStatement ::= DisconnectKeyword [ SingleConnectionSpec | AllConnectionsSpec | AllPortsSpec | AllCompsAllPortsSpec ]

288. AllConnectionsSpec ::= “(” PortRef “)”

289. AllPortsSpec ::= “(” ComponentRef “:” AllKeyword PortKeyword “)”

290. AllCompsAllPortsSpec ::= “(” AllKeyword ComponentKeyword “:” AllKeyword PortKeyword “)”

291. DisconnectKeyword ::= “disconnect”

292. MapStatement ::= MapKeyword SingleConnectionSpec [ ParamClause ]

293. ParamClause ::= ParamKeyword FunctionActualParList

294. MapKeyword ::= “map”

295. UnmapStatement ::= UnmapKeyword [ SingleConnectionSpec [ ParamClause ] | AllConnectionsSpec [ ParamClause ] | AllPortsSpec | AllCompsAllPortsSpec ]

296. UnmapKeyword ::= “unmap”

297. StartTCStatement ::= ComponentOrDefaultReference Dot StartKeyword “(” ( FunctionInstance | AltstepInstance ) “)”

298. StartKeyword ::= “start”

299. StopTCStatement ::= StopKeyword | ( ComponentReferenceOrLiteral | AllKeyword ComponentKeyword ) Dot StopKeyword

300. ComponentReferenceOrLiteral ::= ComponentOrDefaultReference | MTCKeyword | SelfOp

301. KillTCStatement ::= KillKeyword | ( ( ComponentReferenceOrLiteral | AllKeyword ComponentKeyword ) Dot KillKeyword )

302. ComponentOrDefaultReference ::= VariableRef | FunctionInstance

303. KillKeyword ::= “kill”

A.1.6.4.2 Port operations

304. CommunicationStatements ::= SendStatement | CallStatement | ReplyStatement | RaiseStatement | ReceiveStatement | TriggerStatement | GetCallStatement | GetReplyStatement | CatchStatement | CheckStatement | ClearStatement | StartStatement | StopStatement | HaltStatement | CheckStateStatement

305. SendStatement ::= ArrayIdentifierRef Dot PortSendOp

306. PortSendOp ::= SendOpKeyword “(” TemplateInstance “)” [ ToClause ]

307. SendOpKeyword ::= “send”

308. ToClause ::= ToKeyword ( TemplateInstance | AddressRefList | AllKeyword ComponentKeyword )

309. AddressRefList ::= “(” TemplateInstance {  “,” TemplateInstance }  “)”

310. ToKeyword ::= “to”

311. CallStatement ::= ArrayIdentifierRef Dot PortCallOp [ PortCallBody ]

312. PortCallOp ::= CallOpKeyword “(” CallParameters “)” [ ToClause ]

313. CallOpKeyword ::= “call”

314. CallParameters ::= TemplateInstance [ “,” CallTimerValue ]

315. CallTimerValue ::= Expression | NowaitKeyword

316. NowaitKeyword ::= “nowait”

317. PortCallBody ::= “{ ” CallBodyStatementList “} ”

318. CallBodyStatementList ::= {  CallBodyStatement [ SemiColon ] } +

319. CallBodyStatement ::= CallBodyGuard StatementBlock

320. CallBodyGuard ::= AltGuardChar CallBodyOps

321. CallBodyOps ::= GetReplyStatement | CatchStatement

322. ReplyStatement ::= ArrayIdentifierRef Dot PortReplyOp

323. PortReplyOp ::= ReplyKeyword “(” TemplateInstance [ ReplyValue ] “)” [ ToClause ]

324. ReplyKeyword ::= “reply”

325. ReplyValue ::= ValueKeyword TemplateBody

/* STATIC SEMANTICS - TemplateBody shall be type compatible with the return type. It shall evaluate to a value or template (literal or template instance) conforming to the template(value) restriction. */

326. RaiseStatement ::= ArrayIdentifierRef Dot PortRaiseOp

327. PortRaiseOp ::= RaiseKeyword “(” Signature “,” TemplateInstance “)” [ ToClause ]

328. RaiseKeyword ::= “raise”

329. ReceiveStatement ::= PortOrAny Dot PortReceiveOp

330. PortOrAny ::= ArrayIdentifierRef | ( AnyKeyword ( PortKeyword | FromKeyword VariableRef ) )

331. PortReceiveOp ::= ReceiveOpKeyword [ “(” TemplateInstance “)” ] [ FromClause ] [ PortRedirect ]

332. ReceiveOpKeyword ::= “receive”

333. FromClause ::= FromKeyword ( TemplateInstance | AddressRefList | AnyKeyword ComponentKeyword )

334. FromKeyword ::= “from”

335. PortRedirect ::= PortRedirectSymbol ( ( ValueSpec [ SenderSpec ] [ IndexSpec ] ) | ( SenderSpec [ IndexSpec ] ) | IndexSpec )

336. PortRedirectSymbol ::= “->”

337. ValueSpec ::= ValueKeyword ( VariableRef | ( “(” SingleValueSpec {  “,” SingleValueSpec }  “)” ) )

338. SingleValueSpec ::= VariableRef [ AssignmentChar [ DecodedModifier [ “(” [ Expression ] “)” ] ] FieldReference ExtendedFieldReference ]

/*STATIC SEMANTICS – FieldReference shall not be ParRef and ExtendedFieldReference shall not be TypeDefIdentifier*/

339. ValueKeyword ::= “value”

340. SenderSpec ::= SenderKeyword VariableRef

341. SenderKeyword ::= “sender”

342. TriggerStatement ::= PortOrAny Dot PortTriggerOp

343. PortTriggerOp ::= TriggerOpKeyword [ “(” TemplateInstance “)” ] [ FromClause ] [ PortRedirect ]

344. TriggerOpKeyword ::= “trigger”

345. GetCallStatement ::= PortOrAny Dot PortGetCallOp

346. PortGetCallOp ::= GetCallOpKeyword [ “(” TemplateInstance “)” ] [ FromClause ] [ PortRedirectWithParam ]

347. GetCallOpKeyword ::= “getcall”

348. PortRedirectWithParam ::= PortRedirectSymbol RedirectWithParamSpec

349. RedirectWithParamSpec ::= ( ParamSpec [ SenderSpec ] [ IndexSpec ] ) | ( SenderSpec [ IndexSpec ] ) | IndexSpec

350. ParamSpec ::= ParamKeyword ParamAssignmentList

351. ParamKeyword ::= “param”

352. ParamAssignmentList ::= “(” ( AssignmentList | VariableList ) “)”

353. AssignmentList ::= VariableAssignment {  “,” VariableAssignment }

354. VariableAssignment ::= VariableRef AssignmentChar [ DecodedModifier [ “(” Expression ] “)” ] Identifier

355. VariableList ::= VariableEntry {  “,” VariableEntry }

356. VariableEntry ::= VariableRef | Minus

357. GetReplyStatement ::= PortOrAny Dot PortGetReplyOp

358. PortGetReplyOp ::= GetReplyOpKeyword [ “(” TemplateInstance [ ValueMatchSpec ] “)” ] [ FromClause ] [ PortRedirectWithValueAndParam ]

359. PortRedirectWithValueAndParam ::= PortRedirectSymbol RedirectWithValueAndParamSpec

360. RedirectWithValueAndParamSpec ::= ( ValueSpec [ ParamSpec ] [ SenderSpec ] [ IndexSpec ] ) | RedirectWithParamSpec

361. GetReplyOpKeyword ::= “getreply”

362. ValueMatchSpec ::= ValueKeyword TemplateInstance

363. CheckStatement ::= PortOrAny Dot PortCheckOp

364. PortCheckOp ::= CheckOpKeyword [ “(” CheckParameter “)” ]

365. CheckOpKeyword ::= “check”

366. CheckParameter ::= CheckPortOpsPresent | FromClausePresent | RedirectPresent

367. FromClausePresent ::= FromClause [ PortRedirectSymbol ( ( SenderSpec [ IndexSpec ] ) | IndexSpec ) ]

368. RedirectPresent ::= PortRedirectSymbol ( ( SenderSpec [ IndexSpec ] ) | IndexSpec )

369. CheckPortOpsPresent ::= PortReceiveOp | PortGetCallOp | PortGetReplyOp | PortCatchOp

370. CatchStatement ::= PortOrAny Dot PortCatchOp

371. PortCatchOp ::= CatchOpKeyword [ “(” CatchOpParameter “)” ] [ FromClause ] [ PortRedirect ]

372. CatchOpKeyword ::= “catch”

373. CatchOpParameter ::= Signature “,” TemplateInstance | TimeoutKeyword

374. ClearStatement ::= PortOrAll Dot ClearOpKeyword

375. PortOrAll ::= ArrayIdentifierRef | AllKeyword PortKeyword

376. ClearOpKeyword ::= “clear”

377. StartStatement ::= PortOrAll Dot StartKeyword

378. StopStatement ::= PortOrAll Dot StopKeyword

379. StopKeyword ::= “stop”

380. HaltStatement ::= PortOrAll Dot HaltKeyword

381. HaltKeyword ::= “halt”

382. AnyKeyword ::= “any”

383. CheckStateStatement ::= PortOrAllAny Dot CheckStateKeyword “(” SingleExpression “)”

384. PortOrAllAny ::= PortOrAll | AnyKeyword PortKeyword

385. CheckStateKeyword ::= “checkstate”

A.1.6.4.3 Timer operations

386. TimerStatements ::= StartTimerStatement | StopTimerStatement | TimeoutStatement

387. TimerOps ::= ReadTimerOp | RunningTimerOp

388. StartTimerStatement ::= ArrayIdentifierRef Dot StartKeyword [ “(” Expression “)” ]

389. StopTimerStatement ::= TimerRefOrAll Dot StopKeyword

390. TimerRefOrAll ::= ArrayIdentifierRef | AllKeyword TimerKeyword

391. ReadTimerOp ::= ArrayIdentifierRef Dot ReadKeyword

392. ReadKeyword ::= “read”

393. RunningTimerOp ::= TimerRefOrAny Dot RunningKeyword [ IndexAssignment ]

394. TimeoutStatement ::= TimerRefOrAny Dot TimeoutKeyword [ IndexAssignment ]

395. TimerRefOrAny ::= ArrayIdentifierRef | ( AnyKeyword TimerKeyword ) | ( AnyKeyword FromKeyword Identifier )

396. TimeoutKeyword ::= “timeout”

A.1.6.4.4 Testcase operation

397. TestcaseOperation ::= TestcaseKeyword “.” StopKeyword [ “(” {  LogItem [ “,” ] }  “)” ]

A.1.6.5 Type

398. Type ::= PredefinedType | ReferencedType

399. PredefinedType ::= BitStringKeyword | BooleanKeyword | CharStringKeyword | UniversalCharString | IntegerKeyword | OctetStringKeyword | HexStringKeyword | VerdictTypeKeyword | FloatKeyword | AddressKeyword | DefaultKeyword | AnyTypeKeyword

400. BitStringKeyword ::= “bitstring”

401. BooleanKeyword ::= “boolean”

402. IntegerKeyword ::= “integer”

403. OctetStringKeyword ::= “octetstring”

404. HexStringKeyword ::= “hexstring”

405. VerdictTypeKeyword ::= “verdicttype”

406. FloatKeyword ::= “float”

407. AddressKeyword ::= “address”

408. DefaultKeyword ::= “default”

409. AnyTypeKeyword ::= “anytype”

410. CharStringKeyword ::= “charstring”

411. UniversalCharString ::= UniversalKeyword CharStringKeyword

412. UniversalKeyword ::= “universal”

413. ReferencedType ::= ExtendedIdentifier [ ExtendedFieldReference ]

414. TypeReference ::= ExtendedIdentifier

415. ArrayDef ::= {  “[” SingleExpression [ “..” SingleExpression ] “]” } +

/* STATIC SEMANTICS - ArrayBounds will resolve to a non negative value of integer type */

A.1.6.6 Value

416. Value ::= PredefinedValue | ReferencedValue

417. PredefinedValue ::= Bstring | BooleanValue | CharStringValue | Number | Ostring | Hstring | VerdictTypeValue | FloatValue | AddressValue | OmitKeyword

/* STATIC SEMANTICS - Number will resolve to a non negative value of integer type */

418. BooleanValue ::= “true” | “false”

419. VerdictTypeValue ::= “pass” | “fail” | “inconc” | “none” | “error”

420. CharStringValue ::= Cstring | Quadruple | USIlikeNotation

421. Quadruple ::= CharKeyword “(” Number “,” Number “,” Number “,” Number “)”

422. USIlikeNotation ::= CharKeyword “(” UIDlike {  “,” UIDlike }  “)”

423. UIDlike ::= ( “U” | “u” ) {  “+” }  {  Hex } #(1,8)

424. CharKeyword ::= “char”

425. FloatValue ::= FloatDotNotation | FloatENotation | NaNKeyword

426. NaNKeyword ::= “not_a_number”

427. FloatDotNotation ::= Number Dot DecimalNumber

428. FloatENotation ::= Number [ Dot DecimalNumber ] Exponential [ Minus ] Number

429. Exponential ::= “E”

430. ReferencedValue ::= ExtendedIdentifier [ ExtendedFieldReference | ExtendedEnumReference ]

/** STATIC Semantics: ExtendedEnumReference shall be present if and only if ExtendedIdentifier refers to an enumerated value with an attached value list */

431. ExtendedEnumReference ::= “(” IntegerValue “)”

432. Number ::= ( NonZeroNum {  Num }  ) | “0”

433. NonZeroNum ::= “1” | “2” | “3” | “4” | “5” | “6” | “7” | “8” | “9”

434. DecimalNumber ::= {  Num } +

435. Num ::= “0” | NonZeroNum

436. Bstring ::= “’” {  Bin | BinSpace }  “’” “B”

437. Bin ::= “0” | “1”

438. Hstring ::= “’” {  Hex | BinSpace }  “’” “H”

439. Hex ::= Num | “A” | “B” | “C” | “D” | “E” | “F” | “a” | “b” | “c” | “d” | “e” | “f”

440. Ostring ::= “’” {  Oct | BinSpace }  “’” “O”

441. Oct ::= Hex Hex

442. Cstring ::= “”” {  Char }  “””

443. Char ::=

/* REFERENCE - A character defined by the relevant CharacterString type. For charstring a character from the character set defined in ITU-T T.50. For universal charstring a character from any character set defined in ISO/IEC 10646 */

444. Identifier ::= Alpha {  AlphaNum | Underscore }

445. Alpha ::= UpperAlpha | LowerAlpha

446. AlphaNum ::= Alpha | Num

447. 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”

448. 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”

449. 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) */

450. FreeText ::= “”” {  ExtendedAlphaNum }  “””

451. AddressValue ::= “null”

452. OmitKeyword ::= “omit”

453. BinSpace ::= “” | “\ ” NLChar

454. NLChar ::=

/* REFERENCE - Any sequence of newline characters that constitute a newline by using the following C0 control characters: LF(10), VT(11), FF(12), CR(13) (see Recommendation ITU T T.50 [4]) (jointly called newline characters, see clause A.1.5.1) from the character set defined in Recommendation ITU T T.50 [4]. */

A.1.6.7 Parameterization

455. InParKeyword ::= “in”

456. OutParKeyword ::= “out”

457. InOutParKeyword ::= “inout”

458. FormalValuePar ::= [ ( InParKeyword | InOutParKeyword | OutParKeyword ) ] [ LazyModifier | FuzzyModifier ] Type Identifier [ “:=” ( Expression | Minus ) ]

459. FormalPortPar ::= [ InOutParKeyword ] Identifier Identifier

/* The first Identifier refers to the port type. The second Identifier refers to the port parameter identifier */

460. FormalTimerPar ::= [ InOutParKeyword ] TimerKeyword Identifier

461. FormalTemplatePar ::= [ ( InParKeyword | OutParKeyword | InOutParKeyword ) ] ( TemplateKeyword | RestrictedTemplate ) [ LazyModifier | FuzzyModifier ] Type Identifier [ “:=” ( TemplateInstance | Minus ) ]

462. RestrictedTemplate ::= OmitKeyword | ( TemplateKeyword TemplateRestriction )

463. TemplateRestriction ::= “(” ( OmitKeyword | ValueKeyword | PresentKeyword ) “)”

A.1.6.8 Statements

A.1.6.8.1 With statement

464. WithStatement ::= WithKeyword WithAttribList

465. WithKeyword ::= “with”

466. WithAttribList ::= “{ ” MultiWithAttrib “} ”

467. MultiWithAttrib ::= {  SingleWithAttrib [ SemiColon ] }

468. SingleWithAttrib ::= AttribKeyword [ OverrideKeyword ] [ AttribQualifier ] FreeText

469. AttribKeyword ::= EncodeKeyword | VariantKeyword | DisplayKeyword | ExtensionKeyword | OptionalKeyword

470. EncodeKeyword ::= “encode”

471. VariantKeyword ::= “variant”

472. DisplayKeyword ::= “display”

473. ExtensionKeyword ::= “extension”

474. OverrideKeyword ::= “override”

475. AttribQualifier ::= “(” DefOrFieldRefList “)”

476. DefOrFieldRefList ::= DefOrFieldRef {  “,” DefOrFieldRef }

477. DefOrFieldRef ::= QualifiedIdentifier | ( ( FieldReference | “[” Minus “]” ) [ ExtendedFieldReference ] ) | AllRef

478. QualifiedIdentifier ::= {  Identifier Dot }  Identifier

479. AllRef ::= ( GroupKeyword AllKeyword [ ExceptKeyword “{ ” QualifiedIdentifierList “} ” ] ) | ( ( TypeDefKeyword | TemplateKeyword | ConstKeyword | AltstepKeyword | TestcaseKeyword | FunctionKeyword | SignatureKeyword | ModuleParKeyword ) AllKeyword [ ExceptKeyword “{ ” IdentifierList “} ” ] )

A.1.6.8.2 Behaviour statements

480. BehaviourStatements ::= TestcaseInstance | FunctionInstance | ReturnStatement | AltConstruct | InterleavedConstruct | LabelStatement | GotoStatement | RepeatStatement | DeactivateStatement | AltstepInstance | ActivateOp | BreakStatement | ContinueStatement

481. SetLocalVerdict ::= SetVerdictKeyword “(” SingleExpression {  “,” LogItem }  “)”

482. SetVerdictKeyword ::= “setverdict”

483. GetLocalVerdict ::= “getverdict”

484. SUTStatements ::= ActionKeyword “(” ActionText {  StringOp ActionText }  “)”

485. ActionKeyword ::= “action”

486. ActionText ::= FreeText | Expression

487. ReturnStatement ::= ReturnKeyword [ TemplateInstance ]

/* STATIC SEMANTICS - TemplateInstance 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. */

488. AltConstruct ::= AltKeyword “{ ” AltGuardList “} ”

489. AltKeyword ::= “alt”

490. AltGuardList ::= {  GuardStatement | ElseStatement [ SemiColon ] }

491. GuardStatement ::= AltGuardChar ( AltstepInstance [ StatementBlock ] | GuardOp StatementBlock )

492. ElseStatement ::= “[” ElseKeyword “]” StatementBlock

493. AltGuardChar ::= “[” [ BooleanExpression ] “]”

494. GuardOp ::= TimeoutStatement | ReceiveStatement | TriggerStatement | GetCallStatement | CatchStatement | CheckStatement | GetReplyStatement | DoneStatement | KilledStatement

495. InterleavedConstruct ::= InterleavedKeyword “{ ” InterleavedGuardList “} ”

496. InterleavedKeyword ::= “interleave”

497. InterleavedGuardList ::= {  InterleavedGuardElement [ SemiColon ] } +

498. InterleavedGuardElement ::= InterleavedGuard StatementBlock

499. InterleavedGuard ::= “[” “]” GuardOp

500. LabelStatement ::= LabelKeyword Identifier

501. LabelKeyword ::= “label”

502. GotoStatement ::= GotoKeyword Identifier

503. GotoKeyword ::= “goto”

504. RepeatStatement ::= “repeat”

505. ActivateOp ::= ActivateKeyword “(” AltstepInstance “)”

506. ActivateKeyword ::= “activate”

507. DeactivateStatement ::= DeactivateKeyword [ “(” ComponentOrDefaultReference “)” ]

508. DeactivateKeyword ::= “deactivate”

509. BreakStatement ::= “break”

510. ContinueStatement ::= “continue”

A.1.6.8.3 Basic statements

511. BasicStatements ::= Assignment | LogStatement | LoopConstruct | ConditionalConstruct | SelectCaseConstruct | StatementBlock

512. Expression ::= SingleExpression | CompoundExpression

513. CompoundExpression ::= FieldExpressionList | ArrayExpression

/* STATIC SEMANTICS - Within CompoundExpression the ArrayExpression can be used for Arrays, record, record of and set of types. */

514. FieldExpressionList ::= “{ ” FieldExpressionSpec {  “,” FieldExpressionSpec }  “} ”

515. FieldExpressionSpec ::= FieldReference AssignmentChar NotUsedOrExpression

516. ArrayExpression ::= “{ ” [ ArrayElementExpressionList ] “} ”

517. ArrayElementExpressionList ::= NotUsedOrExpression {  “,” NotUsedOrExpression }

518. NotUsedOrExpression ::= Expression | Minus

519. ConstantExpression ::= SingleExpression | CompoundConstExpression

520. BooleanExpression ::= SingleExpression

/* STATIC SEMANTICS - BooleanExpression shall resolve to a Value of type Boolean */

521. CompoundConstExpression ::= FieldConstExpressionList | ArrayConstExpression

/* STATIC SEMANTICS - Within CompoundConstExpression the ArrayConstExpression can be used for arrays, record, record of and set of types. */

522. FieldConstExpressionList ::= “{ ” FieldConstExpressionSpec {  “,” FieldConstExpressionSpec }  “} ”

523. FieldConstExpressionSpec ::= FieldReference AssignmentChar ConstantExpression

524. ArrayConstExpression ::= “{ ” [ ArrayElementConstExpressionList ] “} ”

525. ArrayElementConstExpressionList ::= ConstantExpression {  “,” ConstantExpression }

526. Assignment ::= VariableRef AssignmentChar TemplateBody

/* STATIC SEMANTICS - The Templatebody 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. */

527. SingleExpression ::= XorExpression {  “or” XorExpression }

/* STATIC SEMANTICS - If more than one XorExpression exists, then the XorExpressions shall evaluate to specific values of compatible types */

528. XorExpression ::= AndExpression {  “xor” AndExpression }

/* STATIC SEMANTICS - If more than one AndExpression exists, then the AndExpressions shall evaluate to specific values of compatible types */

529. AndExpression ::= NotExpression {  “and” NotExpression }

/* STATIC SEMANTICS - If more than one NotExpression exists, then the NotExpressions shall evaluate to specific values of compatible types */

530. NotExpression ::= [ “not” ] EqualExpression

/* STATIC SEMANTICS - Operands of the not operator shall be of type boolean or derivatives of type Boolean. */

531. EqualExpression ::= RelExpression {  EqualOp RelExpression }

/* STATIC SEMANTICS - If more than one RelExpression exists, then the RelExpressions shall evaluate to specific values of compatible types. If only one RelExpression exists, it shall not derive to a CompoundExpression. */

532. RelExpression ::= ShiftExpression [ RelOp ShiftExpression ] | CompoundExpression

/* STATIC SEMANTICS - If both ShiftExpressions exist, then each ShiftExpression shall evaluate to a specific integer, Enumerated or float Value or derivatives of these types */

533. 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 “ */

534. BitOrExpression ::= BitXorExpression {  “or4b” BitXorExpression }

/* STATIC SEMANTICS - If more than one BitXorExpression exists, then the BitXorExpressions shall evaluate to specific values of compatible types */

535. BitXorExpression ::= BitAndExpression {  “xor4b” BitAndExpression }

/* STATIC SEMANTICS - If more than one BitAndExpression exists, then the BitAndExpressions shall evaluate to specific values of compatible types */

536. BitAndExpression ::= BitNotExpression {  “and4b” BitNotExpression }

/* STATIC SEMANTICS - If more than one BitNotExpression exists, then the BitNotExpressions shall evaluate to specific values of compatible types */

537. 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. */

538. 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. If only one MulExpression exists, it shall not derive to a CompoundExpression. */

539. MulExpression ::= UnaryExpression {  MultiplyOp UnaryExpression }  | CompoundExpression

/* 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. */

540. UnaryExpression ::= [ UnaryOp ] Primary

/* STATIC SEMANTICS - Primary shall resolve to a specific Value of type integer or float or derivatives of these types.*/

541. Primary ::= OpCall | Value | “(” SingleExpression “)”

542. ExtendedFieldReference ::= {  ( Dot ( Identifier | PredefinedType ) ) | ArrayOrBitRef | ( “[” Minus “]” ) } +

/* STATIC SEMANTIC - The Identifier refers to a type definition 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. */

543. OpCall ::= ConfigurationOps | GetLocalVerdict | TimerOps | TestcaseInstance | ( FunctionInstance [ ExtendedFieldReference ] ) | ( TemplateOps [ ExtendedFieldReference ] ) | ActivateOp

544. 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) */

545. 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) */

546. UnaryOp ::= “+” | “-”

/* STATIC SEMANTICS - Operands of the “+” or “-” operators shall be of type integer or float or derivations of integer or float (i.e. subrange) */

547. RelOp ::= “<” | “>” | “>=” | “<=”

/* STATIC SEMANTICS - the precedence of the operators is defined in Table 6 */

548. EqualOp ::= “==” | “!=”

549. 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 */

550. ShiftOp ::= “<<” | “>>” | “<@” | “@>”

551. LogStatement ::= LogKeyword “(” LogItem {  “,” LogItem }  “)”

552. LogKeyword ::= “log”

553. LogItem ::= FreeText | TemplateInstance

554. LoopConstruct ::= ForStatement | WhileStatement | DoWhileStatement

555. ForStatement ::= ForKeyword “(” Initial SemiColon BooleanExpression SemiColon Assignment “)” StatementBlock

556. ForKeyword ::= “for”

557. Initial ::= VarInstance | Assignment

558. WhileStatement ::= WhileKeyword “(” BooleanExpression “)” StatementBlock

559. WhileKeyword ::= “while”

560. DoWhileStatement ::= DoKeyword StatementBlock WhileKeyword “(” BooleanExpression “)”

561. DoKeyword ::= “do”

562. ConditionalConstruct ::= IfKeyword “(” BooleanExpression “)” StatementBlock {  ElseIfClause }  [ ElseClause ]

563. IfKeyword ::= “if”

564. ElseIfClause ::= ElseKeyword IfKeyword “(” BooleanExpression “)” StatementBlock

565. ElseKeyword ::= “else”

566. ElseClause ::= ElseKeyword StatementBlock

567. SelectCaseConstruct ::= SelectKeyword [ UnionKeyword ] “(” SingleExpression “)” SelectCaseBody

568. SelectKeyword ::= “select”

569. SelectCaseBody ::= “{ ” {  SelectCase } + [ CaseElse ] “} ”

570. SelectCase ::= CaseKeyword ( “(” TemplateInstance {  “,” TemplateInstance }  “)” | ElseKeyword ) StatementBlock

/** STATIC SEMANTICS TemplateInstance-s shall be Identifier-s if the UnionKeyword is present in the surrounding SelectCaseConstruct (see clause 19.3.2)*/

571. CaseElse ::= CaseKeyword ElseKeyword StatementBlock

572. CaseKeyword ::= “case”

573. ExtendedIdentifier ::= [ Identifier Dot ] Identifier

/** STATIC SEMANTICS The optional Identifier Dot part shall not be used for enumerated values*/

574. IdentifierList ::= Identifier {  “,” Identifier }

575. QualifiedIdentifierList ::= QualifiedIdentifier {  “,” QualifiedIdentifier }

A.1.6.9 Miscellaneous productions

576. Dot ::= “.”

577. Minus ::= “-”

578. SemiColon ::= “;”

579. Colon ::= “:”

580. Underscore ::= “_”

581. AssignmentChar ::= “:=”

582. IndexModifier ::= “@index”

583. DeterministicModifier ::= “@deterministic”

584. LazyModifier ::= “@lazy”

585. FuzzyModifier ::= “@fuzzy”

586. CaseInsenModifier ::= “@nocase”

587. DecodedModifier ::= “@decoded”