Type | Bug | Status | complete | Date | 23-Dec-2009 02:57 |
---|---|---|---|---|---|
Version | alpha 95 | Category | Parse | Submitted by | Carl |
Platform | All | Severity | not a bug | Priority | normal |
Summary | PARSE some remove problem |
---|---|
Description | When PARSE is used to remove multiple occurrences of a string, it does not. |
Example code |
str: "ababab" parse str [some [to "a" remove thru "b"]] str == "abab" |
Assigned to | n/a | Fixed in | - | Last Update | 5-Feb-2010 21:04 |
---|
Comments | |
---|---|
(0001879)
Carl 23-Dec-2009 14:27 |
The source of the problem: input did not appear to advance. (Yes, in fact it did, but was removed, so it appears not to advance.) The SOME gets terminated for that reason.
SOME needs to be better documented: it is a requirement that the input advance - that "some" chars are matched. A better way to write this loop is with WHILE. It does not require the input to advance. |
(0001880)
Carl 23-Dec-2009 15:35 |
This has been documented on the PARSE summary page. |
(0001887)
Ladislav 28-Dec-2009 12:59 |
I knew While was useful (otherwise I wouldn't request it), but I am glad this issue has shown yet another use for it. |
Date | User | Field | Action | Change |
---|---|---|---|---|
5-Feb-2010 21:04 | BrianH | Category | Modified | Unspecified => Parse |
5-Feb-2010 21:04 | BrianH | Severity | Modified | minor => not a bug |
28-Dec-2009 12:59 | Ladislav | Comment : 0001887 | Added | - |
23-Dec-2009 15:35 | carl | Comment : 0001880 | Added | - |
23-Dec-2009 15:35 | carl | Status | Modified | reviewed => complete |
23-Dec-2009 15:20 | carl | Comment : 0001879 | Modified | - |
23-Dec-2009 14:27 | carl | Comment : 0001879 | Added | - |
23-Dec-2009 13:09 | carl | Code | Modified | - |
23-Dec-2009 13:09 | carl | Status | Modified | submitted => reviewed |
23-Dec-2009 02:57 | carl | Ticket | Added | - |