Hi,

gee, I am struggling with some more complex parse rule for a few days,
now I cutted it down to following example. Look at infinite loop:

str: "Some text with * inside it"
non-asterisk: complement charset "*"

->> parse/all str [copy txt some non-asterisk mark: (print mold mark) to
end]
"* inside it"
== true

->> parse/all str [copy txt some non-asterisk mark: (print mold mark)
:mark to end]
"* inside it"
== true

->> parse/all str [some [copy txt some non-asterisk mark: (print mold
mark) :mark] to end]
"* inside it"
"* inside it"
"* inside it"
"* inside it"
"* inside it"
.....

Infinite loop - why? From further investigation I know string points at
the beginning once again ...

No look at following - removing outputting part ...

->> parse/all str [some [copy txt some non-asterisk mark: :mark] to end]

== true

and bringing it back ...

->> parse/all str [some [copy txt some non-asterisk mark: (print mold
mark) :mark] to end]
"* inside it"
"* inside it"
"* inside it"
"* inside it"
... infinite loop once again ...

->> parse/all str [some [copy txt some non-asterisk mark: (print "Ahoy")
:mark] to end]
Ahoy
Ahoy
Ahoy
Ahoy
.... hmm, not even related to printing of 'mark

->> parse/all str [some [copy txt some non-asterisk mark: (print
"Ahoy")] to end]
Ahoy
== true

->> parse/all str [some [begin: (print index? begin) copy txt some
non-asterisk mark: (print index?
 mark: next mark) :mark (print index? mark)] to end]
1
17
17
1
17
17
1
17
17

Am I doing anything wrong here? Help please :-)

Thanks,

-pekr-

Reply via email to