TTCN-3 BNF v4.13.1

1.TTCN3Module ::= TTCN3ModuleKeyword ModuleId "{" [ModuleDefinitionsList]  

                    "}" [WithStatement] [SemiColon]

2.TTCN3ModuleKeyword ::= "module"

3.ModuleId ::= Identifier [LanguageSpec]

4.LanguageSpec ::= LanguageKeyword FreeText {"," FreeText}

5.LanguageKeyword ::= "language"

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

7.ModuleDefinition ::= (([Visibility] (TypeDef |

                                        ConstDef |

                                        TemplateDef |

                                        ModuleParDef |

                                        FunctionDef |

                                        SignatureDef |

                                        TestcaseDef |

                                        AltstepDef |

                                        ImportDef |

                                        ExtFunctionDef |

                                     ModuleControlDef

                                       )) |

                         (["public"] GroupDef) |

                         (["private"] FriendModuleDef)

                        ) [WithStatement]

8.Visibility ::= "public" |

                  "friend" |

                  "private"

9.TypeDef ::= TypeDefKeyword TypeDefBody

10.TypeDefBody ::= StructuredTypeDef | SubTypeDef

11.TypeDefKeyword ::= "type"

12.StructuredTypeDef ::= RecordDef |

                          UnionDef |

                          SetDef |

                          RecordOfDef |

                          SetOfDef |

                          EnumDef |

                          PortDef |

                          ComponentDef |

                          MapDef

13.MapDef ::= MapKeyword FromKeyword Type ToKeyword (Type | NestedTypeDef | MapDef)

14.RecordDef ::= RecordKeyword StructDefBody

15.RecordKeyword ::= "record"

16.StructDefBody ::= IdentifierOrAddr "{" [StructFieldDef  

                                                         {"," StructFieldDef}]  

                      "}"

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

                       [OptionalKeyword]

18.NestedTypeDef ::= NestedRecordDef |

                      NestedUnionDef |

                      NestedSetDef |

                      NestedRecordOfDef |

                      NestedSetOfDef |

                      NestedEnumDef

19.NestedRecordDef ::= RecordKeyword "{" [StructFieldDef {"," StructFieldDef}]  

                        "}"

20.NestedUnionDef ::= UnionKeyword "{" UnionFieldDef {"," UnionFieldDef}  

                       "}"

21.NestedSetDef ::= SetKeyword "{" [StructFieldDef {"," StructFieldDef}]  

                     "}"

22.NestedRecordOfDef ::= RecordKeyword [StringLength] OfKeyword (Type |

                                                                  NestedTypeDef)

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

24.NestedEnumDef ::= EnumKeyword "{" EnumerationList "}"

25.OptionalKeyword ::= "optional"

26.UnionDef ::= UnionKeyword UnionDefBody

27.UnionKeyword ::= "union"

28.UnionDefBody ::= IdentifierOrAddr "{" UnionFieldDef {","  

                                                                      UnionFieldDef}  

                     "}"

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

/** STATIC SEMANTICS: at most one UnionFieldDef of UnionDefBody or NestedUnionDef shall contain a DefaultModifier */

30.SetDef ::= SetKeyword StructDefBody

31.SetKeyword ::= "set"

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

33.OfKeyword ::= "of"

34.StructOfDefBody ::= (Type | NestedTypeDef) IdentifierOrAddr  

                        [SubTypeSpec]

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

36.EnumDef ::= EnumKeyword IdentifierOrAddr "{" EnumerationList  

                "}"

37.EnumKeyword ::= "enumerated"

38.EnumerationList ::= Enumeration {"," Enumeration}

39.Enumeration ::= Identifier ["(" IntegerValueOrRange {"," IntegerValueOrRange } ")"]

40.IntegerValueOrRange ::= IntegerValue [".." IntegerValue]

41.IntegerValue ::= [Minus] Number

42.SubTypeDef ::= Type IdentifierOrAddr [ArrayDef] [SubTypeSpec]

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

 

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

44.AllowedValuesSpec ::= "(" ((TemplateOrRange {"," TemplateOrRange}) |

                               CharStringMatch) ")"

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

46.RangeDef ::= Bound ".." Bound

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

48.LengthKeyword ::= "length"

49.PortDef ::= PortKeyword PortDefBody

50.PortDefBody ::= Identifier PortDefAttribs

51.PortKeyword ::= "port"

52.PortDefAttribs ::= MessageAttribs |

                       ProcedureAttribs |

                       MixedAttribs

53.MessageAttribs ::= MessageKeyword "{" {(AddressDecl |

                                            MessageList |

                                            ConfigParamDef

                                           ) [SemiColon]}+ "}"

54.ConfigParamDef ::= MapParamDef | UnmapParamDef

55.MapParamDef ::= MapKeyword ParamKeyword "(" FormalValuePar {"," FormalValuePar}  

                    ")"

56.UnmapParamDef ::= UnmapKeyword ParamKeyword "(" FormalValuePar {","  

                                                                    FormalValuePar}  

                      ")"

57.AddressDecl ::= AddressKeyword Type

58.MessageList ::= Direction AllOrTypeList

59.Direction ::= InParKeyword |

                  OutParKeyword |

                  InOutParKeyword

60.MessageKeyword ::= "message"

61.AllOrTypeList ::= AllKeyword | TypeList

 

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

62.AllKeyword ::= "all"

63.TypeList ::= Type {"," Type}

64.ProcedureAttribs ::= ProcedureKeyword "{" {(AddressDecl |

                                                ProcedureList |

                                                ConfigParamDef

                                               ) [SemiColon]}+ "}"

65.ProcedureKeyword ::= "procedure"

66.ProcedureList ::= Direction AllOrSignatureList

67.AllOrSignatureList ::= AllKeyword | SignatureList

68.SignatureList ::= Signature {"," Signature}

69.MixedAttribs ::= MixedKeyword "{" {(AddressDecl |

                                        MixedList |

                                        ConfigParamDef

                                       ) [SemiColon]}+ "}"

70.MixedKeyword ::= "mixed"

71.MixedList ::= Direction ProcOrTypeList

72.ProcOrTypeList ::= AllKeyword | (ProcOrType {"," ProcOrType})

73.ProcOrType ::= Signature | Type

74.ComponentDef ::= ComponentKeyword Identifier [ExtendsKeyword ComponentType  

                                                  {"," ComponentType}] "{"  

                     [ComponentDefList] "}"

75.ComponentKeyword ::= "component"

76.ExtendsKeyword ::= "extends"

77.ComponentType ::= ExtendedIdentifier

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

79.ComponentElementDef ::= PortInstance |

                            VarInstance |

                            TimerInstance |

                            ConstDef |

                            TemplateDef

80.PortInstance ::= PortKeyword ExtendedIdentifier PortElement {"," PortElement}

81.PortElement ::= Identifier [ArrayDef]

82.ConstDef ::= ConstKeyword Type ConstList

83.ConstList ::= SingleConstDef {"," SingleConstDef}

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

85.ConstKeyword ::= "const"

86.TemplateDef ::= TemplateKeyword [TemplateRestriction] [FuzzyModifier [DeterministicModifier]]

                   [AbstractModifier] BaseTemplate [DerivedDef] AssignmentChar BaseTemplateBody

87.BaseTemplate ::= (Type | Signature) Identifier ["(" TemplateOrValueFormalParList  

                                                    ")"]

88.TemplateKeyword ::= "template"

89.DerivedDef ::= ModifiesKeyword ( ExtendedIdentifier | BaseTemplateBody )

90.ModifiesKeyword ::= "modifies"

91.TemplateOrValueFormalParList ::= TemplateOrValueFormalPar {"," TemplateOrValueFormalPar}

92.TemplateOrValueFormalPar ::= FormalValuePar | FormalTemplatePar

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

93.TemplateBody ::= DerivedTemplateBody | BaseTemplateBody

94.BaseTemplateBody ::= (SimpleSpec |

                      FieldSpecList |

                      ArrayValueOrAttrib

                     ) [ExtraMatchingAttributes]

 

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

95.SimpleSpec ::= (SingleExpression ["&" SimpleTemplateSpec]) | SimpleTemplateSpec

96.SimpleTemplateSpec ::= SingleTemplateExpression ["&" SimpleSpec]

97.SingleTemplateExpression ::= MatchingSymbol |

                               ({TemplateRefWithParList [ExtendedFieldReference]) |

                                ExtendedIdentifier EnumTemplateExtension

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

98.EnumTemplateExtension ::= "(" (BaseTemplateBody | Range) {"," (BaseTemplateBody | Range) } ")"

/** STATIC Semantics: each TemplateBody shall be an integer template template and the limits of each Range  an integer value*/

99.FieldSpecList ::= "{" FieldSpec {"," FieldSpec} "}"

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

101.FieldReference ::= StructFieldRef |

                       IndexRef |

                       ParRef

102.StructFieldRef ::= Identifier |

                       PredefinedType |

                       TypeReference

 

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

103.ParRef ::= Identifier

 

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

104.IndexRef ::= "[" SingleExpression "]"

 

/* STATIC SEMANTICS - IndexRef shall be optionally used for array types and TTCN-3 record of, set of and map types. The same notation can be used for a string element reference inside an TTCN-3 charstring, universal charstring, bitstring, octetstring and hexstring type */

 

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

105.ArrayValueOrAttrib ::= "{" [ArrayElementSpecList] "}"

106.ArrayElementSpecList ::= ArrayElementSpec {"," ArrayElementSpec}

107.ArrayElementSpec ::= Minus |

                          PermutationMatch |

                          TemplateBody

108.MatchingSymbol ::= Complement |

                        (AnyValue [WildcardLengthMatch]) |

                        (AnyOrOmit [WildcardLengthMatch]) |

                        ListOfTemplates |

                        Range |

                        BitStringMatch |

                        HexStringMatch |

                        OctetStringMatch |

                        CharStringMatch |

                        SubsetMatch |

                        SupersetMatch |

                        DecodedContentMatch

109.DecodedContentMatch ::= DecodedMatchKeyword ["(" [Expression] ")"] TemplateInstance

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

111.ExtraMatchingAttributes ::= StringLength |

                                 IfPresentKeyword |

                                 (StringLength IfPresentKeyword)

112.BitStringMatch ::= "'" {BinOrMatch} "'" "B"

113.BinOrMatch ::= Bin |

                    AnyValue |

                    AnyOrOmit

114.HexStringMatch ::= "'" {HexOrMatch} "'" "H"

115.HexOrMatch ::= Hex |

                    AnyValue |

                    AnyOrOmit

116.OctetStringMatch ::= "'" {OctOrMatch} "'" "O"

117.OctOrMatch ::= Oct |

                    AnyValue |

                    AnyOrOmit

118.CharStringMatch ::= PatternKeyword [CaseInsenModifier] PatternParticle {"&" PatternParticle}

119.PatternParticle ::= Pattern | ReferencedValue

120.PatternKeyword ::= "pattern"

121.Pattern ::= """ {PatternElement} """

122.PatternElement ::= (("\" ("?" | "*" | "\" | "[" | "]" | "{" | "}" |

                               """ | "|" | "(" | ")" | "#" | "+" | "d" |

                               "w" | "t" | "n" | "r" | "s" | "b"

                              )) | ("?" | "*" | "\" | "|" | "+"

                                   ) | ("[" ["^"] [{PatternClassChar ["-"  

                                                                      PatternClassChar]}]  

                                        "]") |

                         ("{" ["\"] ReferencedValue "}") | ("\" "N" "{"  

                                                           (ReferencedValue |

                                                           Type) "}") |

                         (""" """) |

                         ("(" PatternElement ")") |

                         ("#" (Num |

                              ("(" Number "," [Number] ")") |

                              ("(" "," Number ")") |

                              ("(" [","] ")") Num ")"

                             ))

                        ) | PatternChar

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

124.NonSpecialPatternChar ::= Char

125.PatternClassChar ::= NonSpecialPatternClassChar |

                          PatternQuadruple |

                          "\" EscapedPatternClassChar

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

127.EscapedPatternClassChar ::= "[" | "-" | "^" | "]"

128.PatternQuadruple ::= "\" "q" "(" Number "," Number "," Number ","  

                          Number ")"

129.Complement ::= ComplementKeyword ListOfTemplates

130.ComplementKeyword ::= "complement"

131.ListOfTemplates ::= "(" TemplateListItem {"," TemplateListItem} ")"

132.TemplateListItem ::= TemplateBody | AllElementsFrom

133.AllElementsFrom ::= AllKeyword FromKeyword TemplateBody

134.SubsetMatch ::= SubsetKeyword ListOfTemplates

135.SubsetKeyword ::= "subset"

136.SupersetMatch ::= SupersetKeyword ListOfTemplates

137.SupersetKeyword ::= "superset"

138.PermutationMatch ::= PermutationKeyword ListOfTemplates

 

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

139.PermutationKeyword ::= "permutation"

140.AnyValue ::= "?"

141.AnyOrOmit ::= "*"

142.WildcardLengthMatch ::= LengthKeyword "(" SingleExpression ")"

 

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

143.IfPresentKeyword ::= "ifpresent"

144.PresentKeyword ::= "present"

145.Range ::= "(" Bound ".." Bound ")"

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

147.InfinityKeyword ::= "infinity"

148.ActualParAssignment ::= Identifier ":=" TemplateInstance

/* STATIC SEMANTICS – if a value parameter is used, an in-line template shall evaluate to a value */ 149.TemplateRefWithParList ::= ExtendedIdentifier [ActualParList]

150.TemplateInstance ::= [(Type | Signature) Colon]

TemplateBody

151.DerivedTemplateBody ::= ModifiesKeyword BaseTemplateBody AssignmentChar BaseTemplateBody

152.ActualParList ::= "(" [(ActualPar {"," ActualPar })

                                   {"," ActualParAssignment} |

                                 (ActualParAssignment {"," ActualParAssignment})]

                      ")"

153.ActualPar ::= TemplateInstance | Minus

 

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

154.TemplateOps ::= MatchOp | ValueofOp | OmitOp | PresentOp

155.MatchOp ::= MatchKeyword "(" Expression "," TemplateInstance ")"

156.MatchKeyword ::= "match"

157.ValueofOp ::= ValueofKeyword "(" TemplateInstance")"

158.ValueofKeyword ::= "valueof"

159. OmitOp ::= OmitKeyword "(" TemplateInstance")"

160. PresentOp ::= PresentKeyword "(" TemplateInstance")"

161.FunctionDef ::= FunctionKeyword [ DeterministicModifier | ControlModifier ]

                   IdentifierOrControl

                     "(" [FunctionFormalParList] ")" [RunsOnSpec] [MtcSpec]  

                     [SystemSpec] [ReturnType] StatementBlock

162.FunctionKeyword ::= "function"

163.FunctionFormalParList ::= FunctionFormalPar {"," FunctionFormalPar}

164.FunctionFormalPar ::= FormalValuePar |

                           FormalTemplatePar

165.ReturnType ::= ReturnKeyword [TemplateModifier]  

                    Type [ArrayDef]

166.ReturnKeyword ::= "return"

167.RunsOnSpec ::= RunsKeyword OnKeyword ComponentType

168.RunsKeyword ::= "runs"

169.OnKeyword ::= "on"

170.MtcSpec ::= MTCKeyword ComponentType

171.MTCKeyword ::= "mtc"

172.StatementBlock ::= "{" [FunctionDefOrStatementList] "}"

173.FunctionDefOrStatementList ::= {( FunctionDef | FunctionStatement) [SemiColon]}+

174.FunctionDef ::= (FunctionLocalDef | FunctionLocalInst) [WithStatement]

175.FunctionLocalInst ::= VarInstance | TimerInstance

176.FunctionLocalDef ::= ConstDef | TemplateDef

177.FunctionStatement ::= ConfigurationStatements |

                           TimerStatements |

                           CommunicationStatements |

                           BasicStatements |

                           BehaviourStatements |

                           SetLocalVerdict |

                           SUTStatements |

                           TestcaseOperation

178.FunctionInstance ::= FunctionRef [ "(" [ActualParList] ")" ]

/* STATIC SEMANTICS – the part is only optional if the FunctionRef uses the ControlKeyword and the referenced control function has no formal parameters */

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

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

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

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"

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 "(" [ActualParList]  

                          ")" ["," (Expression | Minus) ["," SingleExpression]]  

                          ")"

194.ExecuteKeyword ::= "execute"

195.AltstepDef ::= AltstepKeyword [ ControlModifier ] [ InterleavedKeyword ] Identifier

                  "(" [FunctionFormalParList]  ")" [RunsOnSpec] [MtcSpec] [SystemSpec]

                  "{" AltstepLocalDefList AltGuardList "}"

196.AltstepKeyword ::= "altstep"

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

198.AltstepLocalDef ::= VarInstance |

                         TimerInstance |

                         ConstDef |

                         TemplateDef

199.AltstepInstance ::= ExtendedIdentifier "(" [ActualParList]  

                         ")"

200.ImportDef ::= ImportKeyword ImportFromSpec [PortRedirectSymbol Identifier]

                     (AllWithExcepts | ("{" ImportSpec "}"))

201.ImportKeyword ::= "import"

202.AllWithExcepts ::= AllKeyword [ExceptsDef]

203.ExceptsDef ::= ExceptKeyword "{" ExceptSpec "}"

204.ExceptKeyword ::= "except"

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

206.ExceptElement ::= ExceptGroupSpec |

                       ExceptTypeDefSpec |

                       ExceptTemplateSpec |

                       ExceptConstSpec |

                       ExceptTestcaseSpec |

                       ExceptAltstepSpec |

                       ExceptFunctionSpec |

                       ExceptSignatureSpec |

                       ExceptModuleParSpec

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

208.IdentifierListOrAll ::= IdentifierList | AllKeyword

209.TypeIdListOrAll ::= TypeIdentifierList | AllKeyword

210.FuncIdListOrAll ::= FuncIdentifierList | AllKeyword

211.ExceptTypeDefSpec ::= TypeDefKeyword TypeIdListOrAll

212.ExceptTemplateSpec ::= TemplateKeyword IdentifierListOrAll

213.ExceptConstSpec ::= ConstKeyword IdentifierListOrAll

214.ExceptTestcaseSpec ::= TestcaseKeyword IdentifierListOrAll

215.ExceptAltstepSpec ::= AltstepKeyword IdentifierListOrAll

216.ExceptFunctionSpec ::= FunctionKeyword FuncIdListOrAll

217.ExceptSignatureSpec ::= SignatureKeyword IdentifierListOrAll

218.ExceptModuleParSpec ::= ModuleParKeyword IdentifierListOrAll

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

220.ImportElement ::= ImportGroupSpec |

                       ImportTypeDefSpec |

                       ImportTemplateSpec |

                       ImportConstSpec |

                       ImportTestcaseSpec |

                       ImportAltstepSpec |

                       ImportFunctionSpec |

                       ImportSignatureSpec |

                       ImportModuleParSpec |

                       ImportImportSpec

221.ImportFromSpec ::= FromKeyword ModuleId

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

223.GroupRefListWithExcept ::= QualifiedIdentifierWithExcept {"," QualifiedIdentifierWithExcept}

224.AllGroupsWithExcept ::= AllKeyword [ExceptKeyword QualifiedIdentifierList]

225.QualifiedIdentifierWithExcept ::= QualifiedIdentifier [ExceptsDef]

226.IdentifierListOrAllWithExcept ::= IdentifierList | AllWithExcept

227.TypeIdListOrAllWithExcept ::= TypeIdentifierList | AllTypesExcept

228.FuncIdListOrAllWithExcept ::= FuncIdentifierList | AllFunctionsExcept

229.ImportTypeDefSpec ::= TypeDefKeyword TypeIdListOrAllWithExcept

230.AllWithExcept ::= AllKeyword [ExceptKeyword IdentifierList]

231.AllTypesExcept ::= AllKeyword [ExceptKeyword TypeIdentifierList]

232.AllFunctionsExcept ::= AllKeyword [ExceptKeyword FuncIdentifierList]

233.ImportTemplateSpec ::= TemplateKeyword IdentifierListOrAllWithExcept

234.ImportConstSpec ::= ConstKeyword IdentifierListOrAllWithExcept

235.ImportAltstepSpec ::= AltstepKeyword IdentifierListOrAllWithExcept

236.ImportTestcaseSpec ::= TestcaseKeyword IdentifierListOrAllWithExcept

237.ImportFunctionSpec ::= FunctionKeyword FuncIdListOrAllWithExcept

238.ImportSignatureSpec ::= SignatureKeyword IdentifierListOrAllWithExcept

239.ImportModuleParSpec ::= ModuleParKeyword IdentifierListOrAllWithExcept

240.ImportImportSpec ::= ImportKeyword AllKeyword

241.TypeIdentifierList ::= IdentifierOrAddr {"," IdentifierOrAddr }

242.IdentifierOrAddr ::= Identifier | AddressKeyword

243.FuncIdentifierList ::= IdentifierOrControl {"," IdentifierOrControl }

244.IdentifierOrControl ::= Identifier | ControlKeyword

245.GroupDef ::= GroupKeyword Identifier "{" [ModuleDefinitionsList] "}"

246.GroupKeyword ::= "group"

247.ExtFunctionDef ::= ExtKeyword FunctionKeyword [DeterministicModifier | ControlModifier]

                        Identifier "(" [FunctionFormalParList] ")" [ReturnType]

248.ExtKeyword ::= "external"

249.ModuleParDef ::= ModuleParKeyword (ModulePar | ("{" MultitypedModuleParList  

                                                     "}"))

250.ModuleParKeyword ::= "modulepar"

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

252.ModulePar ::= [ TemplateModifier ] Type ModuleParList

253.ModuleParList ::= Identifier [AssignmentChar TemplateBody] {","

                      Identifier [AssignmentChar TemplateBody]}

254.FriendModuleDef ::= "friend" "module" IdentifierList [SemiColon]

255.ModuleControlDef ::= ControlKeyword StatementBlock

256.ControlKeyword ::= "control"

257.VarInstance ::= VarKeyword (([(LazyModifier | FuzzyModifier) [DeterministicModifier] ]

                                  Type VarList) | ( TemplateModifier

                                  [(LazyModifier | FuzzyModifier) ) [DeterministicModifier] ]

                                  Type TempVarList) )

258.VarList ::= SingleVarInstance {"," SingleVarInstance}

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

260.VarKeyword ::= "var"

261.TempVarList ::= SingleTempVarInstance {"," SingleTempVarInstance}

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

263.ValueRef ::= Identifier [ExtendedFieldReference]

 

264.TimerInstance ::= TimerKeyword VarList

265.TimerKeyword ::= "timer"

266.ArrayIdentifierRef ::= Identifier {IndexRef}

267.ConfigurationStatements ::= ConnectStatement |

                                 MapStatement |

                                 DisconnectStatement |

                                 UnmapStatement |

                                 [ NoDefaultModifier ] DoneStatement |

                                 [ NoDefaultModifier ] KilledStatement |

                                 StartTCStatement |

                                 StopTCStatement |

                                 KillTCStatement |

                                 SetEncodeStatement

268.ConfigurationOps ::= CreateOp |

                          SelfOp |

                          SystemKeyword |

                          MTCKeyword |

                          RunningOp |

                          AliveOp

269.CreateOp ::= ComponentType Dot CreateKeyword ["(" (SingleExpression |

                        Minus) ["," SingleExpression] ")"] [AliveKeyword]

270.SelfOp ::= "self"

271.DoneStatement ::= ComponentOrAny Dot DoneKeyword [ PortRedirectSymbol

                       [ ValueStoreSpec ] [ IndexSpec ] ]

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

272.ComponentOrAny ::= ObjectReference |

                        (AnyKeyword (ComponentKeyword | FromKeyword ValueRef)) |

                        (AllKeyword ComponentKeyword)

273.ValueStoreSpec ::= ValueKeyword ValueRef

274.IndexAssignment ::= PortRedirectSymbol IndexSpec

275.IndexSpec ::= IndexModifier ValueStoreSpec

276.KilledStatement ::= ComponentOrAny Dot KilledKeyword [ PortRedirectSymbol

                        [ ValueStoreSpec ] [ IndexSpec] ]

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

277.DoneKeyword ::= "done"

278.KilledKeyword ::= "killed"

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

280.RunningKeyword ::= "running"

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

282.CreateKeyword ::= "create"

283.AliveKeyword ::= "alive"

284.ConnectStatement ::= ConnectKeyword SingleConnectionSpec

285.ConnectKeyword ::= "connect"

286.SingleConnectionSpec ::= "(" PortRef "," PortRef ")"

287.PortRef ::= ComponentRef Colon ArrayIdentifierRef

288.ComponentRef ::= ObjectReference |

                      SystemKeyword |

                      SelfOp |

                      MTCKeyword

289.DisconnectStatement ::= DisconnectKeyword [SingleConnectionSpec |

                                                AllConnectionsSpec |

                                                AllPortsSpec |

                                                AllCompsAllPortsSpec

                                               ]

290.AllConnectionsSpec ::= "(" PortRef ")"

291.AllPortsSpec ::= "(" ComponentRef ":" AllKeyword PortKeyword ")"

292.AllCompsAllPortsSpec ::= "(" AllKeyword ComponentKeyword ":" AllKeyword  

                              PortKeyword ")"

293.DisconnectKeyword ::= "disconnect"

294.MapStatement ::= MapKeyword SingleConnectionSpec [ParamClause]

295.ParamClause ::= ParamKeyword ActualParList

296.MapKeyword ::= "map"

297.UnmapStatement ::= UnmapKeyword [SingleConnectionSpec [ParamClause] |

                                      AllConnectionsSpec [ParamClause] |

                                      AllPortsSpec |

                                      AllCompsAllPortsSpec |

                                      "(" ValueRef "," SingleExpression ")"

                                     ]

298.UnmapKeyword ::= "unmap"

299.StartTCStatement ::= ObjectReference Dot StartKeyword  

                          "(" (FunctionInstance | AltstepInstance)  ")"

300.StartKeyword ::= "start"

301.StopTCStatement ::= StopKeyword | (ComponentReferenceOrLiteral | AllKeyword  

                                        ComponentKeyword) Dot StopKeyword

302.ComponentReferenceOrLiteral ::= ObjectReference |

                                     MTCKeyword |

                                     SelfOp

303.KillTCStatement ::= KillKeyword | ((ComponentReferenceOrLiteral |

                                         AllKeyword ComponentKeyword) Dot KillKeyword)

304.ObjectReference ::= ValueRef | FunctionInstance

305.KillKeyword ::= "kill"

306.SetEncodeStatement ::= ( SingleExpression | ( AllKeyword PortKeyword ) | SelfOp ) | "."
                          SetEncodeKeyword "("
Type "," SingleExpression ")"

307.SetEncodeKeyword ::= "setencode"

308.CommunicationStatements ::= SendStatement |

                                 CallStatement |

                                 ReplyStatement |

                                 RaiseStatement |

                                 [ NoDefaultModifier ] ReceivingStatement |

                                 ClearStatement |

                                 StartStatement |

                                 StopStatement |

                                 HaltStatement |

                                 CheckStateStatement

309.ReceivingStatement ::= ReceiveStatement |

                           TriggerStatement |

                           GetCallStatement |

                           GetReplyStatement |

                           CatchStatement |

                           CheckStatement

310.SendStatement ::= ObjectReference Dot PortSendOp

311.PortSendOp ::= SendOpKeyword "(" TemplateInstance")" [ToClause]

312.SendOpKeyword ::= "send"

313.ToClause ::= ToKeyword (TemplateInstance|

                             AddressRefList |

                             AllKeyword ComponentKeyword

                            )

314.AddressRefList ::= "(" TemplateInstance{"," TemplateInstance} ")"

315.ToKeyword ::= "to"

316.CallStatement ::= ObjectReference Dot PortCallOp [PortCallBody]

317.PortCallOp ::= CallOpKeyword "(" CallParameters ")" [ToClause]

318.CallOpKeyword ::= "call"

319.CallParameters ::= TemplateInstance ["," CallTimerValue]

320.CallTimerValue ::= Expression | NowaitKeyword

321.NowaitKeyword ::= "nowait"

322.PortCallBody ::= "{" CallBodyStatementList "}"

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

324.CallBodyStatement ::= CallBodyGuard StatementBlock

325.CallBodyGuard ::= AltGuardChar CallBodyOps

326.CallBodyOps ::= GetReplyStatement | CatchStatement

327.ReplyStatement ::= ObjectReference Dot PortReplyOp

328.PortReplyOp ::= ReplyKeyword "(" TemplateInstance [ReplyValue] ")" [ToClause]

329.ReplyKeyword ::= "reply"

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

331.RaiseStatement ::= ObjectReference Dot PortRaiseOp

332.PortRaiseOp ::= RaiseKeyword "(" Signature "," TemplateInstance")"  

                     [ToClause]

333.NoDefaultModifier ::= "@nodefault" 

334.RaiseKeyword ::= "raise"

335.ReceiveStatement ::= PortOrAny Dot PortReceiveOp

336.PortOrAny ::= ObjectReference | (AnyKeyword (PortKeyword | FromKeyword ValueRef))

337.PortReceiveOp ::= ReceiveOpKeyword ["("TemplateInstance")"] [FromClause] [PortRedirect]

338.ReceiveOpKeyword ::= "receive"

339.FromClause ::= FromKeyword (TemplateInstance |

                                 AddressRefList |

                                 AnyKeyword ComponentKeyword

                                )

340.FromKeyword ::= "from"

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

                                         (SenderSpec [IndexSpec]) |

                                          IndexSpec

                                         )

342.PortRedirectSymbol ::= "->"

343.ValueSpec ::= ValueKeyword (ValueRef | ("(" SingleValueSpec {"," SingleValueSpec} ")"))

344.SingleValueSpec ::= ValueRef [AssignmentChar [ DecodedModifier ["(" [Expression] ")"] ]

                                                    FieldReference ExtendedFieldReference]

 

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

345.ValueKeyword ::= "value"

346.SenderSpec ::= SenderKeyword ValueRef

347.SenderKeyword ::= "sender"

348.TriggerStatement ::= PortOrAny Dot PortTriggerOp

349.PortTriggerOp ::= TriggerOpKeyword ["(" TemplateInstance  ")"] [FromClause]  

                       [PortRedirect]

350.TriggerOpKeyword ::= "trigger"

351.GetCallStatement ::= PortOrAny Dot PortGetCallOp

352.PortGetCallOp ::= GetCallOpKeyword ["(" TemplateInstance ")"] [FromClause]  

                       [PortRedirectWithParam]

353.GetCallOpKeyword ::= "getcall"

354.PortRedirectWithParam ::= PortRedirectSymbol RedirectWithParamSpec

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

                               (SenderSpec [IndexSpec]) |

                               IndexSpec

356.ParamSpec ::= ParamKeyword ParamAssignmentList

357.ParamKeyword ::= "param"

358.ParamAssignmentList ::= "(" (AssignmentList | VariableList) ")"

359.AssignmentList ::= VariableAssignment {"," VariableAssignment}

360.VariableAssignment ::= ValueRef AssignmentChar [ DecodedModifier ["(" Expression] ")"]

                                                      Identifier

361.VariableList ::= VariableEntry {"," VariableEntry}

362.VariableEntry ::= ValueRef | Minus

363.GetReplyStatement ::= PortOrAny Dot PortGetReplyOp

364.PortGetReplyOp ::= GetReplyOpKeyword ["(" TemplateInstance [ValueMatchSpec]  

                                           ")"] [FromClause] [PortRedirectWithValueAndParam]

365.PortRedirectWithValueAndParam ::= PortRedirectSymbol RedirectWithValueAndParamSpec

366.RedirectWithValueAndParamSpec ::= (ValueSpec [ParamSpec] [SenderSpec]  

                                        [IndexSpec]) | RedirectWithParamSpec

367.GetReplyOpKeyword ::= "getreply"

368.ValueMatchSpec ::= ValueKeyword TemplateInstance

369.CheckStatement ::= PortOrAny Dot PortCheckOp

370.PortCheckOp ::= CheckOpKeyword ["(" CheckParameter ")"]

371.CheckOpKeyword ::= "check"

372.CheckParameter ::= CheckPortOpsPresent |

                        FromClausePresent |

                        RedirectPresent

373.FromClausePresent ::= FromClause [PortRedirectSymbol ((SenderSpec  

                                                            [IndexSpec]) |

                                                           IndexSpec)]

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

                                             IndexSpec)

375.CheckPortOpsPresent ::= PortReceiveOp |

                             PortGetCallOp |

                             PortGetReplyOp |

                             PortCatchOp

376.CatchStatement ::= PortOrAny Dot PortCatchOp

377.PortCatchOp ::= CatchOpKeyword ["(" CatchOpParameter ")"] [FromClause] [PortRedirect]

378.CatchOpKeyword ::= "catch"

379.CatchOpParameter ::= Signature [ "," TemplateInstance ] | TimeoutKeyword

380.ClearStatement ::= PortOrAll Dot ClearOpKeyword

381.PortOrAll ::= ObjectReference | AllKeyword PortKeyword

382.ClearOpKeyword ::= "clear"

383.StartStatement ::= PortOrAll Dot StartKeyword

384.StopStatement ::= PortOrAll Dot StopKeyword

385.StopKeyword ::= "stop"

386.HaltStatement ::= PortOrAll Dot HaltKeyword

387.HaltKeyword ::= "halt"

388.AnyKeyword ::= "any"

389.CheckStateStatement ::= PortOrAllAny Dot CheckStateKeyword "(" SingleExpression  

                             ")"

390.PortOrAllAny ::= PortOrAll | AnyKeyword PortKeyword

391.CheckStateKeyword ::= "checkstate"

392.TimerStatements ::= StartTimerStatement |

                         StopTimerStatement |

                         [ NoDefaultModifier ] TimeoutStatement

393.TimerOps ::= ReadTimerOp | RunningTimerOp

394.StartTimerStatement ::= ObjectReference Dot StartKeyword ["(" Expression ")"]

395.StopTimerStatement ::= TimerRefOrAll Dot StopKeyword

396.TimerRefOrAll ::= ObjectReference | AllKeyword TimerKeyword

397.ReadTimerOp ::= ObjectReference Dot ReadKeyword

398.ReadKeyword ::= "read"

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

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

401.TimerRefOrAny ::= ObjectReference |

                       (AnyKeyword TimerKeyword) |

                       (AnyKeyword FromKeyword Identifier)

402.TimeoutKeyword ::= "timeout"

403.TestcaseOperation ::= TestcaseKeyword "." StopKeyword ["(" { LogItem [","] } ")"]

404.Type ::= PredefinedType | ReferencedType

405.PredefinedType ::= BitStringKeyword |

                        BooleanKeyword |

                        CharStringKeyword |

                        UniversalCharString |

                        IntegerKeyword |

                        OctetStringKeyword |

                        HexStringKeyword |

                        VerdictTypeKeyword |

                        FloatKeyword |

                        AddressKeyword |

                        DefaultKeyword |

                        AnyTypeKeyword |

                        TimerKeyword

406.BitStringKeyword ::= "bitstring"

407.BooleanKeyword ::= "boolean"

408.IntegerKeyword ::= "integer"

409.OctetStringKeyword ::= "octetstring"

410.HexStringKeyword ::= "hexstring"

411.VerdictTypeKeyword ::= "verdicttype"

412.FloatKeyword ::= "float"

413.AddressKeyword ::= "address"

414.DefaultKeyword ::= "default"

415.AnyTypeKeyword ::= "anytype"

416.CharStringKeyword ::= "charstring"

417.UniversalCharString ::= UniversalKeyword CharStringKeyword

418.UniversalKeyword ::= "universal"

419.ReferencedType ::= ExtendedIdentifier [ExtendedTypeFieldReference]

420.TypeReference ::= ExtendedIdentifier

421.ArrayDef ::= {"[" SingleExpression [".." SingleExpression] "]"}+

422.ExtendedTypeFieldReference ::= {(Dot (Identifier | PredefinedType | FromKeyword | ToKeyword)) |

                                    ("[" Minus "]") }+

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

423.Value ::= PredefinedValue | ReferencedValue

424.PredefinedValue ::= Bstring |

                         BooleanValue |

                         CharStringValue |

                         Number | /* IntegerValue */

                         Ostring |

                         Hstring |

                         VerdictTypeValue |

                         FloatValue |

                         AddressValue |

                         OmitKeyword

425.BooleanValue ::= "true" | "false"

426.VerdictTypeValue ::= "pass" |

                          "fail" |

                          "inconc" |

                          "none" |

                          "error"

427.CharStringValue ::= Cstring | Quadruple | USIlikeNotation

428.Quadruple ::= CharKeyword "(" Number "," Number "," Number "," Number ")"

429.USIlikeNotation ::= CharKeyword "(" UIDlike { "," UIDlike } ")"

430.UIDlike ::= ("U"|"u") {"+"} {Hex}#(1,8)

431.CharKeyword ::= "char"

432.FloatValue ::= FloatDotNotation |

                    FloatENotation |

                    NaNKeyword

433.NaNKeyword ::= "not_a_number"

434.FloatDotNotation ::= Number Dot DecimalNumber

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

436.Exponential ::= "E"

437.ReferencedValue ::= (ExtendedIdentifier [ExtendedFieldReference] ) | ReferencedEnumValue

/* STATIC SEMANTICS – The second option is used only for referencing enumerated values, in all other cases, the first option is used.

438.ReferencedEnumValue ::= [ReferencedType Dot] Identifier [ExtendedEnumReference]

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

439.ExtendedEnumReference ::= "(" IntegerValue ")"

440.Number ::= (NonZeroNum {Num}) | "0"

441.NonZeroNum ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"

442.DecimalNumber ::= { Num }+

443.Num ::= "0" | NonZeroNum

444.Bstring ::= "'" { Bin | BinSpace } "'" "B"

445.Bin ::= "0" | "1"

446.Hstring ::= "'" { Hex | BinSpace } "'" "H"

447.Hex ::= Num | "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" |

             "d" | "e" | "f"

448.Ostring ::= "'" { Oct | BinSpace } "'" "O"

449.Oct ::= Hex Hex

450.Cstring ::= """ {Char} """

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

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

453.Alpha ::= UpperAlpha | LowerAlpha

454.AlphaNum ::= Alpha | Num

455.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"

456.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"

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

458.FreeText ::= """ {ExtendedAlphaNum} """

459.AddressValue ::= "null"

460.OmitKeyword ::= "omit"

461. BinSpace ::=  " " | "\" NLChar

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

463.InParKeyword ::= "in"

464.OutParKeyword ::= "out"

465.InOutParKeyword ::= "inout"

466.FormalValuePar ::= [InParKeyword | InOutParKeyword | OutParKeyword )]

                       [(LazyModifier | FuzzyModifier) [DeterministicModifier] ]

                       Type Identifier [ArrayDef] [":=" (Expression | Minus)]

467.FormalTemplatePar ::= [(InParKeyword | OutParKeyword | InOutParKeyword)] TemplateModifier

                          [(LazyModifier | FuzzyModifier) [DeterministicModifier] ]

                          Type Identifier [ArrayDef] [":=" (TemplateInstance | Minus) ]

468.TemplateModifier ::= TemplateKeyword | RestrictedTemplate

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

470.TemplateRestriction ::= "(" (OmitKeyword |

                                  ValueKeyword |

                                  PresentKeyword

                                 ) ")"

471.WithStatement ::= WithKeyword WithAttribList

472.WithKeyword ::= "with"

473.WithAttribList ::= "{" MultiWithAttrib "}"

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

475.SingleWithAttrib ::=    StandardAttribute |

                          VariantAttribute

476.StandardAttribute ::= AttribKeyword [OverrideKeyword | LocalModifier] [AttribQualifier]

                          FreeText

477. VariantAttribute ::= VariantKeyword [( OverrideKeyword | LocalModifier )]

                      [AttribQualifier] [ RelatedEncoding "." ] FreeText

478. RelatedEncoding ::= FreeText | ( "{" FreeText { "," FreeText } "}" )

 

479.AttribKeyword ::= EncodeKeyword |

                       DisplayKeyword |

                       ExtensionKeyword |

                       OptionalKeyword

480.EncodeKeyword ::= "encode"

481.VariantKeyword ::= "variant"

482.DisplayKeyword ::= "display"

483.ExtensionKeyword ::= "extension"

484.OverrideKeyword ::= "override"

485.LocalModifier ::= "@local"

486.AttribQualifier ::= "(" DefOrFieldRefList ")"

487.DefOrFieldRefList ::= DefOrFieldRef {"," DefOrFieldRef}

488.DefOrFieldRef ::= QualifiedIdentifier |

                       ((FieldReference | "[" Minus "]") [ExtendedFieldOrTypeReference]) |

                       AllRef

489.QualifiedIdentifier ::= {Identifier Dot} Identifier

490.ExtendedFieldOrTypeReference ::= {(Dot (Identifier | PredefinedType)) |

                                      IndexRef | ("[" Minus "]") }+

/* STATIC SEMANTIC - The Identifier refers to a type definition if the type of the VarInstance or ReferencedValue in which the ExtendedFieldOrReference is used is anytype. IndexRef 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, set of or array type. */

491.AllRef ::= (GroupKeyword AllKeyword [ExceptKeyword "{" QualifiedIdentifierList  

                                          "}"]) | ((TypeDefKeyword |

                                                   TemplateKeyword |

                                                   ConstKeyword |

                                                   AltstepKeyword |

                                                   TestcaseKeyword |

                                                   FunctionKeyword |

                                                   SignatureKeyword |

                                                   ModuleParKeyword

                                                  ) AllKeyword [ExceptKeyword  

                                                                "{" IdentifierList  

                                                                "}"])

492.BehaviourStatements ::= TestcaseInstance |

                             FunctionInstance |

                             ReturnStatement |

                             AltConstruct |

                             InterleavedConstruct |

                             LabelStatement |

                             GotoStatement |

                             RepeatStatement |

                             DeactivateStatement |

                             AltstepInstance |

                             ActivateOp |

                             BreakStatement |

                             ContinueStatement

493.SetLocalVerdict ::= SetVerdictKeyword "(" SingleExpression {"," LogItem}  

                         ")"

494.SetVerdictKeyword ::= "setverdict"

495.GetLocalVerdict ::= "getverdict"

496.SUTStatements ::= ActionKeyword "(" ActionText {StringOp ActionText}  

                       ")"

497.ActionKeyword ::= "action"

498.ActionText ::= FreeText | Expression

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

500.AltConstruct ::= AltKeyword [ NoDefaultModifier ] "{" AltstepLocalDefList AltGuardList "}"

501.AltKeyword ::= "alt"

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

503.GuardStatement ::= AltGuardChar (AltstepInstance [StatementBlock] |

                                      GuardOp StatementBlock)

504.ElseStatement ::= "[" ElseKeyword "]" StatementBlock

505.AltGuardChar ::= "[" [BooleanExpression] "]"

506.GuardOp ::= TimeoutStatement |

                 ReceiveStatement |

                 TriggerStatement |

                 GetCallStatement |

                 CatchStatement |

                 CheckStatement |

                 GetReplyStatement |

                 DoneStatement |

                 KilledStatement

507.InterleavedConstruct ::= InterleavedKeyword [ NoDefaultModifier ] "{" InterleavedGuardList "}"

508.InterleavedKeyword ::= "interleave"

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

510.InterleavedGuardElement ::= InterleavedGuard StatementBlock

511.InterleavedGuard ::= "[" "]" GuardOp

512.LabelStatement ::= LabelKeyword Identifier

513.LabelKeyword ::= "label"

514.GotoStatement ::= GotoKeyword Identifier

515.GotoKeyword ::= "goto"

516.RepeatStatement ::= "repeat"

517.ActivateOp ::= ActivateKeyword "(" AltstepInstance ")"

518.ActivateKeyword ::= "activate"

519.DeactivateStatement ::= DeactivateKeyword ["(" ObjectReference ")"]

520.DeactivateKeyword ::= "deactivate"

521.BreakStatement ::= "break"

522.ContinueStatement ::= "continue"

523.BasicStatements ::= Assignment |

                         LogStatement |

                         LoopConstruct |

                         ConditionalConstruct |

                         SelectCaseConstruct |

                         StatementBlock

524.Expression ::= SingleExpression | CompoundExpression

525.CompoundExpression ::= FieldExpressionList | ArrayOrMixedExpression

 

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

526.FieldExpressionList ::= "{" FieldExpressionSpec {"," FieldExpressionSpec}  

                             "}"

527.FieldExpressionSpec ::= FieldReference AssignmentChar NotUsedOrExpression

528.ArrayOrMixedExpression ::= "{" [ArrayElementExpressionList {"," FieldExpressionSpec}] "}"

529.ArrayElementExpressionList ::= NotUsedOrExpression {"," NotUsedOrExpression}

530.NotUsedOrExpression ::= Expression | Minus

531.ConstantExpression ::= SingleExpression | CompoundConstExpression

532.BooleanExpression ::= SingleExpression

 

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

533.CompoundConstExpression ::= FieldConstExpressionList | ArrayConstExpression

 

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

534.FieldConstExpressionList ::= "{" FieldConstExpressionSpec {"," FieldConstExpressionSpec} "}"

535.FieldConstExpressionSpec ::= FieldReference AssignmentChar ConstantExpression

536.ArrayConstExpression ::= "{" [ArrayElementConstExpressionList] "}"

537.ArrayElementConstExpressionList ::= ConstantExpression {"," ConstantExpression}

538.Assignment ::= ValueRef 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. */

539.SingleExpression ::= XorExpression {"or" XorExpression}

 

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

540.XorExpression ::= AndExpression {"xor" AndExpression}

 

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

541.AndExpression ::= NotExpression {"and" NotExpression}

 

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

542.NotExpression ::= ["not"] EqualExpression

 

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

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

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

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

546.BitOrExpression ::= BitXorExpression {"or4b" BitXorExpression}

 

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

547.BitXorExpression ::= BitAndExpression {"xor4b" BitAndExpression}

 

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

548.BitAndExpression ::= BitNotExpression {"and4b" BitNotExpression}

 

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

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

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

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

552.UnaryExpression ::= [UnaryOp] Primary

 

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

553.Primary ::= OpCall |

                PresenceCheckingOp |

                Value |

                "(" SingleExpression ")"

554.ExtendedFieldReference ::= {(Dot (Identifier | PredefinedType | FromKeyword | ToKeyword)) |

                                 IndexRef |

                                 DecodedFieldReference

                                }+

 

/* 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. IndexRef shall be used when referencing elements of values or arrays. DecodedFieldReference shall not appear on the LHS of assignments and in type references*/

555. DecodedFieldReference ::= "=>" DecodedFieldType

556. DecodedFieldType ::= PredefinedType |

                          Identifier |

                          "(" Type [ "," Expression ] ")"

 

/* The Identifier shall resolve into a type */

 

557.OpCall ::= ConfigurationOps |

                GetLocalVerdict |

                TimerOps |

                TestcaseInstance |

                (FunctionInstance [ExtendedFieldReference]) |

                (TemplateOps [ExtendedFieldReference]) |

                ActivateOp |

                GetAttributeOp

558.PresenceCheckingOp := ("ispresent" | "ischosen" | "isvalue" | "isbound")

                          "(" TemplateInstance ")"

 

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

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

561.UnaryOp ::= "+" | "-"

 

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

562.RelOp ::= "<" | ">" | ">=" | "<="

 

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

563.EqualOp ::= "==" | "!="

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

565.ShiftOp ::= "<<" | ">>" | "<@" | "@>"

566.LogStatement ::= LogKeyword "(" LogItem {"," LogItem} ")"

567.LogKeyword ::= "log"

568.LogItem ::= FreeText | TemplateInstance

569.LoopConstruct ::= ForStatement |

                       WhileStatement |

                       DoWhileStatement

570.ForStatement ::= ForKeyword "(" Initial SemiColon BooleanExpression  

                      SemiColon Assignment ")" StatementBlock

571.ForKeyword ::= "for"

572.Initial ::= VarInstance | Assignment

573.WhileStatement ::= WhileKeyword "(" BooleanExpression ")" StatementBlock

574.WhileKeyword ::= "while"

575.DoWhileStatement ::= DoKeyword StatementBlock WhileKeyword "(" BooleanExpression  

                          ")"

576.DoKeyword ::= "do"

577.ConditionalConstruct ::= IfKeyword "(" BooleanExpression ")" StatementBlock  

                              {ElseIfClause} [ElseClause]

578.IfKeyword ::= "if"

579.ElseIfClause ::= ElseKeyword IfKeyword "(" BooleanExpression ")" StatementBlock

580.ElseKeyword ::= "else"

581.ElseClause ::= ElseKeyword StatementBlock

582.SelectCaseConstruct ::= SelectKeyword [UnionKeyword] "(" SingleExpression ")" SelectCaseBody

583.SelectKeyword ::= "select"

584.SelectCaseBody ::= "{" {SelectCase}+ [CaseElse] "}"

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

586.CaseElse ::= CaseKeyword ElseKeyword StatementBlock

587.CaseKeyword ::= "case"

588.ExtendedIdentifier ::= [Identifier Dot] Identifier

589.IdentifierList ::= Identifier {"," Identifier}

590.QualifiedIdentifierList ::= QualifiedIdentifier {"," QualifiedIdentifier}

591.GetAttributeOp ::= (Type | TemplateInstance) "." GetAttributeSpec

592.GetAttributeSpec ::= EncodeKeyword |

                          VariantKeyword ["(" FreeText ")"] |

                          DisplayKeyword |

                          ExtensionKeyword |

                          OptionalKeyword

593.Dot ::= "."

594.Minus ::= "-"

595.SemiColon ::= ";"

596.Colon ::= ":"

597.Underscore ::= "_"

598.AssignmentChar ::= ":="

599.IndexModifier ::= "@index"

600.DeterministicModifier ::= "@deterministic"

601.LazyModifier ::= "@lazy"

602.FuzzyModifier ::= "@fuzzy"

603.CaseInsenModifier ::= "@nocase"

604.DecodedModifier ::= "@decoded"

605.DefaultModifier ::= "@default"

606.ControlModifier ::= "@control"

607.AbstractModifier ::= "@abstract"