REBOL3 tracker
  0.9.12 beta
Ticket #0000682 User: anonymous

Project:



rss
TypeBug Statusproblem Date16-Mar-2009 21:46
Versionalpha 37 CategoryParse Submitted byBrondoman
PlatformWindows Severityminor Priorityhigh

Summary PARSE thru tag! doesn't consider the < and > when setting position
Description PARSE thru tag! only advances the length of the contents of the tag! in the rule, not the length of the tag in the input. This means that the position ends up two characters before it is supposed to be.
Example code
; Test data
>> page2: {<html><pre>print "Hello"</pre></html>}

; PARSE thru string!
>> parse/all page2 [thru "<pre>" copy codeblock to "</pre>" to end]
>> codeblock
== {print "Hello"}

; PARSE thru tag!
>> parse/all page2 [thru <pre> copy codeblock to </pre> to end]
>> codeblock
== {e>print "Hello"}  ; Should be {print "Hello"}

; In alpha 84
>> parse "<a>hello</a>" [thru <a> copy b to </a> to end] b
== "ello"  ; Should be "hello"

Assigned ton/a Fixed in- Last Update15-Mar-2013 00:06


Comments
(0000495)
BrianH
18-Mar-2009 05:55

Updated to reflect real problem, and to have the example not use test data on some other web site.
(0000518)
Brondoman
27-Mar-2009 00:54

This is not fixed in the A39 release. Why isn't a PARSE bug considered 'high' when PARSE is so critical to Rebol?
(0000520)
Brondoman
30-Mar-2009 17:17

This is still not fixed in the A40 release.
(0000521)
BrianH
31-Mar-2009 19:43

"Why isn't a PARSE bug considered 'high' when PARSE is so critical to Rebol?"

The alpha 39 and 40 releases focused on modules, LOAD and DO, which at this point are a little more critical to REBOL than PARSE.

We are going to rewrite PARSE - there's a project about it here: http://www.rebol.net/wiki/Parse_Project
There are a whole list of PARSE bugs that will be fixed and new features that will be implemented when we rewrite PARSE. So many that the worst of them aren't even listed here in CureCode (we should fix that).

However, we are not working on PARSE right now - we have other fixes that we are working on first (including crash bugs). Until the PARSE rewrite is on the schedule, PARSE bugs are marked as waiting, deferred, or otherwise lower priority.

The rewritten example above includes a workaround. If we can fix this bug without the PARSE rewrite we will, but it is not a high priority because there is a workaround, and because it doesn't affect any critical code inside R3.

We will fix this bug, don't worry. In the meanwhile be patient and use the workaround.
(0000522)
Brondoman
2-Apr-2009 00:13

Will do. Thanks!
(0001608)
BrianH
29-Sep-2009 09:08

Partly fixed in alpha 84. Added a new test to demonstrate the problem.
(0003482)
Ladislav
22-Feb-2013 14:38

In the core-tests suite.
(0003659)
abolka
15-Mar-2013 00:06

Fix submitted by Cyphre as pull request #34:
https://github.com/rebol/r3/pull/34

Merged in d3665587128881c1720f4c89a82f5e0817fde193.

Date User Field Action Change
15-Mar-2013 00:06 abolka Comment : 0003659 Added -
22-Feb-2013 14:38 Ladislav Comment : 0003482 Added -
29-Sep-2009 09:08 BrianH Comment : 0001608 Added -
29-Sep-2009 09:07 BrianH Status Modified reviewed => problem
29-Sep-2009 09:07 BrianH Code Modified -
28-Sep-2009 05:50 BrianH Priority Modified normal => high
28-Sep-2009 05:50 BrianH Status Modified deferred => reviewed
28-Sep-2009 05:50 BrianH Category Modified => Parse
2-Apr-2009 00:13 Brondoman Comment : 0000522 Added -
31-Mar-2009 20:44 BrianH Comment : 0000521 Modified -
31-Mar-2009 20:43 BrianH Comment : 0000521 Modified -
31-Mar-2009 19:53 BrianH Comment : 0000521 Modified -
31-Mar-2009 19:49 BrianH Comment : 0000521 Modified -
31-Mar-2009 19:44 BrianH Status Modified reviewed => deferred
31-Mar-2009 19:43 BrianH Comment : 0000521 Added -
30-Mar-2009 17:17 Brondoman Comment : 0000520 Added -
27-Mar-2009 00:54 Brondoman Comment : 0000518 Added -
18-Mar-2009 05:55 BrianH Comment : 0000495 Added -
18-Mar-2009 05:53 BrianH Priority Modified high => normal
18-Mar-2009 05:53 BrianH Status Modified submitted => reviewed
18-Mar-2009 05:53 BrianH Code Modified -
18-Mar-2009 05:53 BrianH Description Modified -
18-Mar-2009 05:53 BrianH Summary Modified parse thru picking up characters before mark => PARSE thru tag! doesn't consider the < and > when setting position
17-Mar-2009 17:32 Brondoman Code Modified -
16-Mar-2009 21:46 Brondoman Ticket Added -