[REBOL] Re: Parse versus Regular Expressions
From: rotenca:telvia:it at: 4-Apr-2003 2:36
Hi Joel,
> which leads to the suspicion that backtracking in the case of
> failure (a standard technique in RE) isn't supported so well
> in (the current implementation of) PARSE . IOW, an imaginary
> solution would traverse the tree below, allowing each use of
> Y to start a fresh backtrackable branch:
parse "ba" ["b" | "ba"] ;== false
I think that this result is right, because the rule ["b" | "ba"] is matched by
b
, the failure occurs after the rule matched, when parse find "a", so no
backtracing happens here, because there are not open alternative of failed
rule.
Do you think that parse should recover to any alternative rule also in
correctly matched ones?
---
Ciao
Romano