There are cases where you want to know how many of a certain match there are.
Here's an example:
uparse "<<<stuff>>>" [ (n: 0) some ["<" (n: n + 1)] x: between here n ">" ]
Here I'm just trying to match the number of
> on the right to how many
< were on the left.
(Note: I still think this INTEGER! abstracting of rules is confusing to read. Is a REPEAT/LOOP keyword missing that would help? I've written about this, please register an opinion.)
This Feels Like It Needs A (Value-Bearing) Rule
Maybe call it TALLY ?
uparse "<<<stuff>>>" [ n: tally "<" x: between here n ">" ]
I'm reluctant to call it COUNT since that's used so often as a variable name / noun. But TALLY seems like fair game.
But the main thing to focus on here is just how much killer leverage we get when parse rules can fit into this extensible framework. And my major point I raised about synthesizing values that are not restricted to the type of the input.