ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0003476 | Part 01: TTCN-3 Core Language | Clarification | public | 30-05-2008 13:33 | 14-08-2008 05:40

Reporter | Elena de Vega |
Assigned To | Thomas DeiÃŸ |
Priority | normal | Severity | minor | Reproducibility | always
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v3.4.1 (published 2008-09) | Fixed in Version | v3.4.1 (published 2008-09) |
Clause Reference(s) | Grammar, templateBody
Source (company - Author) | Elena de Vega - MTP

Summary | 0003476: Mistake in grammar rule TemplateBody

Description

I have analyzed the TTCN-3 grammar and I think there is a mistake.
This mistake is in the rule 102, its name is TemplateBody:
102. TemplateBody ::= (SimpleSpec | FieldSpecList | ArrayValueOrAttrib) | [ExtraMatchingAttributes]
This rule is called from these other rules:
94.- TemplateDef::= TemplateKeyword BaseTemplate [DerivedDef] AssignmentChar TemplateBody
105.- FieldSpec::= FieldReference AssignmentChar TemplateBody
115.- ArrayElementSpec::= NotUsedSymbol | PermutationMatch | TemplateBody
136.- PermutationList::= "(" TemplateBody { "," TemplateBody } ")"
139.- ValueOrAttribList::= "(" TemplateBody {"," TemplateBody }+ ")"
150.- InLineTemplate::= [(Type | Signature) Colon] [DerivedRefWithParList AssignmentChar] TemplateBody
294.- TempVarInitialValue::= TemplateBody
578.- Assignment::= VariableRef AssignmentChar (Expression | TemplateBody)
For example, the rule TemplateDef will match with â€œnothingâ€ after AssignmentChar because you have the alternative [ExtraMatchingAttributes] in the rule TemplateBody, which is actually optional.
For example the grammar matches:
template MyMessageType MyTemplate:= ;
or
template MyMessageType MyTemplate:= length(8);
The solution could be:
TemplateBody ::= (SimpleSpec | FieldSpecList | ArrayValueOrAttrib) [ExtraMatchingAttributes]
Itâ€™s the same rule without â€œ|â€. In this way the grammar will not match the template â€œtemplate MyMessageType MyTemplate:= ;â€ or template MyMessageType MyTemplate:= length(8);

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
30-05-2008 13:33 | Elena de Vega | New Issue |
30-05-2008 13:33 | Elena de Vega | Clause Reference(s) | => Grammar, templateBody
30-05-2008 13:33 | Elena de Vega | Source (company - Author) | => Elena de Vega - MTP
14-07-2008 12:28 | Ina Schieferdecker | Assigned To | => Ina Schieferdecker
14-07-2008 12:28 | Ina Schieferdecker | Status | new => resolved
14-07-2008 12:28 | Ina Schieferdecker | Resolution | open => fixed
14-07-2008 12:28 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
14-07-2008 12:28 | Ina Schieferdecker | Category | TTCN-3 Core Language => Clarification
14-07-2008 12:28 | Ina Schieferdecker | Fixed in Version | => Edition 3.4.1 (not yet published)
14-07-2008 12:28 | Ina Schieferdecker | Target Version | => Edition 3.4.1 (not yet published)
14-07-2008 14:07 | Ina Schieferdecker | Status | resolved => assigned
14-07-2008 14:07 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Thomas DeiÃŸ
15-07-2008 09:19 | Thomas DeiÃŸ | Note Added: 0006267 |
15-07-2008 09:21 | Thomas DeiÃŸ | Note Added: 0006268 |
28-07-2008 11:49 | Elena de Vega | Note Added: 0006391 |
14-08-2008 05:40 | Thomas DeiÃŸ | Note Added: 0006517 |
14-08-2008 05:40 | Thomas DeiÃŸ | Status | assigned => closed

Notes

(0006267)
Thomas DeiÃŸ
15-07-2008 09:19

The change to rule TemplateBody is ok.
What is not ok is the rule for IfPresentMatch:
142. IfPresentKeyword ::= IfKeyword PresentKeyword
143. PresentKeyword ::= "present"
This will allow to put a blank between 'if' and 'present'.
The rule for IfPresentKeyword should be changed to
142. IfPresentKeyword ::= "ifpresent"
PresentKeyword is still needed (for template restriction) and has to be added to the table of keywords in clause A.

(0006268)
Thomas DeiÃŸ
15-07-2008 09:21

In edition 3.2 the rule for IfPresentKeyword was ok, in edition 3.3 this was changed to "if present", which is incorrect. Note that there is a blank in the keyword. This incorrect keyword was continued in edition 3.4 (This is just for information)

(0006391)
Elena de Vega
28-07-2008 11:49

I have checked the IfPresentKeyword rule in v3.2.1 and it's ok, but in the v3.3.2 there are the mistake that you have commented. This mistake is: 141. IfPresentMatch ::= IfPresentKeyword 142. IfPresentKeyword ::= "if present" In the rule 142 the two words are separated.

(0006517)
Thomas DeiÃŸ
14-08-2008 05:40

the subsequent issue on the split ifpresent will also be corrected in edition 3.4.1.