Logo etsi

ETSI's Bug Tracker

Notice: information submitted on the ETSI issue Tracker may be incorporated in ETSI publication(s) and therefore subject to the ETSI IPR policy.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003945Part 01: TTCN-3 Core LanguageTechnicalpublic11-08-2008 11:0114-08-2008 12:51
ReporterGyorgy Rethy 
Assigned ToIna Schieferdecker 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Versionv4.1.1 (published 2009-06)Fixed in Versionv4.1.1 (published 2009-06) 
Summary0003945: Empty statement blocks shall be allowed by BNF
DescriptionIn fact two issues are raised by the CR:
1) The current BNF rule

172. FunctionStatementOrDefList ::= {FunctionStatementOrDef [SemiColon]}+

disallows empty statement blocks, while it is not forbidden by the text, see for example note 3 to clause 5.2:
"NOTE 3: Statement blocks may include declarations. They may occur as stand-alone statement blocks, embedded in another statement block or within compound statements, e.g. as body of a while loop."

2) In clause 5.3 the textual part mandates that
"Inside a statement block, such as a function body or a branch of an
if-else statement, all declarations (if any), shall be made at the
beginning of the statement block only."

This rule is not reflected in the bnf:
171. StatementBlock ::= "{" [FunctionStatementOrDefList] "}"
172. FunctionStatementOrDefList ::= {FunctionStatementOrDef [SemiColon]}+
173. FunctionStatementOrDef ::= FunctionLocalDef |
                                FunctionLocalInst |
                                FunctionStatement
It is proposed to increase the clarity and usability of the standard by changing the bnf that it also indicates the above rule.
Additional InformationProposed new bnf productions:

171. StatementBlock ::= "{" [FunctionDefList] [FunctionStatementList] "}"
172. FunctionDefList ::= {(FunctionLocalDef | FunctionLocalInst) [SemiColon]}
173. FunctionStatementList ::= {FunctionStatement [SemiColon]}
TagsNo tags attached.
Clause Reference(s)BNF rules 171-173
Source (company - Author)L.M.Ericsson
Attached Filesdoc file icon CR_EmptyStatementBlock.doc [^] (25,088 bytes) 13-08-2008 15:47

- Relationships

-  Notes
(0006514)
Ina Schieferdecker (reporter)
13-08-2008 15:46

In fact, statement blocks can be empty:
171. StatementBlock ::= "{" [FunctionStatementOrDefList] "}"

The ordering of definitions before statements should be added - see slight change in BNF proposal

- Issue History
Date Modified Username Field Change
11-08-2008 11:01 Gyorgy Rethy New Issue
11-08-2008 11:01 Gyorgy Rethy Status new => assigned
11-08-2008 11:01 Gyorgy Rethy Assigned To => Ina Schieferdecker
11-08-2008 11:01 Gyorgy Rethy Clause Reference(s) => BNF rules 171-173
11-08-2008 11:01 Gyorgy Rethy Source (company - Author) => L.M.Ericsson
13-08-2008 15:46 Ina Schieferdecker Note Added: 0006514
13-08-2008 15:47 Ina Schieferdecker File Added: CR_EmptyStatementBlock.doc
13-08-2008 15:48 Ina Schieferdecker Assigned To Ina Schieferdecker => Gyorgy Rethy
13-08-2008 15:48 Ina Schieferdecker Resolution open => fixed
13-08-2008 16:08 Gyorgy Rethy Assigned To Gyorgy Rethy => Ina Schieferdecker
13-08-2008 16:08 Gyorgy Rethy Status assigned => resolved
14-08-2008 12:51 Ina Schieferdecker Status resolved => closed
14-08-2008 12:51 Ina Schieferdecker Fixed in Version => Edition 4.1.1 (not yet published)
14-08-2008 12:51 Ina Schieferdecker Target Version => Edition 4.1.1 (not yet published)


MantisBT 1.2.14 [^]
Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker