source: default/trunk/de.ugoe.cs.swe.bnftools.ebnf.generator/src/model/ttcn3-4.2.1-draft.bnf @ 18

Last change on this file since 18 was 5, checked in by zeiss, 14 years ago
File size: 56.6 KB
Line 
1grammar ttcn3;
2
3A.1.6   TTCN 3 syntax BNF productions
4A.1.6.0 TTCN 3 module
51. TTCN3Module ::= TTCN3ModuleKeyword TTCN3ModuleId
6                   "{"
7                   [ModuleDefinitionsPart]
8                   [ModuleControlPart]
9                   "}"
10                   [WithStatement] [SemiColon]
112. TTCN3ModuleKeyword ::= "module"
123. TTCN3ModuleId ::= ModuleId
134. ModuleId ::= GlobalModuleId [LanguageSpec]
145. GlobalModuleId ::= ModuleIdentifier
156. ModuleIdentifier ::= Identifier
167. LanguageSpec ::= LanguageKeyword FreeText { "," FreeText }
178. LanguageKeyword ::= "language"
18
19A.1.6.1 Module definitions part
20A.1.6.1.0       General
219. ModuleDefinitionsPart ::= ModuleDefinitionsList
2210. ModuleDefinitionsList ::= {ModuleDefinition [SemiColon]}+
2311. ModuleDefinition ::= ( ([Visibility]
24                            ( TypeDef |
25                              ConstDef |
26                              TemplateDef |
27                              ModuleParDef |
28                              FunctionDef |
29                              SignatureDef |
30                              TestcaseDef |
31                              AltstepDef |
32                              ImportDef |
33                              ExtFunctionDef |
34                              ExtConstDef )
35                            ) |
36                           (["public"] GroupDef ) |
37                           (["private"] FriendModuleDef )
38                         ) [WithStatement]
3912. Visibility ::= "public" | "friend" | "private"
40
41A.1.6.1.1       Typedef definitions
4213. TypeDef ::= TypeDefKeyword TypeDefBody
4314. TypeDefBody ::= StructuredTypeDef | SubTypeDef
4415. TypeDefKeyword ::= "type"
4516. StructuredTypeDef ::= RecordDef |
46                          UnionDef |
47                          SetDef |
48                          RecordOfDef |
49                          SetOfDef |
50                          EnumDef |
51                          PortDef |
52                          ComponentDef
5317. RecordDef ::= RecordKeyword StructDefBody
5418. RecordKeyword ::= "record"
5519. StructDefBody ::= (StructTypeIdentifier | AddressKeyword)
56                      "{" [StructFieldDef {"," StructFieldDef}] "}"
5720. StructTypeIdentifier ::= Identifier
5821. StructFieldDef ::= (Type | NestedTypeDef) StructFieldIdentifier [ArrayDef] [SubTypeSpec]
59                       [OptionalKeyword]
6022. NestedTypeDef ::= NestedRecordDef |
61                      NestedUnionDef |
62                      NestedSetDef |
63                      NestedRecordOfDef |
64                      NestedSetOfDef |
65                      NestedEnumDef
6623. NestedRecordDef ::= RecordKeyword "{" [StructFieldDef {"," StructFieldDef}] "}"
6724. NestedUnionDef ::= UnionKeyword "{" UnionFieldDef {"," UnionFieldDef} "}"
6825. NestedSetDef ::= SetKeyword "{" [StructFieldDef {"," StructFieldDef}] "}"
6926. NestedRecordOfDef ::= RecordKeyword [StringLength] OfKeyword (Type | NestedTypeDef)
7027. NestedSetOfDef ::= SetKeyword [StringLength] OfKeyword (Type | NestedTypeDef)
7128. NestedEnumDef ::= EnumKeyword "{" EnumerationList "}"
7229. StructFieldIdentifier ::= Identifier
7330. OptionalKeyword ::= "optional"
7431. UnionDef ::= UnionKeyword UnionDefBody
7532. UnionKeyword ::= "union"
7633. UnionDefBody ::= (StructTypeIdentifier | AddressKeyword)
77                     "{" UnionFieldDef {"," UnionFieldDef} "}"
7834. UnionFieldDef ::= (Type | NestedTypeDef) StructFieldIdentifier [ArrayDef] [SubTypeSpec]
7935. SetDef ::= SetKeyword StructDefBody
8036. SetKeyword ::= "set"
8137. RecordOfDef ::= RecordKeyword [StringLength] OfKeyword StructOfDefBody
8238. OfKeyword ::= "of"
8339. StructOfDefBody ::= (Type | NestedTypeDef) (StructTypeIdentifier | AddressKeyword) [SubTypeSpec]
8440. SetOfDef ::= SetKeyword [StringLength] OfKeyword StructOfDefBody
8541. EnumDef ::= EnumKeyword (EnumTypeIdentifier | AddressKeyword)
86                "{" EnumerationList "}"
8742. EnumKeyword ::= "enumerated"
8843. EnumTypeIdentifier ::= Identifier
8944. EnumerationList ::= Enumeration {"," Enumeration}
9045. Enumeration ::= EnumerationIdentifier ["("[Minus] Number ")"]
9146. EnumerationIdentifier ::= Identifier
9247. SubTypeDef ::= Type (SubTypeIdentifier | AddressKeyword)  [ArrayDef] [SubTypeSpec]
9348. SubTypeIdentifier ::= Identifier
9449. SubTypeSpec ::= AllowedValues [StringLength] | StringLength
95/* STATIC SEMANTICS - AllowedValues shall be of the same type as the field being subtyped */
9650. AllowedValues ::= "(" (ValueOrRange {"," ValueOrRange}) | CharStringMatch ")"
9751. ValueOrRange ::= RangeDef | ConstantExpression | Type
98/* STATIC SEMANTICS - RangeDef production shall only be used with integer, charstring, universal charstring or float based types */
99/* STATIC SEMANTICS - When subtyping charstring or universal charstring range and values shall not be mixed in the same SubTypeSpec */
10052. RangeDef ::= LowerBound ".." UpperBound
10153. StringLength ::= LengthKeyword "(" SingleConstExpression [".." UpperBound] ")"
102/* 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) */
10354.     LengthKeyword ::= "length"
10455. PortType ::= [GlobalModuleId Dot] PortTypeIdentifier
10556. PortDef ::= PortKeyword PortDefBody
10657. PortDefBody ::= PortTypeIdentifier PortDefAttribs
10758. PortKeyword ::= "port"
10859. PortTypeIdentifier ::= Identifier
10960. PortDefAttribs ::= MessageAttribs | ProcedureAttribs | MixedAttribs
11061. MessageAttribs ::= MessageKeyword
111                       "{" {MessageList [SemiColon]}+ "}"
11262. MessageList ::= Direction AllOrTypeList
11363. Direction ::= InParKeyword | OutParKeyword | InOutParKeyword
11464. MessageKeyword ::= "message"
11565. AllOrTypeList ::= AllKeyword | TypeList
116/* NOTE: The use of AllKeyword in port definitions is deprecated */
11766. AllKeyword ::= "all"
11867. TypeList ::= Type {"," Type}
11968. ProcedureAttribs ::= ProcedureKeyword
120                         "{" {ProcedureList  [SemiColon]}+ "}"
12169. ProcedureKeyword ::= "procedure"
12270. ProcedureList ::= Direction AllOrSignatureList
12371. AllOrSignatureList ::= AllKeyword | SignatureList
12472. SignatureList ::= Signature {"," Signature}
12573. MixedAttribs ::= MixedKeyword
126                     "{" {MixedList [SemiColon]}+ "}"
12774. MixedKeyword ::= "mixed"
12875. MixedList ::= Direction ProcOrTypeList
12976. ProcOrTypeList ::= AllKeyword | (ProcOrType {"," ProcOrType})
13077. ProcOrType ::= Signature | Type
13178. ComponentDef ::= ComponentKeyword ComponentTypeIdentifier
132                     [ExtendsKeyword ComponentType {"," ComponentType}]
133                     "{" [ComponentDefList] "}"
13479. ComponentKeyword ::= "component"
13580. ExtendsKeyword ::= "extends"
13681. ComponentType ::= [GlobalModuleId Dot] ComponentTypeIdentifier
13782. ComponentTypeIdentifier ::= Identifier
13883. ComponentDefList ::= {ComponentElementDef [SemiColon]}
13984. ComponentElementDef ::= PortInstance | VarInstance | TimerInstance | ConstDef
14085. PortInstance ::= PortKeyword PortType PortElement {"," PortElement}
14186. PortElement ::= PortIdentifier [ArrayDef]
14287. PortIdentifier ::= Identifier
143
144A.1.6.1.2       Constant definitions
14588. ConstDef ::= ConstKeyword Type ConstList
14689. ConstList ::= SingleConstDef  {"," SingleConstDef}
14790. SingleConstDef ::= ConstIdentifier [ArrayDef] AssignmentChar ConstantExpression
14891. ConstKeyword ::= "const"
14992. ConstIdentifier ::= Identifier
150
151A.1.6.1.3       Template definitions
15293. TemplateDef ::= TemplateKeyword [TemplateRestriction] BaseTemplate [DerivedDef]
153                    AssignmentChar TemplateBody
15494. BaseTemplate ::= (Type | Signature) TemplateIdentifier  ["(" TemplateFormalParList ")"]
15595. TemplateKeyword ::= "template"
15696. TemplateIdentifier ::= Identifier
15797. DerivedDef ::= ModifiesKeyword TemplateRef
15898. ModifiesKeyword ::= "modifies"
15999. TemplateFormalParList ::= TemplateFormalPar {"," TemplateFormalPar}
160100. TemplateFormalPar ::= FormalValuePar | FormalTemplatePar
161/* STATIC SEMANTICS - FormalValuePar shall resolve to an in parameter */
162101. TemplateBody ::= (SimpleSpec | FieldSpecList | ArrayValueOrAttrib) [ExtraMatchingAttributes]
163/* STATIC SEMANTICS - Within TeplateBody the ArrayValueOrAttrib can be used for array, record, record of and set of types. */
164102. SimpleSpec ::= SingleValueOrAttrib
165103. FieldSpecList ::= "{"[FieldSpec {"," FieldSpec}] "}"
166104. FieldSpec ::= FieldReference AssignmentChar TemplateBody
167105. FieldReference ::= StructFieldRef | ArrayOrBitRef | ParRef
168106. StructFieldRef ::= StructFieldIdentifier| PredefinedType | TypeReference
169/* STATIC SEMANTICS - PredefinedType and TypeReference shall be used for anytype value notation only. PredefinedType shall not be AnyTypeKeyword.*/
170107. ParRef ::= SignatureParIdentifier
171/* STATIC SEMANTICS - SignatureParIdentifier shall be a formal parameter identifier from the associated signature definition */
172108. SignatureParIdentifier ::= ValueParIdentifier
173109. ArrayOrBitRef ::= "[" FieldOrBitNumber "]"
174/* 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 */
175110. FieldOrBitNumber ::= SingleExpression
176/* STATIC SEMANTICS - SingleExpression will resolve to a value of integer type */
177111. SingleValueOrAttrib ::= MatchingSymbol |
178                             SingleExpression |
179                             ( TemplateRefWithParList [ ExtendedFieldReference ] )
180/* STATIC SEMANTIC - VariableIdentifier (accessed via singleExpression) may only be used in in-line template definitions to reference variables in the current scope */
181112. ArrayValueOrAttrib ::= "{" ArrayElementSpecList "}"
182113. ArrayElementSpecList ::= ArrayElementSpec {"," ArrayElementSpec}
183114. ArrayElementSpec ::= NotUsedSymbol | PermutationMatch | TemplateBody
184115. NotUsedSymbol ::= Dash
185116. MatchingSymbol ::= Complement |
186                        AnyValue |
187                        AnyOrOmit |
188                        ValueOrAttribList |
189                        Range |
190                        BitStringMatch |
191                        HexStringMatch |
192                        OctetStringMatch |
193                        CharStringMatch |
194                        SubsetMatch |
195                        SupersetMatch
196117. ExtraMatchingAttributes ::= LengthMatch | IfPresentMatch | (LengthMatch IfPresentMatch)
197118. BitStringMatch ::= "'" {BinOrMatch} "'" "B"
198119. BinOrMatch ::= Bin | AnyValue | AnyOrOmit
199120. HexStringMatch ::= "'" {HexOrMatch} "'" "H"
200121. HexOrMatch ::= Hex | AnyValue | AnyOrOmit
201122. OctetStringMatch ::= "'" {OctOrMatch} "'" "O"
202123. OctOrMatch ::= Oct | AnyValue | AnyOrOmit
203124. CharStringMatch ::= PatternKeyword Pattern {"&" (Pattern | ReferencedValue)}
204125. PatternKeyword ::= "pattern"
205126. Pattern ::= """ { PatternElement } """
206127. PatternElement ::=
207         ("\" ("?" | "*" | "\" | "[" | "]" | "{" | "}" | """ | "|" | "(" | ")" | "#" | "+" |
208               "d" | "w" | "t" | "n" | "r" | "s" | "b")) |
209         ("?" | "*" | "\" | "|" | "+") |
210         ("[" ["^"] [ {PatternChar ["-" PatternChar] } ] "]") |
211         ("{" ReferencedValue "}") |
212         ("\" "N" "{" (ReferencedValue | Type) "}") |
213         (""" """) |
214         ("(" PatternElement ")") |
215         ("#" (Num | ("(" Num "," [Num] ")") | ("(" "," Num ")"))) |
216         PatternChar
217128. PatternChar ::= Char | PatternQuadruple
218129. PatternQuadruple ::= "\" "q" "(" Group "," Plane "," Row "," Cell ")"
219130. Complement ::= ComplementKeyword "(" TemplateBody {"," TemplateBody} ")"
220131. ComplementKeyword ::= "complement"
221132. SubsetMatch ::= SubsetKeyword ValueOrAttribList
222133. SubsetKeyword ::= "subset"
223134. SupersetMatch ::= SupersetKeyword ValueOrAttribList
224135. SupersetKeyword ::= "superset"
225136. PermutationMatch ::= PermutationKeyword PermutationList
226137. PermutationKeyword ::= "permutation"
227138. PermutationList ::= "(" TemplateBody { "," TemplateBody } ")"
228/* STATIC SEMANTICS: Restrictions on the content of TemplateBody are given in clause B.1.3.3 */
229139. AnyValue ::= "?"
230140. AnyOrOmit ::= "*"
231141. ValueOrAttribList ::= "(" TemplateBody {"," TemplateBody}+ ")"
232142. LengthMatch ::= StringLength
233143. IfPresentMatch ::= IfPresentKeyword
234144. IfPresentKeyword ::= "ifpresent"
235145. PresentKeyword ::= "present"
236146. Range ::= "(" LowerBound ".." UpperBound ")"
237147. LowerBound ::= SingleConstExpression | (Minus InfinityKeyword)
238148. UpperBound ::= SingleConstExpression | InfinityKeyword
239/* 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*/
240149. InfinityKeyword ::= "infinity"
241150. TemplateInstance ::= InLineTemplate
242151. TemplateInstanceAssignment ::= ( TemplateParIdentifier | ValueParIdentifier )
243                                      ":=" InLineTemplate
244/* STATIC SEMANTICS – if a value parameter is used, the inline template shall evaluate to a value */
245152. TemplateRefWithParList ::= [GlobalModuleId Dot] ( TemplateIdentifier [TemplateActualParList] |
246                                TemplateParIdentifier )
247153. TemplateRef ::= [GlobalModuleId Dot] TemplateIdentifier | TemplateParIdentifier
248154. InLineTemplate ::= [(Type | Signature) Colon] [DerivedRefWithParList AssignmentChar]
249                        TemplateBody
250155. DerivedRefWithParList ::= ModifiesKeyword TemplateRefWithParList
251156. TemplateActualParList ::= "(" [( TemplateActualPar {"," TemplateActualPar}) |
252                               ( TemplateActualParAssignment {"," TemplateActualParAssignment })]")"
253157. TemplateActualPar ::= TemplateInstance | Dash
254/* STATIC SEMANTICS - When the corresponding formal parameter is not of template type the TemplateInstance production shall resolve to one or more SingleExpressions */
255158. TemplateActualParAssignment ::= TemplateInstanceAssignment
256159. TemplateOps ::= MatchOp | ValueofOp
257160. MatchOp ::= MatchKeyword "(" Expression "," TemplateInstance")"
258161. MatchKeyword ::= "match"
259162. ValueofOp ::= ValueofKeyword "(" TemplateInstance ")"
260163. ValueofKeyword ::= "valueof"
261
262A.1.6.1.4       Function definitions
263164. FunctionDef ::= FunctionKeyword FunctionIdentifier
264                     "("[FunctionFormalParList] ")" [RunsOnSpec] [ReturnType]
265                     StatementBlock
266165. FunctionKeyword ::= "function"
267166. FunctionIdentifier ::= Identifier
268167. FunctionFormalParList ::= FunctionFormalPar {"," FunctionFormalPar}
269168. FunctionFormalPar ::= FormalValuePar |
270                           FormalTimerPar |
271                           FormalTemplatePar |
272                           FormalPortPar
273169. ReturnType ::= ReturnKeyword [TemplateKeyword | RestrictedTemplate] Type
274170. ReturnKeyword ::= "return"
275171. RunsOnSpec ::= RunsKeyword OnKeyword ComponentType
276172. RunsKeyword ::= "runs"
277173. OnKeyword ::= "on"
278174. MTCKeyword ::= "mtc"
279175. StatementBlock ::= "{" [FunctionDefList] [FunctionStatementList] "}"
280176. FunctionDefList::= {(FunctionLocalDef | FunctionLocalInst)[SemiColon]}+
281177. FunctionStatementList::= {FunctionStatement [SemiColon]}+
282178. FunctionLocalInst ::= VarInstance | TimerInstance
283179. FunctionLocalDef ::= ConstDef | TemplateDef
284180. FunctionStatement ::= ConfigurationStatements |
285                           TimerStatements |
286                           CommunicationStatements |
287                           BasicStatements |
288                           BehaviourStatements |
289                           VerdictStatements |
290                           SUTStatements
291181. FunctionInstance ::= FunctionRef "(" [FunctionActualParList] ")"
292182. FunctionRef ::= [GlobalModuleId Dot] (FunctionIdentifier | ExtFunctionIdentifier ) |
293                     PreDefFunctionIdentifier
294183. PreDefFunctionIdentifier ::= Identifier
295/* STATIC SEMANTICS - The Identifier shall be one of the pre-defined TTCN 3 Function Identifiers from Annex C of ES 201 873-1 */
296184. FunctionActualParList ::= ( FunctionActualPar {"," FunctionActualPar} ) |
297                               ( FunctionActualParAssignment { "," FunctionActualParAssignment } )
298185. FunctionActualPar ::= TimerRef |
299                           TemplateInstance |
300                           Port |
301                           ComponentRef |
302                           Dash
303/* 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 */
304186. FunctionActualParAssignment ::= TemplateInstanceAssignment | ComponentRefAssignment |
305                                     PortAssignment | TimerRefAssignment
306187. TimerRefAssignment ::= TimerParIdentifier ":=" TimerRef
307188. PortAssignment ::= PortParIdentifier ":=" Port
308
309A.1.6.1.5       Signature definitions
310189. SignatureDef ::= SignatureKeyword SignatureIdentifier
311                      "("[SignatureFormalParList] ")" [ReturnType | NoBlockKeyword]
312                      [ExceptionSpec]
313190. SignatureKeyword ::= "signature"
314191. SignatureIdentifier ::= Identifier
315192. SignatureFormalParList ::= SignatureFormalPar {"," SignatureFormalPar}
316193. SignatureFormalPar ::= FormalValuePar
317194. ExceptionSpec ::= ExceptionKeyword "(" ExceptionTypeList ")"
318195. ExceptionKeyword ::= "exception"
319196. ExceptionTypeList ::= Type {"," Type}
320197. NoBlockKeyword ::= "noblock"
321198. Signature ::= [GlobalModuleId Dot] SignatureIdentifier
322
323A.1.6.1.6       Testcase definitions
324199. TestcaseDef ::= TestcaseKeyword TestcaseIdentifier
325                     "("[TestcaseFormalParList] ")" ConfigSpec
326                     StatementBlock
327200. TestcaseKeyword ::= "testcase"
328201. TestcaseIdentifier ::= Identifier
329202. TestcaseFormalParList ::= TestcaseFormalPar {"," TestcaseFormalPar}
330203. TestcaseFormalPar ::= FormalValuePar |
331                           FormalTemplatePar
332204. ConfigSpec ::= RunsOnSpec [SystemSpec]
333205. SystemSpec ::= SystemKeyword ComponentType
334206. SystemKeyword ::= "system"
335207. TestcaseInstance ::= ExecuteKeyword "(" TestcaseRef "(" [TestcaseActualParList] ")"
336                          ["," TimerValue] ")"
337208. ExecuteKeyword ::= "execute"
338209. TestcaseRef ::= [GlobalModuleId Dot] TestcaseIdentifier
339210. TestcaseActualParList ::= ( TestcaseActualPar {"," TestcaseActualPar} ) |
340                               ( TestcaseActualParAssignment { "," TestcaseActualParAssignment })
341211. TestcaseActualPar ::= TemplateInstance | Dash
342/* 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 */
343212. TestcaseActualParAssignment ::= TemplateInstanceAssignment
344
345A.1.6.1.7       Altstep definitions
346213. AltstepDef ::= AltstepKeyword AltstepIdentifier
347                    "("[AltstepFormalParList] ")" [RunsOnSpec]
348                    "{" AltstepLocalDefList AltGuardList "}"
349214. AltstepKeyword ::= "altstep"
350215. AltstepIdentifier ::= Identifier
351216. AltstepFormalParList ::= FunctionFormalParList
352217. AltstepLocalDefList ::= {AltstepLocalDef [SemiColon]}
353218. AltstepLocalDef ::= VarInstance | TimerInstance | ConstDef | TemplateDef
354219. AltstepInstance ::= AltstepRef "(" [FunctionActualParList] ")"
355220. AltstepRef ::= [GlobalModuleId Dot] AltstepIdentifier
356
357A.1.6.1.8       Import definitions
358221. ImportDef ::= ImportKeyword ImportFromSpec (AllWithExcepts | ("{" ImportSpec "}"))
359222. ImportKeyword ::= "import"
360223. AllWithExcepts ::= AllKeyword [ExceptsDef]
361224. ExceptsDef ::= ExceptKeyword "{" ExceptSpec "}"
362225. ExceptKeyword ::= "except"
363226. ExceptSpec ::= {ExceptElement [SemiColon]}
364227. ExceptElement ::= ExceptGroupSpec |
365                       ExceptTypeDefSpec |
366                       ExceptTemplateSpec |
367                       ExceptConstSpec |
368                       ExceptTestcaseSpec |
369                       ExceptAltstepSpec |
370                       ExceptFunctionSpec |
371                       ExceptSignatureSpec |
372                       ExceptModuleParSpec
373228. ExceptGroupSpec ::= GroupKeyword (ExceptGroupRefList | AllKeyword)
374229. ExceptTypeDefSpec ::= TypeDefKeyword (TypeRefList | AllKeyword)
375230. ExceptTemplateSpec ::= TemplateKeyword (TemplateRefList | AllKeyword)
376231. ExceptConstSpec ::= ConstKeyword (ConstRefList | AllKeyword)
377232. ExceptTestcaseSpec ::= TestcaseKeyword (TestcaseRefList | AllKeyword)
378233. ExceptAltstepSpec ::= AltstepKeyword (AltstepRefList | AllKeyword)
379234. ExceptFunctionSpec ::= FunctionKeyword (FunctionRefList | AllKeyword)
380235. ExceptSignatureSpec ::= SignatureKeyword (SignatureRefList | AllKeyword)
381236. ExceptModuleParSpec ::= ModuleParKeyword (ModuleParRefList | AllKeyword)
382237. ImportSpec ::= {ImportElement [SemiColon]}
383238. ImportElement ::= ImportGroupSpec |
384                       ImportTypeDefSpec |
385                       ImportTemplateSpec |
386                       ImportConstSpec |
387                       ImportTestcaseSpec |
388                       ImportAltstepSpec |
389                       ImportFunctionSpec |
390                       ImportSignatureSpec |
391                       ImportModuleParSpec |
392                       ImportImportSpec
393239. ImportFromSpec ::= FromKeyword ModuleId [RecursiveKeyword]
394240. RecursiveKeyword ::= "recursive"
395241. ImportGroupSpec ::= GroupKeyword (GroupRefListWithExcept | AllGroupsWithExcept)
396242. GroupRefList ::= FullGroupIdentifier {"," FullGroupIdentifier}
397243. GroupRefListWithExcept ::= FullGroupIdentifierWithExcept {"," FullGroupIdentifierWithExcept}
398244. AllGroupsWithExcept ::= AllKeyword [ExceptKeyword GroupRefList]
399245. FullGroupIdentifier ::= GroupIdentifier {Dot GroupIdentifier}
400246. FullGroupIdentifierWithExcept ::= FullGroupIdentifier [ExceptsDef]
401247. ExceptGroupRefList ::= ExceptFullGroupIdentifier {"," ExceptFullGroupIdentifier}
402248. ExceptFullGroupIdentifier ::= FullGroupIdentifier
403249. ImportTypeDefSpec ::= TypeDefKeyword (TypeRefList | AllTypesWithExcept)
404250. TypeRefList ::= TypeDefIdentifier {"," TypeDefIdentifier}
405251. AllTypesWithExcept ::= AllKeyword [ExceptKeyword TypeRefList]
406252. TypeDefIdentifier ::= StructTypeIdentifier |
407                           EnumTypeIdentifier |
408                           PortTypeIdentifier |
409                           ComponentTypeIdentifier |
410                           SubTypeIdentifier
411253. ImportTemplateSpec ::= TemplateKeyword (TemplateRefList | AllTemplsWithExcept)
412254. TemplateRefList ::= TemplateIdentifier {"," TemplateIdentifier}
413255. AllTemplsWithExcept ::= AllKeyword [ExceptKeyword TemplateRefList]
414256. ImportConstSpec ::= ConstKeyword (ConstRefList | AllConstsWithExcept)
415257. ConstRefList ::= ConstIdentifier {"," ConstIdentifier}
416258. AllConstsWithExcept ::= AllKeyword [ExceptKeyword ConstRefList]
417259. ImportAltstepSpec ::= AltstepKeyword (AltstepRefList | AllAltstepsWithExcept)
418260. AltstepRefList ::= AltstepIdentifier {"," AltstepIdentifier}
419261. AllAltstepsWithExcept ::= AllKeyword [ExceptKeyword AltstepRefList]
420262. ImportTestcaseSpec ::= TestcaseKeyword (TestcaseRefList | AllTestcasesWithExcept)
421263. TestcaseRefList ::= TestcaseIdentifier {"," TestcaseIdentifier}
422264. AllTestcasesWithExcept ::= AllKeyword [ExceptKeyword TestcaseRefList]
423265. ImportFunctionSpec ::= FunctionKeyword (FunctionRefList | AllFunctionsWithExcept)
424266. FunctionRefList ::= FunctionIdentifier {"," FunctionIdentifier}
425267. AllFunctionsWithExcept ::= AllKeyword [ExceptKeyword FunctionRefList]
426268. ImportSignatureSpec ::= SignatureKeyword  (SignatureRefList | AllSignaturesWithExcept)
427269. SignatureRefList ::= SignatureIdentifier {"," SignatureIdentifier}
428270. AllSignaturesWithExcept ::= AllKeyword [ExceptKeyword SignatureRefList]
429271. ImportModuleParSpec ::= ModuleParKeyword  (ModuleParRefList | AllModuleParWithExcept)
430272. ModuleParRefList ::= ModuleParIdentifier {"," ModuleParIdentifier}
431273. AllModuleParWithExcept ::= AllKeyword [ExceptKeyword ModuleParRefList]
432274. ImportImportSpec ::= ImportKeyword AllKeyword
433
434A.1.6.1.9       Group definitions
435275. GroupDef ::= GroupKeyword GroupIdentifier
436                  "{" [ModuleDefinitionsPart] "}"
437276. GroupKeyword ::= "group"
438277. GroupIdentifier ::= Identifier
439
440A.1.6.1.10      External function definitions
441278. ExtFunctionDef ::= ExtKeyword FunctionKeyword ExtFunctionIdentifier
442                        "("[FunctionFormalParList] ")" [ReturnType]
443279. ExtKeyword ::= "external"
444280. ExtFunctionIdentifier ::= Identifier
445
446A.1.6.1.11      External constant definitions
447281. ExtConstDef ::= ExtKeyword ConstKeyword Type ExtConstIdentifierList
448282. ExtConstIdentifierList ::= ExtConstIdentifier { "," ExtConstIdentifier }
449283. ExtConstIdentifier ::= Identifier
450
451A.1.6.1.12      Module parameter definitions
452284. ModuleParDef ::= ModuleParKeyword ( ModulePar | ("{" MultitypedModuleParList "}"))
453285. ModuleParKeyword ::= "modulepar"
454286. MultitypedModuleParList ::= { ModulePar [SemiColon] }
455287. ModulePar ::= ModuleParType ModuleParList
456288. ModuleParType ::= Type
457289. ModuleParList ::= ModuleParIdentifier [AssignmentChar ConstantExpression]
458                      {","ModuleParIdentifier [AssignmentChar ConstantExpression]}
459290. ModuleParIdentifier ::= Identifier
460
461A.1.6.1.13      Friend module definitions
462291. FriendModuleDef ::= "friend" "module" ModuleIdentifier {"," ModuleIdentifier } [SemiColon]
463
464A.1.6.2 Control part
465A.1.6.2.0       General
466292. ModuleControlPart ::= ControlKeyword
467                           "{" ModuleControlBody "}"
468                           [WithStatement] [SemiColon]
469293. ControlKeyword ::= "control"
470294. ModuleControlBody ::= [ControlStatementOrDefList]
471295. ControlStatementOrDefList ::= {ControlStatementOrDef [SemiColon]}+
472296. ControlStatementOrDef ::= FunctionLocalDef |
473                               FunctionLocalInst |
474                               ControlStatement
475297. ControlStatement ::= TimerStatements |
476                          BasicStatements |
477                          BehaviourStatements |
478                          SUTStatements |
479                          StopKeyword
480
481A.1.6.2.1       Variable instantiation
482298. VarInstance ::= VarKeyword ((Type VarList)
483                      | (( TemplateKeyword | RestrictedTemplate ) Type TempVarList))
484299. VarList ::= SingleVarInstance {"," SingleVarInstance}
485300. SingleVarInstance ::= VarIdentifier [ArrayDef] [AssignmentChar VarInitialValue]
486301. VarInitialValue ::= Expression
487302. VarKeyword ::= "var"
488303. VarIdentifier ::= Identifier
489304. TempVarList ::= SingleTempVarInstance {"," SingleTempVarInstance}
490305. SingleTempVarInstance ::= VarIdentifier [ArrayDef] [AssignmentChar TempVarInitialValue]
491306. TempVarInitialValue ::= TemplateBody
492307. VariableRef ::= ( VarIdentifier | ValueParIdentifier | TemplateParIdentifier )
493                     [ ExtendedFieldReference ]
494
495A.1.6.2.2       Timer instantiation
496308. TimerInstance ::= TimerKeyword TimerList
497309. TimerList ::= SingleTimerInstance{"," SingleTimerInstance}
498310. SingleTimerInstance ::= TimerIdentifier [ArrayDef] [AssignmentChar TimerValue]
499311. TimerKeyword ::= "timer"
500312. TimerIdentifier ::= Identifier
501313. TimerValue ::= Expression
502314. TimerRef ::= (TimerIdentifier | TimerParIdentifier) {ArrayOrBitRef}
503
504A.1.6.2.3       Component operations
505315. ConfigurationStatements ::= ConnectStatement |
506                                 MapStatement |
507                                 DisconnectStatement |
508                                 UnmapStatement |
509                                 DoneStatement |
510                                 KilledStatement |
511                                 StartTCStatement |
512                                 StopTCStatement |
513                                 KillTCStatement
514316. ConfigurationOps ::= CreateOp | SelfOp | SystemOp | MTCOp | RunningOp | AliveOp
515317. CreateOp ::= ComponentType Dot CreateKeyword ["(" SingleExpression ")"] [AliveKeyword]
516318. SystemOp ::= SystemKeyword
517319. SelfOp ::= "self"
518320. MTCOp ::= MTCKeyword
519321. DoneStatement ::= ComponentId Dot DoneKeyword
520322. KilledStatement ::= ComponentId Dot KilledKeyword
521323. ComponentId ::= ComponentOrDefaultReference | (AnyKeyword | AllKeyword) ComponentKeyword
522324. DoneKeyword ::= "done"
523325. KilledKeyword ::= "killed"
524326. RunningOp ::= ComponentId Dot RunningKeyword
525327. RunningKeyword ::= "running"
526328. AliveOp ::= ComponentId Dot AliveKeyword
527329. CreateKeyword ::= "create"
528330. AliveKeyword ::= "alive"
529331. ConnectStatement ::= ConnectKeyword SingleConnectionSpec
530332. ConnectKeyword ::= "connect"
531333. SingleConnectionSpec ::= "(" PortRef "," PortRef ")"
532334. PortRef ::= ComponentRef Colon Port
533335. ComponentRef ::= ComponentOrDefaultReference | SystemOp | SelfOp | MTCOp
534336. ComponentRefAssignment ::= ValueParIdentifier ":=" ComponentRef
535337. DisconnectStatement ::= DisconnectKeyword [SingleOrMultiConnectionSpec]
536338. SingleOrMultiConnectionSpec ::= SingleConnectionSpec |
537                                     AllConnectionsSpec |
538                                     AllPortsSpec |
539                                     AllCompsAllPortsSpec
540339. AllConnectionsSpec ::= "(" PortRef ")"
541340. AllPortsSpec ::= "(" ComponentRef ":" AllKeyword PortKeyword ")"
542341. AllCompsAllPortsSpec ::= "(" AllKeyword ComponentKeyword ":" AllKeyword PortKeyword ")"
543342. DisconnectKeyword ::= "disconnect"
544343. MapStatement ::= MapKeyword SingleConnectionSpec
545344. MapKeyword ::= "map"
546345. UnmapStatement ::= UnmapKeyword [SingleOrMultiConnectionSpec]
547346. UnmapKeyword ::= "unmap"
548347. StartTCStatement ::= ComponentOrDefaultReference Dot StartKeyword "(" FunctionInstance ")"
549348. StartKeyword ::= "start"
550349. StopTCStatement ::= StopKeyword | (ComponentReferenceOrLiteral Dot StopKeyword) |
551                         (AllKeyword ComponentKeyword Dot StopKeyword)
552350. ComponentReferenceOrLiteral ::= ComponentOrDefaultReference | MTCOp | SelfOp
553351. KillTCStatement ::= KillKeyword | (ComponentReferenceOrLiteral Dot KillKeyword) |
554                         (AllKeyword ComponentKeyword Dot KillKeyword)
555352. ComponentOrDefaultReference ::= VariableRef | FunctionInstance
556353. KillKeyword ::= "kill"
557
558A.1.6.2.4       Port operations
559354. Port ::= (PortIdentifier | PortParIdentifier) {ArrayOrBitRef}
560355. CommunicationStatements ::= SendStatement |
561                                 CallStatement |
562                                 ReplyStatement |
563                                 RaiseStatement |
564                                 ReceiveStatement |
565                                 TriggerStatement |
566                                 GetCallStatement |
567                                 GetReplyStatement |
568                                 CatchStatement |
569                                 CheckStatement |
570                                 ClearStatement |
571                                 StartStatement |
572                                 StopStatement |
573                                 HaltStatement
574356. SendStatement ::= Port Dot PortSendOp
575357. PortSendOp ::= SendOpKeyword "(" SendParameter ")" [ToClause]
576358. SendOpKeyword ::= "send"
577359. SendParameter ::= TemplateInstance
578360. ToClause ::= ToKeyword ( AddressRef |
579                  AddressRefList |
580                  AllKeyword ComponentKeyword )
581361. AddressRefList ::= "(" AddressRef {"," AddressRef} ")"
582362. ToKeyword ::= "to"
583363. AddressRef ::= TemplateInstance
584364. CallStatement ::= Port Dot PortCallOp  [PortCallBody]
585365. PortCallOp ::= CallOpKeyword "(" CallParameters ")" [ToClause]
586366. CallOpKeyword ::= "call"
587367. CallParameters ::= TemplateInstance ["," CallTimerValue]
588368. CallTimerValue ::= TimerValue | NowaitKeyword
589369. NowaitKeyword ::= "nowait"
590370. PortCallBody ::= "{" CallBodyStatementList "}"
591371. CallBodyStatementList ::= {CallBodyStatement [SemiColon]}+
592372. CallBodyStatement ::= CallBodyGuard StatementBlock
593373. CallBodyGuard ::= AltGuardChar CallBodyOps
594374. CallBodyOps ::= GetReplyStatement | CatchStatement
595375. ReplyStatement ::= Port Dot PortReplyOp
596376. PortReplyOp ::= ReplyKeyword "(" TemplateInstance [ReplyValue]")" [ToClause]
597377. ReplyKeyword ::= "reply"
598378. ReplyValue ::= ValueKeyword Expression
599379. RaiseStatement ::= Port Dot PortRaiseOp
600380. PortRaiseOp ::= RaiseKeyword "(" Signature "," TemplateInstance ")" [ToClause]
601381. RaiseKeyword ::= "raise"
602382. ReceiveStatement ::= PortOrAny Dot PortReceiveOp
603383. PortOrAny ::= Port | AnyKeyword PortKeyword
604384. PortReceiveOp ::= ReceiveOpKeyword ["(" ReceiveParameter ")"] [FromClause] [PortRedirect]
605385. ReceiveOpKeyword ::= "receive"
606386. ReceiveParameter ::= TemplateInstance
607387. FromClause ::= FromKeyword ( AddressRef |
608                    AddressRefList |
609                    AnyKeyword ComponentKeyword )
610388. FromKeyword ::= "from"
611389. PortRedirect ::= PortRedirectSymbol (ValueSpec [SenderSpec] | SenderSpec)
612390. PortRedirectSymbol ::= "->"
613391. ValueSpec ::= ValueKeyword ( VariableRef |
614                                 ( "(" SingleValueSpec { "," SingleValueSpec } ")" ) )
615392. SingleValueSpec ::= VariableRef [ AssignmentChar FieldReference ExtendedFieldReference ]
616/*STATIC SEMANTICS – FieldReference shall not be ParRef and ExtendedFieldReference shall not be
617                     TypeDefIdentifier*/
618393. ValueKeyword ::= "value"
619394. SenderSpec ::= SenderKeyword VariableRef
620395. SenderKeyword ::= "sender"
621396. TriggerStatement ::= PortOrAny Dot PortTriggerOp
622397. PortTriggerOp ::= TriggerOpKeyword ["(" ReceiveParameter ")"] [FromClause] [PortRedirect]
623398. TriggerOpKeyword ::= "trigger"
624399. GetCallStatement ::= PortOrAny  Dot PortGetCallOp
625400. PortGetCallOp ::= GetCallOpKeyword ["(" ReceiveParameter ")"] [FromClause]
626                       [PortRedirectWithParam]
627401. GetCallOpKeyword ::= "getcall"
628402. PortRedirectWithParam ::= PortRedirectSymbol RedirectWithParamSpec
629403. RedirectWithParamSpec ::= ParamSpec [SenderSpec] |
630                              SenderSpec
631404. ParamSpec ::= ParamKeyword ParamAssignmentList
632405. ParamKeyword ::= "param"
633406. ParamAssignmentList ::= "(" (AssignmentList | VariableList) ")"
634407. AssignmentList ::= VariableAssignment {"," VariableAssignment}
635408. VariableAssignment ::= VariableRef AssignmentChar ParameterIdentifier
636409. ParameterIdentifier ::= ValueParIdentifier
637410. VariableList ::= VariableEntry  {"," VariableEntry}
638411. VariableEntry ::= VariableRef | NotUsedSymbol
639412. GetReplyStatement ::= PortOrAny Dot PortGetReplyOp
640413. PortGetReplyOp ::= GetReplyOpKeyword ["(" ReceiveParameter [ValueMatchSpec] ")"]
641                        [FromClause] [PortRedirectWithValueAndParam]
642414. PortRedirectWithValueAndParam ::= PortRedirectSymbol RedirectWithValueAndParamSpec
643415. RedirectWithValueAndParamSpec ::= ValueSpec [ParamSpec] [SenderSpec] |
644                                       RedirectWithParamSpec
645416. GetReplyOpKeyword ::= "getreply"
646417. ValueMatchSpec ::= ValueKeyword TemplateInstance
647418. CheckStatement ::= PortOrAny Dot PortCheckOp
648419. PortCheckOp ::= CheckOpKeyword ["(" CheckParameter ")"]
649420. CheckOpKeyword ::= "check"
650421. CheckParameter ::= CheckPortOpsPresent | FromClausePresent | RedirectPresent
651422. FromClausePresent ::= FromClause [PortRedirectSymbol SenderSpec]
652423. RedirectPresent ::= PortRedirectSymbol SenderSpec
653424. CheckPortOpsPresent ::= PortReceiveOp | PortGetCallOp | PortGetReplyOp | PortCatchOp
654425. CatchStatement ::= PortOrAny Dot PortCatchOp
655426. PortCatchOp ::= CatchOpKeyword ["("CatchOpParameter ")"] [FromClause] [PortRedirect]
656427. CatchOpKeyword ::= "catch"
657428. CatchOpParameter ::= Signature "," TemplateInstance | TimeoutKeyword
658429. ClearStatement ::= PortOrAll Dot PortClearOp
659430. PortOrAll ::= Port | AllKeyword PortKeyword
660431. PortClearOp ::= ClearOpKeyword
661432. ClearOpKeyword ::= "clear"
662433. StartStatement ::= PortOrAll Dot PortStartOp
663434. PortStartOp ::= StartKeyword
664435. StopStatement ::= PortOrAll Dot PortStopOp
665436. PortStopOp ::= StopKeyword
666437. StopKeyword ::= "stop"
667438. HaltStatement ::= PortOrAll Dot PortHaltOp
668439. PortHaltOp ::= HaltKeyword
669440. HaltKeyword ::= "halt"
670441. AnyKeyword ::= "any"
671
672A.1.6.2.5       Timer operations
673442. TimerStatements ::= StartTimerStatement | StopTimerStatement | TimeoutStatement
674443. TimerOps ::= ReadTimerOp | RunningTimerOp
675444. StartTimerStatement ::= TimerRef Dot StartKeyword ["(" TimerValue ")"]
676445. StopTimerStatement ::= TimerRefOrAll Dot StopKeyword
677446. TimerRefOrAll ::= TimerRef | AllKeyword TimerKeyword
678447. ReadTimerOp ::= TimerRef Dot ReadKeyword
679448. ReadKeyword ::= "read"
680449. RunningTimerOp ::= TimerRefOrAny Dot RunningKeyword
681450. TimeoutStatement ::= TimerRefOrAny Dot TimeoutKeyword
682451. TimerRefOrAny ::= TimerRef | ( AnyKeyword TimerKeyword )
683452. TimeoutKeyword ::= "timeout"
684
685A.1.6.3 Type
686453. Type ::= PredefinedType | ReferencedType
687454. PredefinedType ::= BitStringKeyword |
688                        BooleanKeyword |
689                        CharStringKeyword |
690                        UniversalCharString |
691                        IntegerKeyword |
692                        OctetStringKeyword |
693                        HexStringKeyword |
694                        VerdictTypeKeyword |
695                        FloatKeyword |
696                        AddressKeyword |
697                        DefaultKeyword |
698                        AnyTypeKeyword
699455. BitStringKeyword ::= "bitstring"
700456. BooleanKeyword ::= "boolean"
701457. IntegerKeyword ::= "integer"
702458. OctetStringKeyword ::= "octetstring"
703459. HexStringKeyword ::= "hexstring"
704460. VerdictTypeKeyword ::= "verdicttype"
705461. FloatKeyword ::= "float"
706462. AddressKeyword ::= "address"
707463. DefaultKeyword ::= "default"
708464. AnyTypeKeyword ::= "anytype"
709465. CharStringKeyword ::= "charstring"
710466. UniversalCharString ::= UniversalKeyword CharStringKeyword
711467. UniversalKeyword ::= "universal"
712468. ReferencedType ::= [GlobalModuleId Dot] TypeReference [ExtendedFieldReference]
713469. TypeReference ::= StructTypeIdentifier |
714                       EnumTypeIdentifier |
715                       SubTypeIdentifier |
716                       ComponentTypeIdentifier
717470. ArrayDef ::= {"[" ArrayBounds [".." ArrayBounds] "]"}+
718471. ArrayBounds ::= SingleConstExpression
719/* STATIC SEMANTICS - ArrayBounds will resolve to a non negative value of integer type */
720
721A.1.6.4 Value
722472. Value ::= PredefinedValue | ReferencedValue
723473. PredefinedValue ::= BitStringValue |
724                         BooleanValue |
725                         CharStringValue |
726                         IntegerValue |
727                         OctetStringValue |
728                         HexStringValue |
729                         VerdictTypeValue |
730                         EnumeratedValue |
731                         FloatValue |
732                         AddressValue |
733                         OmitValue
734474. BitStringValue ::= Bstring
735475. BooleanValue ::= "true" | "false"
736476. IntegerValue ::= Number
737477. OctetStringValue ::= Ostring
738478. HexStringValue ::= Hstring
739479. VerdictTypeValue ::= "pass" | "fail" | "inconc" | "none" | "error"
740480. EnumeratedValue ::= EnumerationIdentifier
741481. CharStringValue ::= Cstring | Quadruple
742482. Quadruple ::= CharKeyword "(" Group "," Plane "," Row "," Cell ")"
743483. CharKeyword ::= "char"
744484. Group ::= Number
745485. Plane ::= Number
746486. Row ::= Number
747487. Cell ::= Number
748488. FloatValue ::= FloatDotNotation | FloatENotation | NaNKeyword
749489. NaNKeyword ::= "not_a_number"
750490. FloatDotNotation ::= Number Dot DecimalNumber
751491. FloatENotation ::= Number [Dot DecimalNumber] Exponential [Minus] Number
752492. Exponential ::= "E"
753493. ReferencedValue ::= ValueReference [ExtendedFieldReference]
754494. ValueReference ::= [GlobalModuleId Dot] (ConstIdentifier | ExtConstIdentifier |
755                        ModuleParIdentifier ) |
756                        ValueParIdentifier |
757                        VarIdentifier
758495. Number ::= (NonZeroNum {Num}) | "0"
759496. NonZeroNum ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
760497. DecimalNumber ::= {Num}+
761498. Num ::= "0" | NonZeroNum
762499. Bstring ::= "'" {Bin} "'" "B"
763500. Bin ::= "0" | "1"
764501. Hstring ::= "'" {Hex} "'" "H"
765502. Hex ::= Num | "A" | "B" | "C" | "D" | "E" | "F"| "a" | "b" | "c" | "d" | "e" | "f"
766503. Ostring ::= "'" {Oct} "'" "O"
767504. Oct ::= Hex Hex
768505. Cstring ::= """ {Char} """
769506. 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 */
770507. Identifier ::= Alpha{AlphaNum | Underscore}
771508. Alpha ::= UpperAlpha | LowerAlpha
772509. AlphaNum ::= Alpha | Num
773510. 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"
774511. 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"
775512. 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) */
776513. FreeText ::= """ {ExtendedAlphaNum} """
777514. AddressValue ::= "null"
778515. OmitValue ::= OmitKeyword
779516. OmitKeyword ::= "omit"
780
781A.1.6.5 Parameterization
782517. InParKeyword ::= "in"
783518. OutParKeyword ::= "out"
784519. InOutParKeyword ::= "inout"
785520. FormalValuePar ::= [(InParKeyword | InOutParKeyword | OutParKeyword)]
786                        Type ValueParIdentifier [ ":=" ( Expression | Dash ) ]
787521. ValueParIdentifier ::= Identifier
788522. FormalPortPar ::= [InOutParKeyword] PortTypeIdentifier PortParIdentifier
789523. PortParIdentifier ::= Identifier
790524. FormalTimerPar ::= [InOutParKeyword] TimerKeyword TimerParIdentifier
791525. TimerParIdentifier ::= Identifier
792526. FormalTemplatePar ::= [( InParKeyword | OutParKeyword | InOutParKeyword )]
793                           ( TemplateKeyword | RestrictedTemplate )
794                           Type TemplateParIdentifier [ ":=" ( TemplateInstance | Dash ) ]
795527. TemplateParIdentifier ::= Identifier
796528. RestrictedTemplate ::= OmitKeyword | ( TemplateKeyword TemplateRestriction )
797529. TemplateRestriction ::= "(" ( OmitKeyword | ValueKeyword | PresentKeyword ) ")"
798
799A.1.6.6 With statement
800530. WithStatement ::= WithKeyword WithAttribList
801531. WithKeyword ::= "with"
802532. WithAttribList ::= "{" MultiWithAttrib "}"
803533. MultiWithAttrib ::= {SingleWithAttrib [SemiColon]}
804534. SingleWithAttrib ::= AttribKeyword  [OverrideKeyword] [AttribQualifier] AttribSpec
805535. AttribKeyword ::= EncodeKeyword |
806                       VariantKeyword |
807                       DisplayKeyword |
808                       ExtensionKeyword |
809                       OptionalKeyword
810536. EncodeKeyword ::= "encode"
811537. VariantKeyword ::= "variant"
812538. DisplayKeyword ::= "display"
813539. ExtensionKeyword ::= "extension"
814540. OverrideKeyword ::= "override"
815541. AttribQualifier ::= "(" DefOrFieldRefList ")"
816542. DefOrFieldRefList ::= DefOrFieldRef {"," DefOrFieldRef}
817543. DefOrFieldRef ::= DefinitionRef |
818                       ( FieldReference [ ExtendedFieldReference ] ) |
819                       ( "[" NotUsedSymbol | SingleExpression "]" ) |
820                       AllRef
821544. DefinitionRef ::= StructTypeIdentifier |
822                       EnumTypeIdentifier |
823                       PortTypeIdentifier |
824                       ComponentTypeIdentifier |
825                       SubTypeIdentifier |
826                       ConstIdentifier |
827                       TemplateIdentifier |
828                       AltstepIdentifier |
829                       TestcaseIdentifier |
830                       FunctionIdentifier |
831                       SignatureIdentifier |
832                       VarIdentifier |
833                       TimerIdentifier |
834                       PortIdentifier |
835                       ModuleParIdentifier |
836                       FullGroupIdentifier
837545. AllRef ::= ( GroupKeyword AllKeyword [ExceptKeyword "{" GroupRefList "}"]) |
838                ( TypeDefKeyword AllKeyword [ExceptKeyword "{" TypeRefList "}"]) |
839                ( TemplateKeyword AllKeyword [ExceptKeyword "{" TemplateRefList "}"]) |
840                ( ConstKeyword AllKeyword [ExceptKeyword "{" ConstRefList "}"]) |
841                ( AltstepKeyword AllKeyword [ExceptKeyword "{" AltstepRefList "}"]) |
842                ( TestcaseKeyword AllKeyword [ExceptKeyword "{" TestcaseRefList "}"]) |
843                ( FunctionKeyword AllKeyword [ExceptKeyword "{" FunctionRefList "}"]) |
844                ( SignatureKeyword AllKeyword [ExceptKeyword "{" SignatureRefList "}"]) |
845                ( ModuleParKeyword AllKeyword [ExceptKeyword "{" ModuleParRefList "}"])
846546. AttribSpec ::= FreeText
847
848A.1.6.7 Behaviour statements
849547. BehaviourStatements ::= TestcaseInstance |
850                             FunctionInstance |
851                             ReturnStatement |
852                             AltConstruct |
853                             InterleavedConstruct |
854                             LabelStatement |
855                             GotoStatement |
856                             RepeatStatement |
857                             DeactivateStatement |
858                             AltstepInstance |
859                             ActivateOp |
860                             BreakStatement |
861                             ContinueStatement
862548. VerdictStatements ::= SetLocalVerdict
863549. VerdictOps ::= GetLocalVerdict
864550. SetLocalVerdict ::= SetVerdictKeyword "(" SingleExpression { "," LogItem } ")"
865551. SetVerdictKeyword ::= "setverdict"
866552. GetLocalVerdict ::= "getverdict"
867553. SUTStatements ::= ActionKeyword "(" ActionText {StringOp ActionText} ")"
868554. ActionKeyword ::= "action"
869555. ActionText ::= FreeText | Expression
870556. ReturnStatement ::= ReturnKeyword [Expression | InLineTemplate]
871/* 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. */
872557. AltConstruct ::= AltKeyword "{" AltGuardList "}"
873558. AltKeyword ::= "alt"
874559. AltGuardList ::= {GuardStatement | ElseStatement [SemiColon]}
875560. GuardStatement ::= AltGuardChar (AltstepInstance [StatementBlock] | GuardOp StatementBlock)
876561. ElseStatement ::= "["ElseKeyword "]" StatementBlock
877562. AltGuardChar ::= "[" [BooleanExpression] "]"
878563. GuardOp ::= TimeoutStatement |
879                 ReceiveStatement |
880                 TriggerStatement |
881                 GetCallStatement |
882                 CatchStatement |
883                 CheckStatement |
884                 GetReplyStatement |
885                 DoneStatement |
886                 KilledStatement
887564. InterleavedConstruct ::= InterleavedKeyword "{" InterleavedGuardList "}"
888565. InterleavedKeyword ::= "interleave"
889566. InterleavedGuardList ::= {InterleavedGuardElement [SemiColon]}+
890567. InterleavedGuardElement ::= InterleavedGuard InterleavedAction
891568. InterleavedGuard ::= "[" "]" GuardOp
892569. InterleavedAction ::= StatementBlock
893570. LabelStatement ::= LabelKeyword LabelIdentifier
894571. LabelKeyword ::= "label"
895572. LabelIdentifier ::= Identifier
896573. GotoStatement ::= GotoKeyword LabelIdentifier
897574. GotoKeyword ::= "goto"
898575. RepeatStatement ::= "repeat"
899576. ActivateOp ::= ActivateKeyword "(" AltstepInstance ")"
900577. ActivateKeyword ::= "activate"
901578. DeactivateStatement ::= DeactivateKeyword ["(" ComponentOrDefaultReference ")"]
902579. DeactivateKeyword ::= "deactivate"
903580. BreakStatement ::= "break"
904581. ContinueStatement ::= "continue"
905
906A.1.6.8 Basic statements
907582. BasicStatements ::= Assignment | LogStatement | LoopConstruct | ConditionalConstruct |
908                         SelectCaseConstruct | StatementBlock
909583. Expression ::= SingleExpression | CompoundExpression
910584. CompoundExpression ::= FieldExpressionList | ArrayExpression
911/* STATIC SEMANTICS - Within CompoundExpression the ArrayExpression can be used for Arrays, record, record of and set of types. */
912585. FieldExpressionList ::= "{" FieldExpressionSpec {"," FieldExpressionSpec} "}"
913586. FieldExpressionSpec ::= FieldReference AssignmentChar NotUsedOrExpression
914587. ArrayExpression ::= "{" [ArrayElementExpressionList] "}"
915588. ArrayElementExpressionList ::= NotUsedOrExpression  {"," NotUsedOrExpression}
916589. NotUsedOrExpression ::= Expression | NotUsedSymbol
917590. ConstantExpression ::= SingleConstExpression | CompoundConstExpression
918591. SingleConstExpression ::= SingleExpression
919592. BooleanExpression ::= SingleExpression
920/* STATIC SEMANTICS - BooleanExpression shall resolve to a Value of type Boolean */
921593. CompoundConstExpression ::= FieldConstExpressionList | ArrayConstExpression
922/* STATIC SEMANTICS - Within CompoundConstExpression the ArrayConstExpression can be used for arrays, record, record of and set of types. */
923594. FieldConstExpressionList ::= "{" FieldConstExpressionSpec {"," FieldConstExpressionSpec} "}"
924595. FieldConstExpressionSpec ::= FieldReference AssignmentChar ConstantExpression
925596. ArrayConstExpression ::= "{" [ArrayElementConstExpressionList] "}"
926597. ArrayElementConstExpressionList ::= ConstantExpression {"," ConstantExpression}
927598. Assignment ::= VariableRef AssignmentChar (Expression | TemplateBody)
928/* 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. */
929599. SingleExpression ::= XorExpression { "or" XorExpression }
930/* STATIC SEMANTICS - If more than one XorExpression exists, then the XorExpressions shall evaluate to specific values of compatible types */
931600. XorExpression ::= AndExpression { "xor" AndExpression }
932/* STATIC SEMANTICS - If more than one AndExpression exists, then the AndExpressions shall evaluate to specific values of compatible types */
933601. AndExpression ::= NotExpression { "and" NotExpression }
934/* STATIC SEMANTICS - If more than one NotExpression exists, then the NotExpressions shall evaluate to specific values of compatible types */
935602. NotExpression ::= [ "not" ] EqualExpression
936/* STATIC SEMANTICS - Operands of the not operator shall be of type boolean or derivatives of type Boolean. */
937603. EqualExpression ::= RelExpression { EqualOp RelExpression }
938/* STATIC SEMANTICS - If more than one RelExpression exists, then the RelExpressions shall evaluate to specific values of compatible types */
939604. RelExpression ::= ShiftExpression [ RelOp ShiftExpression ]
940/* STATIC SEMANTICS - If both ShiftExpressions exist, then each ShiftExpression shall evaluate to a specific integer, Enumerated or float Value or derivatives of these types */
941605. ShiftExpression ::= BitOrExpression { ShiftOp BitOrExpression }
942/* 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 */
943606. BitOrExpression ::= BitXorExpression { "or4b" BitXorExpression }
944/* STATIC SEMANTICS - If more than one BitXorExpression exists, then the BitXorExpressions shall evaluate to specific values of compatible types */
945607. BitXorExpression ::= BitAndExpression { "xor4b" BitAndExpression }
946/* STATIC SEMANTICS - If more than one BitAndExpression exists, then the BitAndExpressions shall evaluate to specific values of compatible types */
947608. BitAndExpression ::= BitNotExpression { "and4b" BitNotExpression }
948/* STATIC SEMANTICS - If more than one BitNotExpression exists, then the BitNotExpressions shall evaluate to specific values of compatible types */
949609. BitNotExpression ::= [ "not4b" ] AddExpression
950/* STATIC SEMANTICS - If the not4b operator exists, the operand shall be of type bitstring, octetstring or hexstring or derivatives of these types. */
951610. AddExpression ::= MulExpression { AddOp MulExpression }
952/* 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.*/
953611. MulExpression ::= UnaryExpression { MultiplyOp UnaryExpression }
954/* 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. */
955612. UnaryExpression ::= [ UnaryOp ] Primary
956/* STATIC SEMANTICS - Primary shall resolve to a specific Value of type integer or float or derivatives of these types.*/
957613. Primary ::= OpCall | Value | "(" SingleExpression ")"
958614. ExtendedFieldReference ::= { ( Dot ( StructFieldIdentifier | TypeDefIdentifier ) )
959                                  | ArrayOrBitRef
960                                  | ( "[" NotUsedSymbol "]" ) }+
961/* STATIC SEMANTIC - The TypeDefIdentifier shall be used only if the type of the VarInstance or ReferencedValue in which the ExtendedFieldReference is used is anytype.
962ArrayOrBitRef shall be used when referencing elements of values or arrays.
963The square brackets with dash shall be used when referencing inner types of a record of or set of type. */
964615. OpCall ::= ConfigurationOps |
965                VerdictOps |
966                TimerOps |
967                TestcaseInstance |
968                ( FunctionInstance [ ExtendedFieldReference ] ) |
969                ( TemplateOps [ ExtendedFieldReference ] ) |
970                ActivateOp
971616. AddOp ::= "+" | "-" | StringOp
972/* STATIC SEMANTICS - Operands of the "+" or "-" operators shall be of type integer or float or derivations of integer or float (i.e. subrange) */
973617. MultiplyOp ::= "*" | "/" | "mod" | "rem"
974/* 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) */
975618. UnaryOp ::= "+" | "-"
976/* STATIC SEMANTICS - Operands of the "+" or "-" operators shall be of type integer or float or derivations of integer or float (i.e. subrange) */
977619. RelOp ::= "<" | ">" | ">=" | "<="
978/* STATIC SEMANTICS - the precedence of the operators is defined in Table 6 */
979620. EqualOp ::= "==" | "!=" 
980621. StringOp ::= "&"
981/* 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 */
982622. ShiftOp ::= "<<" | ">>" | "<@" | "@>"
983623. LogStatement ::= LogKeyword "(" LogItem { "," LogItem } ")"
984624. LogKeyword ::= "log"
985625. LogItem ::= FreeText | TemplateInstance
986626. LoopConstruct ::= ForStatement |
987                       WhileStatement |
988                       DoWhileStatement
989627. ForStatement ::= ForKeyword "(" Initial SemiColon Final SemiColon Step ")"
990                      StatementBlock
991628. ForKeyword ::= "for"
992629. Initial ::= VarInstance | Assignment
993630. Final ::= BooleanExpression
994631. Step ::= Assignment
995632. WhileStatement ::= WhileKeyword "(" BooleanExpression ")"
996                        StatementBlock
997633. WhileKeyword ::= "while"
998634. DoWhileStatement ::= DoKeyword StatementBlock
999                          WhileKeyword "(" BooleanExpression ")"
1000635. DoKeyword ::= "do"
1001636. ConditionalConstruct ::= IfKeyword "(" BooleanExpression ")"
1002                              StatementBlock
1003                              {ElseIfClause}[ElseClause]
1004637. IfKeyword ::= "if"
1005638. ElseIfClause ::= ElseKeyword IfKeyword "(" BooleanExpression ")"  StatementBlock
1006639. ElseKeyword ::= "else"
1007640. ElseClause ::= ElseKeyword StatementBlock
1008641. SelectCaseConstruct ::= SelectKeyword "(" SingleExpression ")" SelectCaseBody
1009642. SelectKeyword ::= "select"
1010643. SelectCaseBody ::= "{" { SelectCase }+ "}"
1011644. SelectCase ::= CaseKeyword ( "(" TemplateInstance {"," TemplateInstance } ")" | ElseKeyword )
1012                    StatementBlock
1013645. CaseKeyword ::= "case"
1014
1015A.1.6.9 Miscellaneous productions
1016646. Dot ::= "."
1017647. Dash ::= "-"
1018648. Minus ::= Dash
1019649. SemiColon ::= ";"
1020650. Colon ::= ":"
1021651. Underscore ::= "_"
1022652. AssignmentChar ::= ":="
Note: See TracBrowser for help on using the repository browser.