PARSE's Advancement Rule - Bad?

Bad cancellation may have played a role, but I found out what the actual reason was:

Ladislav wanted a: [any b] to be an iterative equivalent of the recursive a: [b a |] Then, he wanted this to produce i = 3:

a: [a |]
parse "" [(i: 0) 3 [["a" |] (i: i + 1)] end]

If you mix all that in with the desire to have any [... | end] not be an infinite loop, something has to give somewhere. But I think the "no progress" rule is the wrong answer.

Ren-C solves this with an explicit FURTHER combinator, that you can use if you want to insist that a rule makes progress. And in reality, many common cases are handled by the new WHILE via while [not <end>] [...].

It seems like the right answer to me!

1 Like