Overview
| Artifact ID: | cb4ff0496757834d56f0f128acc1d3aa5d675dff |
|---|---|
| Ticket: | 1047097fffffffffffffffffffffffffffffffff
Possible parsing problem. "list" command inccorectly assigns |
| User & Date: | nobody on 2004-10-14 15:06:02 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
Synopsis of the bug: Possible issue with the way tcl parses list commands. 1. If the list being passed to one of the list commands is followed by any nonspace "terminator" character (such as "[", ",", ".", "{", "}", ")", "\" and etc. ) and then by any number of nonspace characters then space , all those characters are being appended to the very last element of the list while executing the command. Example: ---------- input: join [list 1 2 3]\[ | output: 1|2|3[ input: join [list 1 2 3]] | output: 1|2|3] 2. If the list being passed to one of the list commands is followed by any nonspace "terminator" character (such as "[", ",", ".", "{", "}", ")", "\" and etc. ) and then by any number of nonspace characters, then by "\", then by a space character, and then again any number of nonspace characters, all those characters before "\ " are being appended to the very last element of the passed list and all characters that goes after "\ " are treated as an additional last element of the list while executing the command. Example: ---------- input: join $l\extra1\ extra2 | output: 1|2|3extra1|extra2 Setup information: OS: Windows 2000 Professional, TCL: Tcl version 8.3 Steps to reproduce the bug: 1. Bring up tclsh command prompt 2. Initialize the list as below... input: set l [list 1 2 3] output: 1 2 3 3. Try one of the operation below (join is used only as an example any other list operation will manifest the same issue) input: join $l] | output: 1|2|3] input: join $l{ | output: 1|2|3{ input: join $l} | output: 1|2|3} input: join $l) | output: 1|2|3) input: join $l. | output: 1|2|3. input: join $l, | output: 1|2|3, input: join $l\asdf | output: 1|2|3sdf input: join $l\( | output: 1|2|3( input: join $l\[ | output: 1|2|3[ input: join $l\] | output: 1|2|3] input: join $l\\ | output: 1|2|3\ input: join [list 1 2 3]\[ | output: 1|2|3[ input: join $l\extra1\ extra2 | output: 1|2|3extra1|extra2 Expected result: Parsing error. - foundin changed to: "final ----"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "17. Commands I-L"
- title changed to:
Possible parsing problem. "list" command inccorectly assigns
- type changed to: "Bug"