In the parse dialect, parentheses evaluate expressions. Yet the result of the evaluation does not become part of the parse rule. That is by design, so you can work in this style:
>> count: 0
== 0
>> parse "aab" [while ["a" (print "Match a" ++ count)] "b"]
Match a
Match a
== true
>> count
== 2
Having the evaluation become part of the parse rule is a different use case. Some instances (like yours) are suited to COMPOSE because they evaluate an expression just once. But my match counting expression would go awry:
>> count: 0
== 0
>> rule: compose/deep [while ["a" (print "Match a" ++ count)] "b"]
Match a
== [while ["a" 0] "b"]
>> count
== 1
>> parse "aab" rule
== false
AFAIK, Rebol 2 has no general way to run "DO" expressions in the middle of a parse and have the expressions effectively merged into the rules. So you have to use parenthesized code to get and set words, and then use those words in the rules.
Rebol 3 supposedly has added a version of DO but I can't find any examples that work in the current alpha version. As described on the wiki, I'd expect this to return true
and capture the result "abc":
>> result: none
== none
>> parse "abc" [copy result thru do [reverse "cba"]]
== false
>> result
== none
(It also doesn't work on simpler examples. But I tried that once due to the statement "A DO statement could be used as the rule argument to COPY, SET or RETURN operations. It didn't say it could not be used elsewhere, but it also didn't say it could be used elsewhere...)