REBOL 3.0

PARSE: allow switching input series?

Carl Sassenrath, CTO
REBOL Technologies
9-Oct-2009 4:50 GMT

Article #0265
Main page || Index || Prior Article [0264] || Next Article [0266] || 9 Comments || Send feedback

Allowing the LIMIT concept in parse is quite difficult. The problem is that it affects too many sub-functions, like those that find subseries. It won't be in 3.0.

However, as I thought about it more, you can do LIMIT yourself by chopping up the input series in advance.

You could even handle all the pieces in a single parse... except... if you attempt to switch the input series:

>> b: "this"
>> parse "test" ["test" :b "this"]
** Script error: PARSE - attempt to change input series: :b

That restriction comes from the fact that we often need to backtrack the input, and if you change the input series, backtracking becomes problematic.

However, REBOLers are smart coders... so, perhaps we should remove this single series restriction, and just let them do what they want.

What say you? Allow switching horses in midstream?

9 Comments

REBOL 3.0
Updated 28-Apr-2024 - Edit - Copyright REBOL Technologies - REBOL.net