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

ID | Project | Category | View Status | Date Submitted | Last Update
0003885 | Part 01: TTCN-3 Core Language | Clarification | public | 31-07-2008 13:19 | 13-08-2008 16:19

Reporter | Elena de Vega |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | won't fix |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.1.1 (published 2009-06) | Fixed in Version |  |
Clause Reference(s) | Grammar, Value
Source (company - Author) | Elena de Vega - MTP

Summary | 0003885: Mistake in grammar rule Value

Description

Grammar rule Value problem:
458. Value ::= PredefinedValue | ReferencedValue
459. PredefinedValue ::= BitStringValue |
BooleanValue |
CharStringValue |
IntegerValue |
OctetStringValue |
HexStringValue |
VerdictTypeValue |
EnumeratedValue |
FloatValue |
AddressValue |
OmitValue
466. EnumeratedValue ::= EnumerationIdentifier
47. EnumerationIdentifier ::= Identifier
478. ReferencedValue ::= ValueReference [ExtendedFieldReference]
479. ValueReference ::= [GlobalModuleId Dot]
( ConstIdentifier | ExtConstIdentifier |
ModuleParIdentifier )
| ValueParIdentifier | VarIdentifier
93. ConstIdentifier ::= Identifier
273. ExtConstIdentifier ::= Identifier
280. ModuleParIdentifier ::= Identifier
292. VarIdentifier ::= Identifier
506. ValueParIdentifier ::= Identifier
The order of the rule Value doesnâ€™t let access, with a simple identifier, to the rule ReferencedValue, this could cause confusion.
This is because the rule EnumeratedValue of PredefinedValue matches with all simple identifiers.
With the identifiers that use dot notation there isnâ€™t problem because it always matches with ValueReference.
The solution for this could be to change the two rules like:
Value ::= ReferencedValue | PredefinedValue
But with this solution, if you use a simple identifier, it never matches with the rule EnumeratedValue. I think that itâ€™s logical because the enumeration identifier is a simple identifier then it has to match with ReferencedValue.
Then we can delete the rule EnumeratedValue from PredefinedValue and add the rule EnumerationIdentifier to ValueReference. This is the solution:
458. Value ::= ReferencedValue | PredefinedValue
459. PredefinedValue ::= BitStringValue |
BooleanValue |
CharStringValue |
IntegerValue |
OctetStringValue |
HexStringValue |
VerdictTypeValue |
EnumeratedValue |
FloatValue |
AddressValue |
OmitValue
466. EnumeratedValue ::= EnumerationIdentifier
478. ReferencedValue ::= ValueReference [ExtendedFieldReference]
479. ValueReference ::= [GlobalModuleId Dot]
( ConstIdentifier | ExtConstIdentifier |
ModuleParIdentifier )
| ValueParIdentifier | VarIdentifier
| EnumerationIdentifier
93. ConstIdentifier ::= Identifier
273. ExtConstIdentifier ::= Identifier
280. ModuleParIdentifier ::= Identifier
292. VarIdentifier ::= Identifier
506. ValueParIdentifier ::= Identifier
47. EnumerationIdentifier ::= Identifier
In fact, ValueReference itâ€™s only an Identifier Dot Identifier. I mean, you only match a simple identifier with the first non optional rule of the ValueReference.
If you would like to do your grammar more efficient, you can change the rule ValueReference like:
ValueReference = [Identifier Dot] Identifier
This kind of change could be made in more grammar rules. But it probably needs a properly discussion.

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

Issue History
Date Modified | Username | Field | Change
31-07-2008 13:19 | Elena de Vega | New Issue |
31-07-2008 13:19 | Elena de Vega | Clause Reference(s) | => Grammar, Value
31-07-2008 13:19 | Elena de Vega | Source (company - Author) | => Elena de Vega - MTP
11-08-2008 08:41 | Ina Schieferdecker | Assigned To | => Ina Schieferdecker
11-08-2008 08:41 | Ina Schieferdecker | Status | new => assigned
13-08-2008 16:11 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
13-08-2008 16:18 | Ina Schieferdecker | Note Added: 0006516 |
13-08-2008 16:19 | Ina Schieferdecker | Status | assigned => closed
13-08-2008 16:19 | Ina Schieferdecker | Resolution | open => won't fix
13-08-2008 16:19 | Ina Schieferdecker | Category | TTCN-3 Core Language => Clarification
13-08-2008 16:19 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published)

Notes

(0006516)
Ina Schieferdecker
13-08-2008 16:18

This CR correctly points at the issue of handling identifiers by the TTCN-3 BNF.
However: the TTCN-3 BNF has been written in a human-readable form. One cannot create a parser directly out of it. This was not the intend of the BNF. Instead, readability was the goal. Therefore, one has to resolve various issues in the BNF to get a parser for it - identifiers are one of these issues.
Hence, the maintenance team proposes not to fix this issue.