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

ID | Project | Category | View Status | Date Submitted | Last Update
0006433 | Part 01: TTCN-3 Core Language | Editorial | public | 08-03-2013 11:27 | 11-10-2013 12:28

Reporter | Tomas Urban |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.6.1 (published 2014-06) | Fixed in Version | v4.6.1 (published 2014-06) |
Clause Reference(s) | C.4.1
Source (company - Author) | Elvior

Summary | 0006433: Invalid pattern syntax in regexp examples

Description

The example section of the regexp predefined function includes this pattern:
var template charstring myPattern := pattern"([ /t]#(,)date:[ \d\-]#(,);[ /t]#(,)msgno: (\d#(1,3)); (exp)#(0,1))"
It seems that the example author wanted to use #(,) as a quantifier for matching the preceding character set n times (with both upper and lower bounds unlimitted). However, the n-times quantifier format as it is defined in the BNF and Annex B requires at least one bound to be present. Thus, because it cannot be translated as the quantifier, this part shall be interpretted as a literal, matching a hash mark and comma (with a comma forming a group), yielding a different result than shown in the example.
The pattern shall be therefore changed to:
var template charstring myPattern := pattern"([ /t]#(0,)date:[ \d\-]#(0,);[ /t]#(0,)msgno: (\d#(1,3)); (exp)#(0,1))";
NB: There are many semicolons missing in the regexp function example section. They should be added as well

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

Attached Files

CR6433_resolution_v1.doc (120,832) 27-08-2013 11:18
http://oldforge.etsi.org/mantis/file_download.php?file_id=2858&type=bug
regexp_inTheStandard.ttcn (3,386) 27-08-2013 11:18
http://oldforge.etsi.org/mantis/file_download.php?file_id=2859&type=bug
CR6433_resolution_v2.doc (120,832) 28-08-2013 10:39
http://oldforge.etsi.org/mantis/file_download.php?file_id=2865&type=bug
CR6433_resolution_v3.doc (125,440) 30-08-2013 10:07
http://oldforge.etsi.org/mantis/file_download.php?file_id=2878&type=bug
CR6433_resolution_v4.doc (126,464) 11-10-2013 12:28
http://oldforge.etsi.org/mantis/file_download.php?file_id=2926&type=bug

Issue History
Date Modified | Username | Field | Change
08-03-2013 11:27 | Tomas Urban | New Issue |
08-03-2013 11:27 | Tomas Urban | Clause Reference(s) | => C.4.1
08-03-2013 11:27 | Tomas Urban | Source (company - Author) | => Elvior
08-03-2013 11:43 | Tomas Urban | Description Updated |
08-07-2013 15:27 | Jens Grabowski | Status | new => assigned
08-07-2013 15:27 | Jens Grabowski | Assigned To | => Gyorgy Rethy
08-07-2013 18:09 | Gyorgy Rethy | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
08-07-2013 18:11 | Gyorgy Rethy | Target Version | => v4.6.1 (published 2014-06)
09-07-2013 16:47 | Jacob Wieland - Spirent | Note Added: 0011485 |
27-08-2013 10:58 | Gyorgy Rethy | Note Added: 0011607 |
27-08-2013 10:59 | Gyorgy Rethy | Note Edited: 0011607 |
27-08-2013 10:59 | Gyorgy Rethy | File Added: regexp_inTheStandard.ttcn |
27-08-2013 11:00 | Gyorgy Rethy | File Added: CR6433_resolution_v1.doc |
27-08-2013 11:18 | Gyorgy Rethy | File Deleted: regexp_inTheStandard.ttcn |
27-08-2013 11:18 | Gyorgy Rethy | File Deleted: CR6433_resolution_v1.doc |
27-08-2013 11:18 | Gyorgy Rethy | File Added: CR6433_resolution_v1.doc |
27-08-2013 11:18 | Gyorgy Rethy | File Added: regexp_inTheStandard.ttcn |
27-08-2013 11:19 | Gyorgy Rethy | Note Edited: 0011607 |
27-08-2013 11:19 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Jacob Wieland - Spirent
27-08-2013 17:35 | Jacob Wieland - Spirent | Note Added: 0011613 |
27-08-2013 17:35 | Jacob Wieland - Spirent | Status | assigned => confirmed
27-08-2013 17:36 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent =>
27-08-2013 17:36 | Jacob Wieland - Spirent | Status | confirmed => assigned
27-08-2013 17:36 | Jacob Wieland - Spirent | Assigned To | => Jacob Wieland - Spirent
27-08-2013 17:36 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
27-08-2013 17:36 | Jacob Wieland - Spirent | Status | assigned => confirmed
28-08-2013 10:39 | Gyorgy Rethy | Note Added: 0011616 |
28-08-2013 10:39 | Gyorgy Rethy | File Added: CR6433_resolution_v2.doc |
28-08-2013 10:40 | Gyorgy Rethy | Status | confirmed => assigned
28-08-2013 10:40 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker
30-08-2013 10:07 | Ina Schieferdecker | File Added: CR6433_resolution_v3.doc |
30-08-2013 10:08 | Ina Schieferdecker | Note Added: 0011651 |
30-08-2013 10:08 | Ina Schieferdecker | Status | assigned => confirmed
30-08-2013 10:08 | Ina Schieferdecker | Resolution | open => fixed
30-08-2013 10:08 | Ina Schieferdecker | Status | confirmed => assigned
30-08-2013 10:08 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Jacob Wieland - Spirent
30-08-2013 13:51 | Jacob Wieland - Spirent | Note Added: 0011661 |
30-08-2013 13:51 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Ina Schieferdecker
30-08-2013 13:51 | Jacob Wieland - Spirent | Status | assigned => confirmed
30-08-2013 16:28 | Jacob Wieland - Spirent | Status | confirmed => resolved
30-08-2013 16:28 | Jacob Wieland - Spirent | Fixed in Version | => v4.6.1 (published 2014-06)
11-10-2013 12:28 | Ina Schieferdecker | File Added: CR6433_resolution_v4.doc |
11-10-2013 12:28 | Ina Schieferdecker | Status | resolved => closed
11-10-2013 12:28 | Ina Schieferdecker | Note Added: 0011770 |

Notes

(0011485)
Jacob Wieland - Spirent
09-07-2013 16:47

A different approach would be to allow #(,) and #() as a shorthand notation for #(0,) which is one of the most commonly needed repetition operators.

(0011607)
Gyorgy Rethy
27-08-2013 10:58 (edited on: 27-08-2013 11:19)

I propose to take both... Correct the example acc. to the current syntax and include the two shorthand-s proposed by Jacob. This way the examples will be correct until the new shorthand-s are implemented :-) See proposed solution in CR6433_resolution_v1.doc. Pls. review

(0011613)
Jacob Wieland - Spirent
27-08-2013 17:35

fine with me except for a typo in "matches the preceding expression at any number of times" which should be "matches the preceding expression any number of times"

(0011616)
Gyorgy Rethy
28-08-2013 10:39

Typo corrected in CR6433_resolution_v2.doc.

(0011651)
Ina Schieferdecker
30-08-2013 10:08

Added BNF rule - please check

(0011661)
Jacob Wieland - Spirent
30-08-2013 13:51

change is correct

(0011770)
Ina Schieferdecker
11-10-2013 12:28

as proposed with some technical fixes in v4